-
Notifications
You must be signed in to change notification settings - Fork 124
Upcoming Release Changes #7470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upcoming Release Changes #7470
Conversation
Summary of ChangesHello @theguild-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request prepares for an upcoming release, primarily introducing a significant new feature: Layer 2 (L2) caching for persisted GraphQL documents across Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/apollo |
0.47.0-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/cli |
0.57.1-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/core |
0.20.0-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/envelop |
0.40.2-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/yoga |
0.47.0-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
hive |
8.14.1-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
hive-apollo-router-plugin |
3.0.0-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
hive-console-sdk-rs |
0.3.0-rc-20260112093439-e0b5a3870804334bfe64b42ef72219e4b632cbc4 |
npm ↗︎ unpkg ↗︎ |
📚 Storybook DeploymentThe latest changes are available as preview in: https://pr-7470.hive-storybook.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request, generated by the Changesets release action, updates package versions and changelogs for an upcoming release. The main feature being released is Layer 2 (L2) cache support for persisted documents. A security audit identified a high-severity Path Traversal vulnerability in the new persisted documents implementation, allowing an attacker to read arbitrary files on the CDN server by crafting a malicious documentId. A remediation has been suggested to properly sanitize the documentId. Additionally, the review highlighted a misleading code example in the @graphql-hive/apollo changelog, for which a more relevant example for Apollo Server users has been provided.
| **Example with GraphQL Yoga:** | ||
|
|
||
| ```typescript | ||
| import { createYoga } from 'graphql-yoga' | ||
| import { createClient } from 'redis' | ||
| import { useHive } from '@graphql-hive/yoga' | ||
|
|
||
| const redis = createClient({ url: 'redis://localhost:6379' }) | ||
| await redis.connect() | ||
|
|
||
| const yoga = createYoga({ | ||
| plugins: [ | ||
| useHive({ | ||
| experimental__persistedDocuments: { | ||
| cdn: { | ||
| endpoint: 'https://cdn.graphql-hive.com/artifacts/v1/<target_id>', | ||
| accessToken: '<cdn_access_token>' | ||
| }, | ||
| layer2Cache: { | ||
| cache: { | ||
| get: key => redis.get(`hive:pd:${key}`), | ||
| set: (key, value, opts) => | ||
| redis.set(`hive:pd:${key}`, value, opts?.ttl ? { EX: opts.ttl } : {}) | ||
| }, | ||
| ttlSeconds: 3600, // 1 hour for found documents | ||
| notFoundTtlSeconds: 60 // 1 minute for not-found (negative caching) | ||
| } | ||
| } | ||
| }) | ||
| ] | ||
| }) | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example provided is for GraphQL Yoga, but this is the changelog for @graphql-hive/apollo. This can be confusing for users. It would be more helpful to provide an example that is specific to Apollo Server, especially since one of the features is "Apollo Server integration auto-uses context cache if available".
**Example with Apollo Server:**
```typescript
import { ApolloServer } from '@apollo/server';
import { startStandaloneServer } from '@apollo/server/standalone';
import { createClient } from 'redis';
import { RedisCache } from '@apollo/server-redis-cache';
import { useHive } from '@graphql-hive/apollo';
// Some type definitions
const typeDefs = `#graphql
type Query {
hello: String
}
`;
// Some resolvers
const resolvers = {
Query: {
hello: () => 'world',
},
};
const redis = createClient({ url: 'redis://localhost:6379' });
await redis.connect();
const server = new ApolloServer({
typeDefs,
resolvers,
cache: new RedisCache({
client: redis,
}),
plugins: [
useHive({
experimental__persistedDocuments: {
cdn: {
endpoint: 'https://cdn.graphql-hive.com/artifacts/v1/<target_id>',
accessToken: '<cdn_access_token>'
},
// L2 cache is automatically picked up from Apollo Server's context cache.
// You can still configure TTLs if needed.
layer2Cache: {
ttlSeconds: 3600, // 1 hour for found documents
notFoundTtlSeconds: 60 // 1 minute for not-found (negative caching)
}
}
})
]
});
const { url } = await startStandaloneServer(server);
console.log(`🚀 Server ready at ${url}`);
💻 Website PreviewThe latest changes are available as preview in: https://pr-7470.hive-landing-page.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
c72aa9a to
5ee958d
Compare
5ee958d to
bcbe6dc
Compare
bcbe6dc to
5836b10
Compare
5836b10 to
6e84427
Compare
6e84427 to
f53181b
Compare
f53181b to
69011a2
Compare
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
69011a2 to
cc1ebd1
Compare
cc1ebd1 to
07e6ed3
Compare
07e6ed3 to
e0b5a38
Compare
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@graphql-hive/[email protected]
Minor Changes
#7462
60133a4Thanks @adambenhassen! - Add Layer 2 (L2) cache support for
persisted documents.
This feature adds a second layer of caching between the in-memory cache (L1) and the CDN for
persisted documents. This is particularly useful for:
The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN
Example with GraphQL Yoga:
Features:
ttlSeconds)notFoundTtlSeconds)waitUntilin serverless environmentsPatch Changes
[
60133a4]:@graphql-hive/[email protected]
Minor Changes
#7462
60133a4Thanks @adambenhassen! - Add Layer 2 (L2) cache support for
persisted documents.
This feature adds a second layer of caching between the in-memory cache (L1) and the CDN for
persisted documents. This is particularly useful for:
The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN
Example with GraphQL Yoga:
Features:
ttlSeconds)notFoundTtlSeconds)waitUntilin serverless environments@graphql-hive/[email protected]
Minor Changes
#7462
60133a4Thanks @adambenhassen! - Add Layer 2 (L2) cache support for
persisted documents.
This feature adds a second layer of caching between the in-memory cache (L1) and the CDN for
persisted documents. This is particularly useful for:
The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN
Example with GraphQL Yoga:
Features:
ttlSeconds)notFoundTtlSeconds)waitUntilin serverless environmentsPatch Changes
[
60133a4]:@graphql-hive/[email protected]
Patch Changes
[
60133a4]:@graphql-hive/[email protected]
Patch Changes
[
60133a4]:[email protected]
Major Changes
#7379
b134461Thanks @ardatan! - - Multiple endpoints support for
HiveRegistryand
PersistedOperationsPluginBreaking Changes:
endpointfield in the configuration, it has been replaced withendpoints,which is an array of strings. You are not affected if you use environment variables to set the
endpoint.
HiveRegistry::new( Some( HiveRegistryConfig { - endpoint: String::from("CDN_ENDPOINT"), + endpoints: vec![String::from("CDN_ENDPOINT1"), String::from("CDN_ENDPOINT2")], ) )Patch Changes
#7479
382b481Thanks @ardatan! - Update dependencies
Updated dependencies
[
b134461,b134461]:hive-console-sdk-rs@0.3.0
Minor Changes
#7379
b134461Thanks @ardatan! - Breaking Changes to avoid future breaking
changes;
Switch to Builder
pattern for
SupergraphFetcher,PersistedDocumentsManagerandUsageAgentstructs.No more
try_newortry_new_asyncortry_new_syncfunctions, instead useSupergraphFetcherBuilder,PersistedDocumentsManagerBuilderandUsageAgentBuilderstructs tocreate instances.
Benefits;
Example;
Example;
Patch Changes
#7379
b134461Thanks @ardatan! - Circuit Breaker Implementation and Multiple
Endpoints Support
Implementation of Circuit Breakers in Hive Console Rust SDK, you can learn more
here
Breaking Changes:
Now
endpointconfiguration accepts multiple endpoints as an array forSupergraphFetcherBuilderand
PersistedDocumentsManager.This change requires updating the configuration structure to accommodate multiple endpoints.
[email protected]
Patch Changes
#7477
b90f215Thanks @n1ru4l! - Show correct error message for insufficient GitHub
App installation permissions when attempting to create a check run as part of a schema check.
#7459
0ce9c82Thanks @jdolle! - Set usageEstimation year validation range at
runtime to avoid issues during the new year. This fixes an issue where the organization settings
usage data was not loading for January until the service was deployed again.
#7451
bd4e36dThanks @jdolle! - Show diff on proposals editor