diff --git a/.changeset/brave-buses-thank.md b/.changeset/brave-buses-thank.md deleted file mode 100644 index efb6d0b6fed..00000000000 --- a/.changeset/brave-buses-thank.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'hive': patch ---- - -Show correct error message for insufficient GitHub App installation permissions when attempting to -create a check run as part of a schema check. diff --git a/.changeset/busy-cloths-search.md b/.changeset/busy-cloths-search.md deleted file mode 100644 index 7aed840f79e..00000000000 --- a/.changeset/busy-cloths-search.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -'hive-console-sdk-rs': minor ---- - -Breaking Changes to avoid future breaking changes; - -Switch to [Builder](https://rust-unofficial.github.io/patterns/patterns/creational/builder.html) pattern for `SupergraphFetcher`, `PersistedDocumentsManager` and `UsageAgent` structs. - -No more `try_new` or `try_new_async` or `try_new_sync` functions, instead use `SupergraphFetcherBuilder`, `PersistedDocumentsManagerBuilder` and `UsageAgentBuilder` structs to create instances. - -Benefits; - -- No need to provide all parameters at once when creating an instance even for default values. - -Example; -```rust -// Before -let fetcher = SupergraphFetcher::try_new_async( - "SOME_ENDPOINT", // endpoint - "SOME_KEY", - "MyUserAgent/1.0".to_string(), - Duration::from_secs(5), // connect_timeout - Duration::from_secs(10), // request_timeout - false, // accept_invalid_certs - 3, // retry_count - )?; - -// After -// No need to provide all parameters at once, can use default values -let fetcher = SupergraphFetcherBuilder::new() - .endpoint("SOME_ENDPOINT".to_string()) - .key("SOME_KEY".to_string()) - .build_async()?; -``` - -- Easier to add new configuration options in the future without breaking existing code. - -Example; - -```rust -let fetcher = SupergraphFetcher::try_new_async( - "SOME_ENDPOINT", // endpoint - "SOME_KEY", - "MyUserAgent/1.0".to_string(), - Duration::from_secs(5), // connect_timeout - Duration::from_secs(10), // request_timeout - false, // accept_invalid_certs - 3, // retry_count - circuit_breaker_config, // Breaking Change -> new parameter added - )?; - -let fetcher = SupergraphFetcherBuilder::new() - .endpoint("SOME_ENDPOINT".to_string()) - .key("SOME_KEY".to_string()) - .build_async()?; // No breaking change, circuit_breaker_config can be added later if needed -``` \ No newline at end of file diff --git a/.changeset/dark-islands-clean.md b/.changeset/dark-islands-clean.md deleted file mode 100644 index 590c95b533d..00000000000 --- a/.changeset/dark-islands-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'hive-apollo-router-plugin': patch ---- - -Update dependencies diff --git a/.changeset/five-mangos-give.md b/.changeset/five-mangos-give.md deleted file mode 100644 index 92c5006df03..00000000000 --- a/.changeset/five-mangos-give.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'hive': patch ---- - -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. diff --git a/.changeset/light-walls-vanish.md b/.changeset/light-walls-vanish.md deleted file mode 100644 index 7a1f4f89105..00000000000 --- a/.changeset/light-walls-vanish.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'hive-console-sdk-rs': patch ---- - -Circuit Breaker Implementation and Multiple Endpoints Support - -Implementation of Circuit Breakers in Hive Console Rust SDK, you can learn more [here](https://the-guild.dev/graphql/hive/product-updates/2025-12-04-cdn-mirror-and-circuit-breaker) - -Breaking Changes: - -Now `endpoint` configuration accepts multiple endpoints as an array for `SupergraphFetcherBuilder` and `PersistedDocumentsManager`. - -```diff -SupergraphFetcherBuilder::default() -- .endpoint(endpoint) -+ .add_endpoint(endpoint1) -+ .add_endpoint(endpoint2) -``` - -This change requires updating the configuration structure to accommodate multiple endpoints. diff --git a/.changeset/smooth-hairs-hide.md b/.changeset/smooth-hairs-hide.md deleted file mode 100644 index cd888ef7ae9..00000000000 --- a/.changeset/smooth-hairs-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'hive': patch ---- - -Show diff on proposals editor diff --git a/.changeset/violet-waves-happen.md b/.changeset/violet-waves-happen.md deleted file mode 100644 index 67aabe639d1..00000000000 --- a/.changeset/violet-waves-happen.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'hive-apollo-router-plugin': major ---- - -- Multiple endpoints support for `HiveRegistry` and `PersistedOperationsPlugin` - -Breaking Changes: -- Now there is no `endpoint` field in the configuration, it has been replaced with `endpoints`, which is an array of strings. You are not affected if you use environment variables to set the endpoint. - -```diff -HiveRegistry::new( - Some( - HiveRegistryConfig { -- endpoint: String::from("CDN_ENDPOINT"), -+ endpoints: vec![String::from("CDN_ENDPOINT1"), String::from("CDN_ENDPOINT2")], - ) -) diff --git a/.changeset/warm-melons-argue.md b/.changeset/warm-melons-argue.md deleted file mode 100644 index adfcd8d367f..00000000000 --- a/.changeset/warm-melons-argue.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -'@graphql-hive/core': minor -'@graphql-hive/yoga': minor -'@graphql-hive/apollo': minor ---- - -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: - -- **Serverless environments**: Where in-memory cache is lost between invocations -- **Multi-instance deployments**: To share cached documents across server instances -- **Reducing CDN calls**: By caching documents in Redis or similar external caches - -The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN - -**Example with GraphQL Yoga:** - -```typescript -import { createYoga } from 'graphql-yoga' -import { useHive } from '@graphql-hive/yoga' -import { createClient } from 'redis' - -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/', - accessToken: '' - }, - 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) - } - } - }) - ] -}) -``` - -**Features:** -- Configurable TTL for found documents (`ttlSeconds`) -- Configurable TTL for negative caching (`notFoundTtlSeconds`) -- Graceful fallback to CDN if L2 cache fails -- Support for `waitUntil` in serverless environments -- Apollo Server integration auto-uses context cache if available diff --git a/deployment/CHANGELOG.md b/deployment/CHANGELOG.md index 7bab42754a8..f6c95d34895 100644 --- a/deployment/CHANGELOG.md +++ b/deployment/CHANGELOG.md @@ -1,5 +1,24 @@ # hive +## 8.14.1 + +### Patch Changes + +- [#7477](https://github.com/graphql-hive/console/pull/7477) + [`b90f215`](https://github.com/graphql-hive/console/commit/b90f215213996ac755caca853a91816350936303) + Thanks [@n1ru4l](https://github.com/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](https://github.com/graphql-hive/console/pull/7459) + [`0ce9c82`](https://github.com/graphql-hive/console/commit/0ce9c82b810fef311f3856bb90b2e2a1823a7101) + Thanks [@jdolle](https://github.com/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](https://github.com/graphql-hive/console/pull/7451) + [`bd4e36d`](https://github.com/graphql-hive/console/commit/bd4e36d4860c2ae0c2671fa713d0f445b47447d4) + Thanks [@jdolle](https://github.com/jdolle)! - Show diff on proposals editor + ## 8.14.0 ### Minor Changes diff --git a/deployment/package.json b/deployment/package.json index 5ec946f54e2..1cf95d23084 100644 --- a/deployment/package.json +++ b/deployment/package.json @@ -1,6 +1,6 @@ { "name": "hive", - "version": "8.14.0", + "version": "8.14.1", "private": true, "scripts": { "generate": "tsx generate.ts", diff --git a/packages/libraries/apollo/CHANGELOG.md b/packages/libraries/apollo/CHANGELOG.md index 3a417d70d4b..b48f7da1208 100644 --- a/packages/libraries/apollo/CHANGELOG.md +++ b/packages/libraries/apollo/CHANGELOG.md @@ -1,5 +1,70 @@ # @graphql-hive/apollo +## 0.47.0 + +### Minor Changes + +- [#7462](https://github.com/graphql-hive/console/pull/7462) + [`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d) + Thanks [@adambenhassen](https://github.com/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: + + - **Serverless environments**: Where in-memory cache is lost between invocations + - **Multi-instance deployments**: To share cached documents across server instances + - **Reducing CDN calls**: By caching documents in Redis or similar external caches + + The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN + + **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/', + accessToken: '' + }, + 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) + } + } + }) + ] + }) + ``` + + **Features:** + + - Configurable TTL for found documents (`ttlSeconds`) + - Configurable TTL for negative caching (`notFoundTtlSeconds`) + - Graceful fallback to CDN if L2 cache fails + - Support for `waitUntil` in serverless environments + - Apollo Server integration auto-uses context cache if available + +### Patch Changes + +- Updated dependencies + [[`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d)]: + - @graphql-hive/core@0.20.0 + ## 0.46.0 ### Minor Changes diff --git a/packages/libraries/apollo/package.json b/packages/libraries/apollo/package.json index 9b909361dec..467fa30cac9 100644 --- a/packages/libraries/apollo/package.json +++ b/packages/libraries/apollo/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-hive/apollo", - "version": "0.46.0", + "version": "0.47.0", "type": "module", "description": "GraphQL Hive + Apollo Server", "repository": { diff --git a/packages/libraries/apollo/src/version.ts b/packages/libraries/apollo/src/version.ts index b1c7d2f8fcb..80fcddf8bb4 100644 --- a/packages/libraries/apollo/src/version.ts +++ b/packages/libraries/apollo/src/version.ts @@ -1 +1 @@ -export const version = '0.46.0'; +export const version = '0.47.0'; diff --git a/packages/libraries/cli/CHANGELOG.md b/packages/libraries/cli/CHANGELOG.md index c63527f8e83..07efaae590c 100644 --- a/packages/libraries/cli/CHANGELOG.md +++ b/packages/libraries/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @graphql-hive/cli +## 0.57.1 + +### Patch Changes + +- Updated dependencies + [[`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d)]: + - @graphql-hive/core@0.20.0 + ## 0.57.0 ### Minor Changes diff --git a/packages/libraries/cli/README.md b/packages/libraries/cli/README.md index ad928752803..3cc6c8e2c5c 100644 --- a/packages/libraries/cli/README.md +++ b/packages/libraries/cli/README.md @@ -81,7 +81,7 @@ DESCRIPTION ``` _See code: -[src/commands/app/create.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/app/create.ts)_ +[src/commands/app/create.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/app/create.ts)_ ## `hive app:publish` @@ -108,7 +108,7 @@ DESCRIPTION ``` _See code: -[src/commands/app/publish.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/app/publish.ts)_ +[src/commands/app/publish.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/app/publish.ts)_ ## `hive app:retire` @@ -135,7 +135,7 @@ DESCRIPTION ``` _See code: -[src/commands/app/retire.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/app/retire.ts)_ +[src/commands/app/retire.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/app/retire.ts)_ ## `hive artifact:fetch` @@ -159,7 +159,7 @@ DESCRIPTION ``` _See code: -[src/commands/artifact/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/artifact/fetch.ts)_ +[src/commands/artifact/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/artifact/fetch.ts)_ ## `hive dev` @@ -202,7 +202,7 @@ DESCRIPTION ``` _See code: -[src/commands/dev.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/dev.ts)_ +[src/commands/dev.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/dev.ts)_ ## `hive help [COMMAND]` @@ -246,7 +246,7 @@ DESCRIPTION ``` _See code: -[src/commands/introspect.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/introspect.ts)_ +[src/commands/introspect.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/introspect.ts)_ ## `hive operations:check FILE` @@ -305,7 +305,7 @@ DESCRIPTION ``` _See code: -[src/commands/operations/check.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/operations/check.ts)_ +[src/commands/operations/check.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/operations/check.ts)_ ## `hive schema:check FILE` @@ -350,7 +350,7 @@ DESCRIPTION ``` _See code: -[src/commands/schema/check.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/schema/check.ts)_ +[src/commands/schema/check.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/schema/check.ts)_ ## `hive schema:delete SERVICE` @@ -382,7 +382,7 @@ DESCRIPTION ``` _See code: -[src/commands/schema/delete.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/schema/delete.ts)_ +[src/commands/schema/delete.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/schema/delete.ts)_ ## `hive schema:fetch [COMMIT]` @@ -415,7 +415,7 @@ DESCRIPTION ``` _See code: -[src/commands/schema/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/schema/fetch.ts)_ +[src/commands/schema/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/schema/fetch.ts)_ ## `hive schema:publish FILE` @@ -459,7 +459,7 @@ DESCRIPTION ``` _See code: -[src/commands/schema/publish.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/schema/publish.ts)_ +[src/commands/schema/publish.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/schema/publish.ts)_ ## `hive update [CHANNEL]` @@ -521,7 +521,7 @@ DESCRIPTION ``` _See code: -[src/commands/whoami.ts](https://github.com/graphql-hive/platform/blob/v0.57.0/src/commands/whoami.ts)_ +[src/commands/whoami.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/whoami.ts)_ diff --git a/packages/libraries/cli/package.json b/packages/libraries/cli/package.json index ce0401d22f5..6ef694de6fc 100644 --- a/packages/libraries/cli/package.json +++ b/packages/libraries/cli/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-hive/cli", - "version": "0.57.0", + "version": "0.57.1", "description": "A CLI util to manage and control your GraphQL Hive", "repository": { "type": "git", diff --git a/packages/libraries/core/CHANGELOG.md b/packages/libraries/core/CHANGELOG.md index 3ddcfa8d855..20334eca310 100644 --- a/packages/libraries/core/CHANGELOG.md +++ b/packages/libraries/core/CHANGELOG.md @@ -1,5 +1,64 @@ # @graphql-hive/core +## 0.20.0 + +### Minor Changes + +- [#7462](https://github.com/graphql-hive/console/pull/7462) + [`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d) + Thanks [@adambenhassen](https://github.com/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: + + - **Serverless environments**: Where in-memory cache is lost between invocations + - **Multi-instance deployments**: To share cached documents across server instances + - **Reducing CDN calls**: By caching documents in Redis or similar external caches + + The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN + + **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/', + accessToken: '' + }, + 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) + } + } + }) + ] + }) + ``` + + **Features:** + + - Configurable TTL for found documents (`ttlSeconds`) + - Configurable TTL for negative caching (`notFoundTtlSeconds`) + - Graceful fallback to CDN if L2 cache fails + - Support for `waitUntil` in serverless environments + - Apollo Server integration auto-uses context cache if available + ## 0.19.0 ### Minor Changes diff --git a/packages/libraries/core/package.json b/packages/libraries/core/package.json index 7cd7ccc8761..384a5e82c36 100644 --- a/packages/libraries/core/package.json +++ b/packages/libraries/core/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-hive/core", - "version": "0.19.0", + "version": "0.20.0", "type": "module", "repository": { "type": "git", diff --git a/packages/libraries/core/src/version.ts b/packages/libraries/core/src/version.ts index 12d368abbbc..1c5b9fd45d7 100644 --- a/packages/libraries/core/src/version.ts +++ b/packages/libraries/core/src/version.ts @@ -1 +1 @@ -export const version = '0.19.0'; +export const version = '0.20.0'; diff --git a/packages/libraries/envelop/CHANGELOG.md b/packages/libraries/envelop/CHANGELOG.md index 99485cfd729..fca53104dc1 100644 --- a/packages/libraries/envelop/CHANGELOG.md +++ b/packages/libraries/envelop/CHANGELOG.md @@ -1,5 +1,13 @@ # @graphql-hive/envelop +## 0.40.2 + +### Patch Changes + +- Updated dependencies + [[`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d)]: + - @graphql-hive/core@0.20.0 + ## 0.40.1 ### Patch Changes diff --git a/packages/libraries/envelop/package.json b/packages/libraries/envelop/package.json index 52cf0d90d0c..ea25df332bc 100644 --- a/packages/libraries/envelop/package.json +++ b/packages/libraries/envelop/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-hive/envelop", - "version": "0.40.1", + "version": "0.40.2", "type": "module", "description": "GraphQL Hive + GraphQL Envelop", "repository": { diff --git a/packages/libraries/envelop/src/version.ts b/packages/libraries/envelop/src/version.ts index 6f8fa4ff92c..d1778a38313 100644 --- a/packages/libraries/envelop/src/version.ts +++ b/packages/libraries/envelop/src/version.ts @@ -1 +1 @@ -export const version = '0.40.1'; +export const version = '0.40.2'; diff --git a/packages/libraries/router/CHANGELOG.md b/packages/libraries/router/CHANGELOG.md index cd6a7b02f58..0032d164e81 100644 --- a/packages/libraries/router/CHANGELOG.md +++ b/packages/libraries/router/CHANGELOG.md @@ -1,5 +1,41 @@ # 16.10.2024 +## 3.0.0 + +### Major Changes + +- [#7379](https://github.com/graphql-hive/console/pull/7379) + [`b134461`](https://github.com/graphql-hive/console/commit/b13446109d9663ccabef07995eb25cf9dff34f37) + Thanks [@ardatan](https://github.com/ardatan)! - - Multiple endpoints support for `HiveRegistry` + and `PersistedOperationsPlugin` + + Breaking Changes: + + - Now there is no `endpoint` field in the configuration, it has been replaced with `endpoints`, + which is an array of strings. You are not affected if you use environment variables to set the + endpoint. + + ```diff + HiveRegistry::new( + Some( + HiveRegistryConfig { + - endpoint: String::from("CDN_ENDPOINT"), + + endpoints: vec![String::from("CDN_ENDPOINT1"), String::from("CDN_ENDPOINT2")], + ) + ) + ``` + +### Patch Changes + +- [#7479](https://github.com/graphql-hive/console/pull/7479) + [`382b481`](https://github.com/graphql-hive/console/commit/382b481e980e588e3e6cf7831558b2d0811253f5) + Thanks [@ardatan](https://github.com/ardatan)! - Update dependencies + +- Updated dependencies + [[`b134461`](https://github.com/graphql-hive/console/commit/b13446109d9663ccabef07995eb25cf9dff34f37), + [`b134461`](https://github.com/graphql-hive/console/commit/b13446109d9663ccabef07995eb25cf9dff34f37)]: + - hive-console-sdk-rs@0.3.0 + ## 2.3.6 ### Patch Changes diff --git a/packages/libraries/router/Cargo.toml b/packages/libraries/router/Cargo.toml index 7569b261958..cde2273eed8 100644 --- a/packages/libraries/router/Cargo.toml +++ b/packages/libraries/router/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/graphql-hive/console/" edition = "2021" license = "MIT" publish = true -version = "2.3.6" +version = "3.0.0" description = "Apollo-Router Plugin for Hive" [[bin]] diff --git a/packages/libraries/router/package.json b/packages/libraries/router/package.json index 8a5c2e7fc2e..88e3d299b21 100644 --- a/packages/libraries/router/package.json +++ b/packages/libraries/router/package.json @@ -1,6 +1,6 @@ { "name": "hive-apollo-router-plugin", - "version": "2.3.6", + "version": "3.0.0", "private": true, "scripts": { "sync-cargo-file": "./sync-cargo-file.sh" diff --git a/packages/libraries/sdk-rs/CHANGELOG.md b/packages/libraries/sdk-rs/CHANGELOG.md index 359f79207e4..ded95cd2637 100644 --- a/packages/libraries/sdk-rs/CHANGELOG.md +++ b/packages/libraries/sdk-rs/CHANGELOG.md @@ -1,5 +1,93 @@ # hive-console-sdk-rs +## 0.3.0 + +### Minor Changes + +- [#7379](https://github.com/graphql-hive/console/pull/7379) + [`b134461`](https://github.com/graphql-hive/console/commit/b13446109d9663ccabef07995eb25cf9dff34f37) + Thanks [@ardatan](https://github.com/ardatan)! - Breaking Changes to avoid future breaking + changes; + + Switch to [Builder](https://rust-unofficial.github.io/patterns/patterns/creational/builder.html) + pattern for `SupergraphFetcher`, `PersistedDocumentsManager` and `UsageAgent` structs. + + No more `try_new` or `try_new_async` or `try_new_sync` functions, instead use + `SupergraphFetcherBuilder`, `PersistedDocumentsManagerBuilder` and `UsageAgentBuilder` structs to + create instances. + + Benefits; + + - No need to provide all parameters at once when creating an instance even for default values. + + Example; + + ```rust + // Before + let fetcher = SupergraphFetcher::try_new_async( + "SOME_ENDPOINT", // endpoint + "SOME_KEY", + "MyUserAgent/1.0".to_string(), + Duration::from_secs(5), // connect_timeout + Duration::from_secs(10), // request_timeout + false, // accept_invalid_certs + 3, // retry_count + )?; + + // After + // No need to provide all parameters at once, can use default values + let fetcher = SupergraphFetcherBuilder::new() + .endpoint("SOME_ENDPOINT".to_string()) + .key("SOME_KEY".to_string()) + .build_async()?; + ``` + + - Easier to add new configuration options in the future without breaking existing code. + + Example; + + ```rust + let fetcher = SupergraphFetcher::try_new_async( + "SOME_ENDPOINT", // endpoint + "SOME_KEY", + "MyUserAgent/1.0".to_string(), + Duration::from_secs(5), // connect_timeout + Duration::from_secs(10), // request_timeout + false, // accept_invalid_certs + 3, // retry_count + circuit_breaker_config, // Breaking Change -> new parameter added + )?; + + let fetcher = SupergraphFetcherBuilder::new() + .endpoint("SOME_ENDPOINT".to_string()) + .key("SOME_KEY".to_string()) + .build_async()?; // No breaking change, circuit_breaker_config can be added later if needed + ``` + +### Patch Changes + +- [#7379](https://github.com/graphql-hive/console/pull/7379) + [`b134461`](https://github.com/graphql-hive/console/commit/b13446109d9663ccabef07995eb25cf9dff34f37) + Thanks [@ardatan](https://github.com/ardatan)! - Circuit Breaker Implementation and Multiple + Endpoints Support + + Implementation of Circuit Breakers in Hive Console Rust SDK, you can learn more + [here](https://the-guild.dev/graphql/hive/product-updates/2025-12-04-cdn-mirror-and-circuit-breaker) + + Breaking Changes: + + Now `endpoint` configuration accepts multiple endpoints as an array for `SupergraphFetcherBuilder` + and `PersistedDocumentsManager`. + + ```diff + SupergraphFetcherBuilder::default() + - .endpoint(endpoint) + + .add_endpoint(endpoint1) + + .add_endpoint(endpoint2) + ``` + + This change requires updating the configuration structure to accommodate multiple endpoints. + ## 0.2.3 ### Patch Changes diff --git a/packages/libraries/sdk-rs/Cargo.toml b/packages/libraries/sdk-rs/Cargo.toml index f75437ec7b5..b828b5fa53a 100644 --- a/packages/libraries/sdk-rs/Cargo.toml +++ b/packages/libraries/sdk-rs/Cargo.toml @@ -4,7 +4,7 @@ repository = "https://github.com/graphql-hive/console/" edition = "2021" license = "MIT" publish = true -version = "0.2.3" +version = "0.3.0" description = "Rust SDK for Hive Console" [lib] diff --git a/packages/libraries/sdk-rs/package.json b/packages/libraries/sdk-rs/package.json index 4a7ede6fb18..18b3ab55fd0 100644 --- a/packages/libraries/sdk-rs/package.json +++ b/packages/libraries/sdk-rs/package.json @@ -1,6 +1,6 @@ { "name": "hive-console-sdk-rs", - "version": "0.2.3", + "version": "0.3.0", "private": true, "scripts": { "sync-cargo-file": "./sync-cargo-file.sh" diff --git a/packages/libraries/yoga/CHANGELOG.md b/packages/libraries/yoga/CHANGELOG.md index b443b0367c8..161caf88f3f 100644 --- a/packages/libraries/yoga/CHANGELOG.md +++ b/packages/libraries/yoga/CHANGELOG.md @@ -1,5 +1,70 @@ # @graphql-hive/yoga +## 0.47.0 + +### Minor Changes + +- [#7462](https://github.com/graphql-hive/console/pull/7462) + [`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d) + Thanks [@adambenhassen](https://github.com/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: + + - **Serverless environments**: Where in-memory cache is lost between invocations + - **Multi-instance deployments**: To share cached documents across server instances + - **Reducing CDN calls**: By caching documents in Redis or similar external caches + + The lookup flow is: L1 (memory) -> L2 (Redis/external) -> CDN + + **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/', + accessToken: '' + }, + 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) + } + } + }) + ] + }) + ``` + + **Features:** + + - Configurable TTL for found documents (`ttlSeconds`) + - Configurable TTL for negative caching (`notFoundTtlSeconds`) + - Graceful fallback to CDN if L2 cache fails + - Support for `waitUntil` in serverless environments + - Apollo Server integration auto-uses context cache if available + +### Patch Changes + +- Updated dependencies + [[`60133a4`](https://github.com/graphql-hive/console/commit/60133a41a684a0c1b1a45d47cf3cd30cc804c19d)]: + - @graphql-hive/core@0.20.0 + ## 0.46.1 ### Patch Changes diff --git a/packages/libraries/yoga/package.json b/packages/libraries/yoga/package.json index f0d8368baff..3d5d5efd273 100644 --- a/packages/libraries/yoga/package.json +++ b/packages/libraries/yoga/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-hive/yoga", - "version": "0.46.1", + "version": "0.47.0", "type": "module", "description": "GraphQL Hive + GraphQL Yoga", "repository": { diff --git a/packages/libraries/yoga/src/version.ts b/packages/libraries/yoga/src/version.ts index 9f4cf4d31fb..80fcddf8bb4 100644 --- a/packages/libraries/yoga/src/version.ts +++ b/packages/libraries/yoga/src/version.ts @@ -1 +1 @@ -export const version = '0.46.1'; +export const version = '0.47.0';