@graphql-tools/federation
Version:
Useful tools to create and manipulate GraphQL schemas.
829 lines (566 loc) • 113 kB
Markdown
# @graphql-tools/federation
## 4.4.3
### Patch Changes
- [#2346](https://github.com/graphql-hive/gateway/pull/2346) [`eeebc74`](https://github.com/graphql-hive/gateway/commit/eeebc74a1619f5f0ccc339dd3e4429c8976bdd39) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fix `@requires` argument conflict when multiple computed fields in a federation subgraph require the same external field with different argument values (e.g. `price(currency: "USD")` vs `price(currency: "EUR")`).
Previously, all `@requires` selections for computed fields in a subgraph were merged into a single entity representation. When two computed fields needed the same external field but with different argument values, the stitching engine would alias each field differently — but both aliases ended up in the same representation object. The second field would overwrite the first, so one of the computed fields would always receive the wrong value.
**What changed:**
- **Computed field conflict detection** — when building subschema merge configs from the supergraph SDL, the federation stitching layer now detects conflicts: two computed fields conflict when they produce the same top-level aliased field name in their `@requires` selections but with different aliases (i.e. the same external field required with different argument values).
- **Conflict group isolation** — conflicting computed fields are separated into independent "conflict groups". Each group gets its own `SubschemaConfig` (sharing the same underlying executor/endpoint) with only its own computed fields and a deduplicated entity representation that carries only the aliased fields it actually needs. This ensures each group sends the correct representation to the subgraph and receives the right data back.
- **Schema scoping per group** — the main `SubschemaConfig`'s schema is filtered (via `mapSchema`) to remove computed fields that were moved to a conflict group, preventing the stitching engine from incorrectly routing those fields back to the main subschema. Each conflict group's `SubschemaConfig` is likewise scoped to expose only its own computed fields.
- **`getMergedTypeConfigFromKey` extended** — accepts an optional `keysExtraKeys` parameter so each conflict group can inject its own `extraKeys` set when building entity key functions, keeping key generation independent per group.
- **Federation audit test enabled** — the `requires-with-argument-conflict` case in the federation compatibility test suite was previously skipped for stitching (marked `it.todo`). It now passes and the skip has been removed.
## 4.4.2
### Patch Changes
- Updated dependencies [[`0f8706c`](https://github.com/graphql-hive/gateway/commit/0f8706c54556669148de1bf74725cc8c896e5ced)]:
- @graphql-tools/executor-http@3.3.0
## 4.4.1
### Patch Changes
- Updated dependencies [[`deafdc0`](https://github.com/graphql-hive/gateway/commit/deafdc00e388ed195c2cdf77e98cd19e7d496d48)]:
- @graphql-tools/delegate@12.0.16
- @graphql-tools/stitch@10.1.19
- @graphql-tools/wrap@11.1.15
## 4.4.0
### Minor Changes
- [#2281](https://github.com/graphql-hive/gateway/pull/2281) [`4db5afa`](https://github.com/graphql-hive/gateway/commit/4db5afadfc3703d7f0228140f5297ed1c99df967) Thanks [@ardatan](https://github.com/ardatan)! - Support aliases in directive imports correctly specifically for `@source` of Mesh to distinguish it from Apollo's connector `@source` directive.
- [#2294](https://github.com/graphql-hive/gateway/pull/2294) [`8ffdc33`](https://github.com/graphql-hive/gateway/commit/8ffdc3360ca3e9274625c50b2fb1d41d307ecc70) Thanks [@ardatan](https://github.com/ardatan)! - Support `@join__directive` while extracting subgraph definitions from the supergraph
For example;
```graphql
type Query @join__type(graph: PRODUCTS) {
products: [Product]
@join__field(graph: PRODUCTS)
@join__directive(
graphs: [PRODUCTS]
name: "connect"
args: {
source: "ecomm"
http: { GET: "/products" }
selection: "$.products {\n id\n name\n description\n}"
}
)
}
```
should extract `products` subgraph as;
```graphql
type Query {
products: @connect(
source: "ecomm"
http: { GET: "/products" }
selection: """
$.products {
id
name
description
}
"""
)
}
```
Same goes to the schema definition level directives;
```graphql
schema
@join__directive(
graphs: [PRODUCTS]
name: "link"
args: {
url: "https://specs.apollo.dev/connect/v0.2"
import: ["@connect", "@source"]
}
)
@join__directive(
graphs: [PRODUCTS]
name: "source"
args: {
name: "ecomm"
http: { baseURL: "https://ecommerce.demo-api.apollo.dev/", headers: [] }
}
) {
query: Query
}
```
should be extracted as;
```graphql
extend schema
@link( # Enable this schema to use Apollo Connectors
url: "https://specs.apollo.dev/connect/v0.2"
import: ["@connect", "@source"]
)
@source(
name: "ecomm"
# A @source directive defines a shared data source for multiple Connectors.
http: {
baseURL: "https://ecommerce.demo-api.apollo.dev/"
headers: [
# If your API requires headers, add them here and in your router.yaml file.
# Example:
# { name: "name", value: "{$config.apiKey}" }
]
}
)
```
## 4.3.7
### Patch Changes
- Updated dependencies [[`dff525f`](https://github.com/graphql-hive/gateway/commit/dff525f214d3525434c5a73a5b3fb22c46550163)]:
- @graphql-tools/delegate@12.0.14
- @graphql-tools/stitch@10.1.18
- @graphql-tools/wrap@11.1.14
## 4.3.6
### Patch Changes
- Updated dependencies [[`786e06f`](https://github.com/graphql-hive/gateway/commit/786e06f4e3d74c76a7274bbbc69100a7d30549e6)]:
- @graphql-tools/executor-http@3.2.1
## 4.3.5
### Patch Changes
- Updated dependencies [[`59ef8f7`](https://github.com/graphql-hive/gateway/commit/59ef8f733d4fced3416bc95d323f00fb46e69b95)]:
- @graphql-tools/executor-http@3.2.0
- @graphql-tools/delegate@12.0.13
- @graphql-tools/stitch@10.1.17
- @graphql-tools/wrap@11.1.13
## 4.3.4
### Patch Changes
- Updated dependencies [[`f9d2f0e`](https://github.com/graphql-hive/gateway/commit/f9d2f0ea9e7f172b8270c17961a98bc52a7ba49d)]:
- @graphql-tools/executor-http@3.1.4
## 4.3.3
### Patch Changes
- Updated dependencies [[`323626f`](https://github.com/graphql-hive/gateway/commit/323626ff877f50e509e45cc56ce82602d5118a1d)]:
- @graphql-tools/executor-http@3.1.3
## 4.3.2
### Patch Changes
- Updated dependencies [[`f85a9fe`](https://github.com/graphql-hive/gateway/commit/f85a9fe11dc88a7fa8397c5372ef24f9e91b638e)]:
- @graphql-tools/executor-http@3.1.2
## 4.3.1
### Patch Changes
- [#2106](https://github.com/graphql-hive/gateway/pull/2106) [`da68d27`](https://github.com/graphql-hive/gateway/commit/da68d2710dff1f8bca5b17bcd5368e631f72114e) Thanks [@ardatan](https://github.com/ardatan)! - - Optimizations to select ONLY required fields when fetching the missing fields from other subgraphs
- Do not try to resolve types from the subschemas which only have the stub types, for example if a subgraph only has `id` field as a stub, do not use that subgraph as a target subgraph for resolving the type, because it will not have any other fields than `id`.
- Updated dependencies [[`da68d27`](https://github.com/graphql-hive/gateway/commit/da68d2710dff1f8bca5b17bcd5368e631f72114e)]:
- @graphql-tools/delegate@12.0.12
- @graphql-tools/stitch@10.1.16
- @graphql-tools/wrap@11.1.12
## 4.3.0
### Minor Changes
- [#2096](https://github.com/graphql-hive/gateway/pull/2096) [`4e626d4`](https://github.com/graphql-hive/gateway/commit/4e626d4cd2f1a6050a30b1219f5b5408ff56b3a6) Thanks [@ardatan](https://github.com/ardatan)! - Progressive Override Support in Rust QP Runtime
### Patch Changes
- Updated dependencies []:
- @graphql-tools/delegate@12.0.11
- @graphql-tools/stitch@10.1.15
- @graphql-tools/wrap@11.1.11
## 4.2.14
### Patch Changes
- Updated dependencies [[`dae3fe4`](https://github.com/graphql-hive/gateway/commit/dae3fe4fbb9c78598d1bbf91c2ed07ab1b90f05d)]:
- @graphql-tools/executor-http@3.1.1
- @graphql-tools/wrap@11.1.10
- @graphql-tools/delegate@12.0.10
- @graphql-tools/stitch@10.1.14
## 4.2.13
### Patch Changes
- Updated dependencies [[`43aaa6a`](https://github.com/graphql-hive/gateway/commit/43aaa6ab8c1c64cae92e9cdff7016ebdf1afa756)]:
- @graphql-tools/delegate@12.0.9
- @graphql-tools/stitch@10.1.13
- @graphql-tools/wrap@11.1.9
## 4.2.12
### Patch Changes
- Updated dependencies [[`4065b7f`](https://github.com/graphql-hive/gateway/commit/4065b7fbb08d9e75c5f0d3b2b4d42d665aa9dbd9)]:
- @graphql-tools/delegate@12.0.8
- @graphql-tools/stitch@10.1.12
- @graphql-tools/wrap@11.1.8
## 4.2.11
### Patch Changes
- Updated dependencies [[`584a293`](https://github.com/graphql-hive/gateway/commit/584a293e3dafa7cd2d0210f80299c81b6707bcd4)]:
- @graphql-tools/delegate@12.0.7
- @graphql-tools/stitch@10.1.11
- @graphql-tools/wrap@11.1.7
## 4.2.10
### Patch Changes
- [#1916](https://github.com/graphql-hive/gateway/pull/1916) [`2200fc3`](https://github.com/graphql-hive/gateway/commit/2200fc3e9b94db77a642835bbf2d646c65b3e8d0) Thanks [@ardatan](https://github.com/ardatan)! - - Handle the type merging order correctly with custom labels and percentage labels for progressive override
- Do not pass `percent(x)` labels to the progressive override handler
- Apply progressive override to the shared root fields
- Updated dependencies [[`2200fc3`](https://github.com/graphql-hive/gateway/commit/2200fc3e9b94db77a642835bbf2d646c65b3e8d0)]:
- @graphql-tools/delegate@12.0.6
- @graphql-tools/stitch@10.1.10
- @graphql-tools/wrap@11.1.6
## 4.2.9
### Patch Changes
- Updated dependencies [[`e92c5a9`](https://github.com/graphql-hive/gateway/commit/e92c5a9702a2aea395a4a4e3a482b92f528655e8)]:
- @graphql-tools/delegate@12.0.5
- @graphql-tools/stitch@10.1.9
- @graphql-tools/wrap@11.1.5
## 4.2.8
### Patch Changes
- [#1842](https://github.com/graphql-hive/gateway/pull/1842) [`93aa767`](https://github.com/graphql-hive/gateway/commit/93aa76755afc93085280646fb7cb14e6d02b4a7f) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@graphql-tools/utils@^11.0.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/11.0.0) (from `^10.10.3`, in `dependencies`)
- Updated dependencies [[`93aa767`](https://github.com/graphql-hive/gateway/commit/93aa76755afc93085280646fb7cb14e6d02b4a7f), [`93aa767`](https://github.com/graphql-hive/gateway/commit/93aa76755afc93085280646fb7cb14e6d02b4a7f), [`93aa767`](https://github.com/graphql-hive/gateway/commit/93aa76755afc93085280646fb7cb14e6d02b4a7f), [`93aa767`](https://github.com/graphql-hive/gateway/commit/93aa76755afc93085280646fb7cb14e6d02b4a7f), [`9f29d58`](https://github.com/graphql-hive/gateway/commit/9f29d587946383482ad55924fe49b9e7804f48a3)]:
- @graphql-tools/delegate@12.0.4
- @graphql-tools/executor-http@3.1.0
- @graphql-tools/stitch@10.1.8
- @graphql-tools/wrap@11.1.4
## 4.2.7
### Patch Changes
- Updated dependencies [[`dcd8f0e`](https://github.com/graphql-hive/gateway/commit/dcd8f0e93fd220cb99f79cadea759ea49bc15308)]:
- @graphql-tools/delegate@12.0.3
- @graphql-tools/stitch@10.1.7
- @graphql-tools/wrap@11.1.3
## 4.2.6
### Patch Changes
- Updated dependencies [[`da8b8e3`](https://github.com/graphql-hive/gateway/commit/da8b8e3f3545487249b11c6577e3889f68527249)]:
- @graphql-tools/delegate@12.0.2
- @graphql-tools/stitch@10.1.6
- @graphql-tools/wrap@11.1.2
## 4.2.5
### Patch Changes
- Updated dependencies [[`0d14faf`](https://github.com/graphql-hive/gateway/commit/0d14fafdbaf3fb27eef123016ef2ca977d6688d8)]:
- @graphql-tools/delegate@12.0.1
- @graphql-tools/stitch@10.1.5
- @graphql-tools/wrap@11.1.1
## 4.2.4
### Patch Changes
- Updated dependencies [[`55173a5`](https://github.com/graphql-hive/gateway/commit/55173a55344a07fdf9531efcbaa4cb142fff655e), [`bc6cddd`](https://github.com/graphql-hive/gateway/commit/bc6cddd1c53a012dd02a1d8a7217a28e65cc6ae9), [`1dbc653`](https://github.com/graphql-hive/gateway/commit/1dbc6536cb992a705cac7894acca6fe5431b72de), [`bc6cddd`](https://github.com/graphql-hive/gateway/commit/bc6cddd1c53a012dd02a1d8a7217a28e65cc6ae9), [`b520eb2`](https://github.com/graphql-hive/gateway/commit/b520eb2309f627578519826d6b9e0056252c6c46)]:
- @graphql-tools/stitch@10.1.4
- @graphql-tools/wrap@11.1.0
- @graphql-tools/delegate@12.0.0
## 4.2.3
### Patch Changes
- [#1684](https://github.com/graphql-hive/gateway/pull/1684) [`478d7e2`](https://github.com/graphql-hive/gateway/commit/478d7e25ef47fb8fb6183010a8bb61ac31688c55) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.13` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.13) (from `^0.10.12`, in `dependencies`)
- [#1691](https://github.com/graphql-hive/gateway/pull/1691) [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.4.13` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.13) (from `^1.4.11`, in `dependencies`)
- Updated dependency [`@graphql-tools/merge@^9.1.5` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.5) (from `^9.1.3`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.29` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.29) (from `^10.0.27`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.10.3` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.3) (from `^10.10.1`, in `dependencies`)
- Updated dependencies [[`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`478d7e2`](https://github.com/graphql-hive/gateway/commit/478d7e25ef47fb8fb6183010a8bb61ac31688c55), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`2993f24`](https://github.com/graphql-hive/gateway/commit/2993f24f8e46853c0d2667c0cd2bf96190f3a2b2)]:
- @graphql-tools/delegate@11.1.3
- @graphql-tools/executor-http@3.0.7
- @graphql-tools/stitch@10.1.3
- @graphql-tools/wrap@11.0.5
## 4.2.2
### Patch Changes
- [#1608](https://github.com/graphql-hive/gateway/pull/1608) [`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.4.11` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.11) (from `^1.4.9`, in `dependencies`)
- Updated dependency [`@graphql-tools/merge@^9.1.3` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.3) (from `^9.1.1`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.27` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.27) (from `^10.0.25`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.10.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.1) (from `^10.9.1`, in `dependencies`)
- Updated dependency [`@whatwg-node/fetch@^0.10.12` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.12) (from `^0.10.11`, in `dependencies`)
- [#1662](https://github.com/graphql-hive/gateway/pull/1662) [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@graphql-tools/utils@^10.10.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.1) (from `^10.10.0`, in `dependencies`)
- Updated dependency [`@whatwg-node/fetch@^0.10.12` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.12) (from `^0.10.11`, in `dependencies`)
- [#1663](https://github.com/graphql-hive/gateway/pull/1663) [`d678113`](https://github.com/graphql-hive/gateway/commit/d678113debfe28095ed6e09c2abba4451a42608a) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.4.11` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.11) (from `^1.4.10`, in `dependencies`)
- Updated dependency [`@graphql-tools/merge@^9.1.3` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.3) (from `^9.1.2`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.27` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.27) (from `^10.0.26`, in `dependencies`)
- Updated dependencies [[`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea), [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff), [`d678113`](https://github.com/graphql-hive/gateway/commit/d678113debfe28095ed6e09c2abba4451a42608a), [`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea), [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff), [`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea), [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff), [`d678113`](https://github.com/graphql-hive/gateway/commit/d678113debfe28095ed6e09c2abba4451a42608a), [`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea), [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff), [`d678113`](https://github.com/graphql-hive/gateway/commit/d678113debfe28095ed6e09c2abba4451a42608a), [`c754a96`](https://github.com/graphql-hive/gateway/commit/c754a96d49ea69f54f57a8f1b01baf9d2fb947b6)]:
- @graphql-tools/delegate@11.1.2
- @graphql-tools/executor-http@3.0.6
- @graphql-tools/stitch@10.1.2
- @graphql-tools/wrap@11.0.4
## 4.2.1
### Patch Changes
- [#1654](https://github.com/graphql-hive/gateway/pull/1654) [`efed5e0`](https://github.com/graphql-hive/gateway/commit/efed5e0c257edcacb51dae7f670c2026a747a851) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.4.10` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.10) (from `^1.4.9`, in `dependencies`)
- Updated dependency [`@graphql-tools/merge@^9.1.2` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.2) (from `^9.1.1`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.26` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.26) (from `^10.0.25`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.10.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.0) (from `^10.9.1`, in `dependencies`)
- Updated dependencies [[`efed5e0`](https://github.com/graphql-hive/gateway/commit/efed5e0c257edcacb51dae7f670c2026a747a851), [`efed5e0`](https://github.com/graphql-hive/gateway/commit/efed5e0c257edcacb51dae7f670c2026a747a851), [`efed5e0`](https://github.com/graphql-hive/gateway/commit/efed5e0c257edcacb51dae7f670c2026a747a851), [`efed5e0`](https://github.com/graphql-hive/gateway/commit/efed5e0c257edcacb51dae7f670c2026a747a851), [`3226919`](https://github.com/graphql-hive/gateway/commit/3226919d58930289491696fa3b56ed85c766e3f5)]:
- @graphql-tools/delegate@11.1.1
- @graphql-tools/executor-http@3.0.5
- @graphql-tools/stitch@10.1.1
- @graphql-tools/wrap@11.0.3
## 4.2.0
### Minor Changes
- [#1642](https://github.com/graphql-hive/gateway/pull/1642) [`af7a7de`](https://github.com/graphql-hive/gateway/commit/af7a7de0ebd81a5b41702052a3ddf466f5d84437) Thanks [@ardatan](https://github.com/ardatan)! - Support promises in `progressiveOverride` option
```ts
import { defineConfig } from '@graphql-hive/gateway';
export const gatewayConfig = defineConfig({
async progressiveOverride(label: string, context: GatewayContext) {
if (label === 'my_label') {
const serviceResponse = await fetch('http://example.com/should_override', {
headers: {
'x-some-header': context.headers['x-some-header'],
}
});
const result = await serviceResponse.json();
return result?.override;
}
return false;
}
})
```
## 4.1.0
### Minor Changes
- [#1624](https://github.com/graphql-hive/gateway/pull/1624) [`a8458b2`](https://github.com/graphql-hive/gateway/commit/a8458b24e71fda37a515eaf9ac9af43a73e7823f) Thanks [@ardatan](https://github.com/ardatan)! - Progressive Override for Safer Field Migrations
Introduces Progressive Override, allowing you to safely migrate fields between subgraphs using the `@override` directive with a label. Control the rollout using custom logic in the gateway (e.g., percentage, headers) or the built-in percent(x) label for gradual, incremental traffic migration.
Detailed documentation can be found [here](https://the-guild.dev/graphql/hive/docs/gateway/other-features/progressive-override).
### Patch Changes
- [#1588](https://github.com/graphql-hive/gateway/pull/1588) [`20f7a50`](https://github.com/graphql-hive/gateway/commit/20f7a50c5ddb862c2921e91ca43d9858bae1bce8) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Correctly resolve circular @requires in different subgraphs
- Updated dependencies [[`a54b0c1`](https://github.com/graphql-hive/gateway/commit/a54b0c1777229aaeea295bcd15d4f4d6e4e615f7), [`058ef2f`](https://github.com/graphql-hive/gateway/commit/058ef2f8373ea822fed985b705416cb39d5b6efc), [`a8458b2`](https://github.com/graphql-hive/gateway/commit/a8458b24e71fda37a515eaf9ac9af43a73e7823f), [`20f7a50`](https://github.com/graphql-hive/gateway/commit/20f7a50c5ddb862c2921e91ca43d9858bae1bce8)]:
- @graphql-tools/delegate@11.1.0
- @graphql-tools/stitch@10.1.0
- @graphql-tools/wrap@11.0.2
## 4.0.5
### Patch Changes
- [#1542](https://github.com/graphql-hive/gateway/pull/1542) [`0a349fb`](https://github.com/graphql-hive/gateway/commit/0a349fbfd52eaf8a2b21c9669871c916d41b840f) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.11` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.11) (from `^0.10.10`, in `dependencies`)
- Updated dependencies [[`0a349fb`](https://github.com/graphql-hive/gateway/commit/0a349fbfd52eaf8a2b21c9669871c916d41b840f), [`818461e`](https://github.com/graphql-hive/gateway/commit/818461e6ea55bb10ba4ead9ed214848e1ba4bfd2)]:
- @graphql-tools/executor-http@3.0.4
- @graphql-tools/stitch@10.0.2
## 4.0.4
### Patch Changes
- [#1533](https://github.com/graphql-hive/gateway/pull/1533) [`a6a3d4d`](https://github.com/graphql-hive/gateway/commit/a6a3d4d0ffba9d73a5151c747c281c25d0d26954) Thanks [@ardatan](https://github.com/ardatan)! - Fix shared root handling in case of heavily nested selections
## 4.0.3
### Patch Changes
- [#1522](https://github.com/graphql-hive/gateway/pull/1522) [`e64a4e1`](https://github.com/graphql-hive/gateway/commit/e64a4e11db66be8bd9c3728eca1ac3d7d97c7d0e) Thanks [@ardatan](https://github.com/ardatan)! - Revert an extra memoization
- Updated dependencies []:
- @graphql-tools/executor-http@3.0.3
## 4.0.2
### Patch Changes
- [#1473](https://github.com/graphql-hive/gateway/pull/1473) [`838ffec`](https://github.com/graphql-hive/gateway/commit/838ffecb2ad3d4ef6bbb65607a56302cb45e2f14) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@whatwg-node/promise-helpers@^1.3.2` ↗︎](https://www.npmjs.com/package/@whatwg-node/promise-helpers/v/1.3.2) (from `^1.3.0`, in `dependencies`)
- Updated dependencies [[`838ffec`](https://github.com/graphql-hive/gateway/commit/838ffecb2ad3d4ef6bbb65607a56302cb45e2f14), [`838ffec`](https://github.com/graphql-hive/gateway/commit/838ffecb2ad3d4ef6bbb65607a56302cb45e2f14), [`fe99f74`](https://github.com/graphql-hive/gateway/commit/fe99f74dd11fdf2928ca7080d4d2e5dfd1e2f18e), [`838ffec`](https://github.com/graphql-hive/gateway/commit/838ffecb2ad3d4ef6bbb65607a56302cb45e2f14), [`838ffec`](https://github.com/graphql-hive/gateway/commit/838ffecb2ad3d4ef6bbb65607a56302cb45e2f14)]:
- @graphql-tools/delegate@11.0.1
- @graphql-tools/executor-http@3.0.2
- @graphql-tools/stitch@10.0.1
- @graphql-tools/wrap@11.0.1
## 4.0.1
### Patch Changes
- Updated dependencies []:
- @graphql-tools/executor-http@3.0.1
## 4.0.0
### Major Changes
- [#956](https://github.com/graphql-hive/gateway/pull/956) [`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Drop Node 18 support
Least supported Node version is now v20.
### Patch Changes
- [#956](https://github.com/graphql-hive/gateway/pull/956) [`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Inflight request deduplication
- Updated dependencies [[`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a), [`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a), [`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a), [`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a)]:
- @graphql-tools/executor-http@3.0.0
- @graphql-tools/delegate@11.0.0
- @graphql-tools/stitch@10.0.0
- @graphql-tools/wrap@11.0.0
## 3.2.9
### Patch Changes
- [#1411](https://github.com/graphql-hive/gateway/pull/1411) [`37113d1`](https://github.com/graphql-hive/gateway/commit/37113d1a446748fd83da9823e27a0f56872317df) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.10` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.10) (from `^0.10.9`, in `dependencies`)
- Updated dependencies [[`37113d1`](https://github.com/graphql-hive/gateway/commit/37113d1a446748fd83da9823e27a0f56872317df)]:
- @graphql-tools/executor-http@2.1.2
## 3.2.8
### Patch Changes
- [#1358](https://github.com/graphql-hive/gateway/pull/1358) [`8e37851`](https://github.com/graphql-hive/gateway/commit/8e3785194d97edbe82c7fce316104b81bb0362f1) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.4.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.9) (from `^1.4.8`, in `dependencies`)
- Updated dependency [`@graphql-tools/merge@^9.1.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.1) (from `^9.1.0`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.25` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.25) (from `^10.0.24`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.9.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.9.1) (from `^10.9.0`, in `dependencies`)
- Updated dependencies [[`8e37851`](https://github.com/graphql-hive/gateway/commit/8e3785194d97edbe82c7fce316104b81bb0362f1), [`8e37851`](https://github.com/graphql-hive/gateway/commit/8e3785194d97edbe82c7fce316104b81bb0362f1), [`8e37851`](https://github.com/graphql-hive/gateway/commit/8e3785194d97edbe82c7fce316104b81bb0362f1), [`8e37851`](https://github.com/graphql-hive/gateway/commit/8e3785194d97edbe82c7fce316104b81bb0362f1)]:
- @graphql-tools/delegate@10.2.23
- @graphql-tools/executor-http@2.1.1
- @graphql-tools/stitch@9.4.28
- @graphql-tools/wrap@10.1.4
## 3.2.7
### Patch Changes
- [#1318](https://github.com/graphql-hive/gateway/pull/1318) [`7dafdeb`](https://github.com/graphql-hive/gateway/commit/7dafdebc803e49373fe9d53997113483e512fdb0) Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
- Updated dependency [`@graphql-yoga/typed-event-target@^3.0.2` ↗︎](https://www.npmjs.com/package/@graphql-yoga/typed-event-target/v/3.0.2) (from `^3.0.1`, in `dependencies`)
- [#1338](https://github.com/graphql-hive/gateway/pull/1338) [`7287ffa`](https://github.com/graphql-hive/gateway/commit/7287ffa2ac0f08801c3058e96a7c4eba7102c1d0) Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.9` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.9) (from `^0.10.8`, in `dependencies`)
- [#1344](https://github.com/graphql-hive/gateway/pull/1344) [`a71236d`](https://github.com/graphql-hive/gateway/commit/a71236d6ba356741bc85fe27757bea45576dcf1a) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.4.8` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.8) (from `^1.4.7`, in `dependencies`)
- Updated dependency [`@graphql-tools/merge@^9.1.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.0) (from `^9.0.12`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.24` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.24) (from `^10.0.11`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.9.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.9.0) (from `^10.8.1`, in `dependencies`)
- [#1333](https://github.com/graphql-hive/gateway/pull/1333) [`ffa3753`](https://github.com/graphql-hive/gateway/commit/ffa3753ccb9045c5b2d62af05edc7f1d78336cb3) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Isomorphic environment variable getter with truthy value parsing
- Updated dependencies [[`a71236d`](https://github.com/graphql-hive/gateway/commit/a71236d6ba356741bc85fe27757bea45576dcf1a), [`7287ffa`](https://github.com/graphql-hive/gateway/commit/7287ffa2ac0f08801c3058e96a7c4eba7102c1d0), [`a71236d`](https://github.com/graphql-hive/gateway/commit/a71236d6ba356741bc85fe27757bea45576dcf1a), [`a71236d`](https://github.com/graphql-hive/gateway/commit/a71236d6ba356741bc85fe27757bea45576dcf1a), [`a71236d`](https://github.com/graphql-hive/gateway/commit/a71236d6ba356741bc85fe27757bea45576dcf1a), [`b59a266`](https://github.com/graphql-hive/gateway/commit/b59a26628c368272b50380bab57553070e2edf6e)]:
- @graphql-tools/delegate@10.2.22
- @graphql-tools/executor-http@2.1.0
- @graphql-tools/stitch@9.4.27
- @graphql-tools/wrap@10.1.3
## 3.2.6
### Patch Changes
- Updated dependencies [[`b69c80b`](https://github.com/graphql-hive/gateway/commit/b69c80b259bd0565eb9826f7ee9bc8e6c32076d1)]:
- @graphql-tools/delegate@10.2.21
- @graphql-tools/stitch@9.4.26
- @graphql-tools/wrap@10.1.2
## 3.2.5
### Patch Changes
- Updated dependencies [[`0655d1f`](https://github.com/graphql-hive/gateway/commit/0655d1fc604179b6cc0c148d73e38d6e8d839c56), [`0655d1f`](https://github.com/graphql-hive/gateway/commit/0655d1fc604179b6cc0c148d73e38d6e8d839c56), [`0655d1f`](https://github.com/graphql-hive/gateway/commit/0655d1fc604179b6cc0c148d73e38d6e8d839c56)]:
- @graphql-tools/delegate@10.2.20
- @graphql-tools/stitch@9.4.25
- @graphql-tools/wrap@10.1.1
## 3.2.4
### Patch Changes
- Updated dependencies [[`ed323fa`](https://github.com/graphql-hive/gateway/commit/ed323fa06d196c1df128a493006238078bf69fc6)]:
- @graphql-tools/executor-http@2.0.3
## 3.2.3
### Patch Changes
- [#1144](https://github.com/graphql-hive/gateway/pull/1144) [`54beb7a`](https://github.com/graphql-hive/gateway/commit/54beb7acde7558eee81ec0e20c123717865b8e18) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.8` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.8) (from `^0.10.6`, in `dependencies`)
- [#1187](https://github.com/graphql-hive/gateway/pull/1187) [`85d7c95`](https://github.com/graphql-hive/gateway/commit/85d7c95cfe90773daf7680f2308ff4f52f0f7fa9) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Handle nested keys with arguments
- [#1136](https://github.com/graphql-hive/gateway/pull/1136) [`511ba36`](https://github.com/graphql-hive/gateway/commit/511ba36d9c8b81f83cf4cb37c03c9fbb9c5c9c9d) Thanks [@ardatan](https://github.com/ardatan)! - Handle errors on non-nullable fields in shared root fields correctly
- Updated dependencies [[`54beb7a`](https://github.com/graphql-hive/gateway/commit/54beb7acde7558eee81ec0e20c123717865b8e18), [`4a80de1`](https://github.com/graphql-hive/gateway/commit/4a80de1a2884dc42a5f09202b6215c3e6780efc4)]:
- @graphql-tools/executor-http@2.0.2
- @graphql-tools/wrap@10.1.0
- @graphql-tools/stitch@9.4.24
- @graphql-tools/delegate@10.2.19
## 3.2.2
### Patch Changes
- [#1117](https://github.com/graphql-hive/gateway/pull/1117) [`0512be3`](https://github.com/graphql-hive/gateway/commit/0512be32399268eb7926db48675ddb5763fd8578) Thanks [@ardatan](https://github.com/ardatan)! - Optimizes `@provides` handling by avoiding the generation of new query plans when a parent subgraph already supplies the requested fields.
- Refactors and inlines `subtractSelectionSets` to compute leftover selections.
- Threads a `providedSelectionNode` through planning to subtract out provided fields early.
- Updates stitching and federation logic to conditionally skip planning when selections are already available.
- Updated dependencies [[`b7627d3`](https://github.com/graphql-hive/gateway/commit/b7627d3cc29e54a048085a79a07a7906f2994173), [`ef0e24c`](https://github.com/graphql-hive/gateway/commit/ef0e24c55ed26320d139a83b1de5b75d5c1bfe4e), [`0512be3`](https://github.com/graphql-hive/gateway/commit/0512be32399268eb7926db48675ddb5763fd8578), [`b7627d3`](https://github.com/graphql-hive/gateway/commit/b7627d3cc29e54a048085a79a07a7906f2994173)]:
- @graphql-tools/executor-http@2.0.1
- @graphql-tools/delegate@10.2.18
- @graphql-tools/stitch@9.4.23
- @graphql-tools/wrap@10.0.36
## 3.2.1
### Patch Changes
- [#1045](https://github.com/graphql-hive/gateway/pull/1045) [`da47a0e`](https://github.com/graphql-hive/gateway/commit/da47a0effcc0e3c2b934bc97ab10e6e86ef8cd93) Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.6` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.6) (from `^0.10.4`, in `dependencies`)
- [#1045](https://github.com/graphql-hive/gateway/pull/1045) [`da47a0e`](https://github.com/graphql-hive/gateway/commit/da47a0effcc0e3c2b934bc97ab10e6e86ef8cd93) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Update graphql-yoga and whatwg-node packages
In light of https://github.com/ardatan/whatwg-node/pull/2305. Please upgrade as soon as possible!
- [#997](https://github.com/graphql-hive/gateway/pull/997) [`4cf75cb`](https://github.com/graphql-hive/gateway/commit/4cf75cbf1f14169826d1917532ee73ee45c002d5) Thanks [@ardatan](https://github.com/ardatan)! - - **BREAKING**: HTTP Executor no longer takes `serviceName` as an option.
- Both HTTP executor and `@graphql-mesh/transport-http-callback` no longer handle `DOWNSTREAM_SERVICE_ERROR` error code with `serviceName`.
- Gateway runtime handles subgraph errors on its own with `DOWNSTREAM_SERVICE_ERROR` error code and `serviceName` as a property. This behavior can be configured with `subgraphErrors` option of the `createGatewayRuntime` function or CLI config.
```ts
subgraphError: {
errorCode: 'DOWNSTREAM_SERVICE_ERROR', // or `false` to remove this code completely
subgraphNameProp: 'serviceName' // or `false` to remove this prop completely
}
```
- Updated dependencies [[`da47a0e`](https://github.com/graphql-hive/gateway/commit/da47a0effcc0e3c2b934bc97ab10e6e86ef8cd93), [`da47a0e`](https://github.com/graphql-hive/gateway/commit/da47a0effcc0e3c2b934bc97ab10e6e86ef8cd93), [`9a120c8`](https://github.com/graphql-hive/gateway/commit/9a120c85ac67654f63e374cf420ac4b73da21228), [`4cf75cb`](https://github.com/graphql-hive/gateway/commit/4cf75cbf1f14169826d1917532ee73ee45c002d5)]:
- @graphql-tools/executor-http@2.0.0
## 3.2.0
### Minor Changes
- [#946](https://github.com/graphql-hive/gateway/pull/946) [`7d771d8`](https://github.com/graphql-hive/gateway/commit/7d771d89ff6d731b1025acfc5eb197541a6d5d35) Thanks [@ardatan](https://github.com/ardatan)! - As Apollo suggests and uses in their implementation, we set the request timeout to 30 seconds for GraphOS uplinks
### Patch Changes
- [#946](https://github.com/graphql-hive/gateway/pull/946) [`7d771d8`](https://github.com/graphql-hive/gateway/commit/7d771d89ff6d731b1025acfc5eb197541a6d5d35) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Added dependency [`@graphql-tools/executor@^1.4.7` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.7) (to `dependencies`)
- [#950](https://github.com/graphql-hive/gateway/pull/950) [`c7ea2c5`](https://github.com/graphql-hive/gateway/commit/c7ea2c5ae71b6b338ef22edd927a3fc93803965f) Thanks [@kroupacz](https://github.com/kroupacz)! - Errors should not be swallowed when it is thrown from the shared root
- Updated dependencies [[`c7ea2c5`](https://github.com/graphql-hive/gateway/commit/c7ea2c5ae71b6b338ef22edd927a3fc93803965f), [`0af3485`](https://github.com/graphql-hive/gateway/commit/0af3485abb1b3dfba4126f09d291b2096d23aa32)]:
- @graphql-tools/delegate@10.2.17
- @graphql-tools/stitch@9.4.22
- @graphql-tools/executor-http@1.3.3
- @graphql-tools/wrap@10.0.35
## 3.1.7
### Patch Changes
- [#532](https://github.com/graphql-hive/gateway/pull/532) [`4e33933`](https://github.com/graphql-hive/gateway/commit/4e339333945f4c4547d9ae719e67b4671fe89f04) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - dependencies updates:
- Updated dependency [`@whatwg-node/promise-helpers@^1.3.0` ↗︎](https://www.npmjs.com/package/@whatwg-node/promise-helpers/v/1.3.0) (from `^1.2.5`, in `dependencies`)
- Updated dependencies [[`4e33933`](https://github.com/graphql-hive/gateway/commit/4e339333945f4c4547d9ae719e67b4671fe89f04), [`4e33933`](https://github.com/graphql-hive/gateway/commit/4e339333945f4c4547d9ae719e67b4671fe89f04), [`c9cd206`](https://github.com/graphql-hive/gateway/commit/c9cd20666a740514a5c17ecd6d0c000ad0dd7106), [`4e33933`](https://github.com/graphql-hive/gateway/commit/4e339333945f4c4547d9ae719e67b4671fe89f04), [`4e33933`](https://github.com/graphql-hive/gateway/commit/4e339333945f4c4547d9ae719e67b4671fe89f04), [`7b86c09`](https://github.com/graphql-hive/gateway/commit/7b86c097f5d424b82c84b87c743d5ed4ebe6aa5c), [`dbfb0f7`](https://github.com/graphql-hive/gateway/commit/dbfb0f7d6906d99b07b959bb6254d10e2fe2adf0)]:
- @graphql-tools/delegate@10.2.16
- @graphql-tools/executor-http@1.3.2
- @graphql-tools/stitch@9.4.21
- @graphql-tools/wrap@10.0.34
## 3.1.6
### Patch Changes
- [#862](https://github.com/graphql-hive/gateway/pull/862) [`278618a`](https://github.com/graphql-hive/gateway/commit/278618a1383a01016041ce0a40adec8803c62448) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@whatwg-node/promise-helpers@^1.2.5` ↗︎](https://www.npmjs.com/package/@whatwg-node/promise-helpers/v/1.2.5) (from `^1.0.0`, in `dependencies`)
- Updated dependencies [[`278618a`](https://github.com/graphql-hive/gateway/commit/278618a1383a01016041ce0a40adec8803c62448), [`278618a`](https://github.com/graphql-hive/gateway/commit/278618a1383a01016041ce0a40adec8803c62448), [`278618a`](https://github.com/graphql-hive/gateway/commit/278618a1383a01016041ce0a40adec8803c62448), [`278618a`](https://github.com/graphql-hive/gateway/commit/278618a1383a01016041ce0a40adec8803c62448)]:
- @graphql-tools/delegate@10.2.15
- @graphql-tools/executor-http@1.3.1
- @graphql-tools/stitch@9.4.20
- @graphql-tools/wrap@10.0.33
## 3.1.5
### Patch Changes
- [#726](https://github.com/graphql-hive/gateway/pull/726) [`6334b2e`](https://github.com/graphql-hive/gateway/commit/6334b2e5d4942693121ab7d44a96fa80408aace1) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Added dependency [`@whatwg-node/promise-helpers@^1.0.0` ↗︎](https://www.npmjs.com/package/@whatwg-node/promise-helpers/v/1.0.0) (to `dependencies`)
- [#727](https://github.com/graphql-hive/gateway/pull/727) [`c54a080`](https://github.com/graphql-hive/gateway/commit/c54a080b8b9c477ed55dd7c23fc8fcae9139bec8) Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
- Updated dependency [`@whatwg-node/disposablestack@^0.0.6` ↗︎](https://www.npmjs.com/package/@whatwg-node/disposablestack/v/0.0.6) (from `^0.0.5`, in `dependencies`)
- Updated dependencies [[`6334b2e`](https://github.com/graphql-hive/gateway/commit/6334b2e5d4942693121ab7d44a96fa80408aace1), [`6334b2e`](https://github.com/graphql-hive/gateway/commit/6334b2e5d4942693121ab7d44a96fa80408aace1), [`c54a080`](https://github.com/graphql-hive/gateway/commit/c54a080b8b9c477ed55dd7c23fc8fcae9139bec8), [`d949143`](https://github.com/graphql-hive/gateway/commit/d94914302b5b2c71b1c95df5145326fba89b023c), [`661b103`](https://github.com/graphql-hive/gateway/commit/661b103a7b9586641e69b78cbaad516e550e7192), [`6334b2e`](https://github.com/graphql-hive/gateway/commit/6334b2e5d4942693121ab7d44a96fa80408aace1), [`6334b2e`](https://github.com/graphql-hive/gateway/commit/6334b2e5d4942693121ab7d44a96fa80408aace1), [`9c2f323`](https://github.com/graphql-hive/gateway/commit/9c2f323ece47d9c0ef8f4e44050390096ceac17f), [`2a54e85`](https://github.com/graphql-hive/gateway/commit/2a54e85f2848aea7525703ea33918a21db96b26b)]:
- @graphql-tools/delegate@10.2.14
- @graphql-tools/executor-http@1.3.0
- @graphql-tools/stitch@9.4.19
- @graphql-tools/wrap@10.0.32
## 3.1.4
### Patch Changes
- [#696](https://github.com/graphql-hive/gateway/pull/696) [`a289faa`](https://github.com/graphql-hive/gateway/commit/a289faae1469eb46f1458be341d21909fe5f8f8f) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@whatwg-node/fetch@^0.10.4` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.4) (from `^0.10.1`, in `dependencies`)
- Updated dependencies [[`a289faa`](https://github.com/graphql-hive/gateway/commit/a289faae1469eb46f1458be341d21909fe5f8f8f), [`20d275c`](https://github.com/graphql-hive/gateway/commit/20d275cd1badf76665874492d4550a7732b46f62)]:
- @graphql-tools/executor-http@1.2.8
## 3.1.3
### Patch Changes
- Updated dependencies [[`2318393`](https://github.com/graphql-hive/gateway/commit/2318393bc7b3aca7f53806a44b59277cd176702d)]:
- @graphql-tools/delegate@10.2.13
- @graphql-tools/stitch@9.4.18
- @graphql-tools/wrap@10.0.31
## 3.1.2
### Patch Changes
- [#620](https://github.com/graphql-hive/gateway/pull/620) [`d72209a`](https://github.com/graphql-hive/gateway/commit/d72209ad82ec53689f93ce5d81bfa52493919ad9) Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
- Updated dependency [`@graphql-tools/utils@^10.8.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.8.1) (from `^10.7.0`, in `dependencies`)
- Updated dependencies [[`d72209a`](https://github.com/graphql-hive/gateway/commit/d72209ad82ec53689f93ce5d81bfa52493919ad9), [`d72209a`](https://github.com/graphql-hive/gateway/commit/d72209ad82ec53689f93ce5d81bfa52493919ad9), [`d72209a`](https://github.com/graphql-hive/gateway/commit/d72209ad82ec53689f93ce5d81bfa52493919ad9), [`d72209a`](https://github.com/graphql-hive/gateway/commit/d72209ad82ec53689f93ce5d81bfa52493919ad9), [`7146f8d`](https://github.com/graphql-hive/gateway/commit/7146f8decca808ab2c68f4971ba9b64ca27a9b87), [`7146f8d`](https://github.com/graphql-hive/gateway/commit/7146f8decca808ab2c68f4971ba9b64ca27a9b87)]:
- @graphql-tools/delegate@10.2.12
- @graphql-tools/executor-http@1.2.7
- @graphql-tools/stitch@9.4.17
- @graphql-tools/wrap@10.0.30
## 3.1.1
### Patch Changes
- Updated dependencies [[`8c80ac9`](https://github.com/graphql-hive/gateway/commit/8c80ac98cd5afd7c063945f4704fe4866622c5d7), [`8c80ac9`](https://github.com/graphql-hive/gateway/commit/8c80ac98cd5afd7c063945f4704fe4866622c5d7)]:
- @graphql-tools/executor-http@1.2.6
## 3.1.0
### Minor Changes
- [#444](https://github.com/graphql-hive/gateway/pull/444) [`b52c9ba`](https://github.com/graphql-hive/gateway/commit/b52c9ba47f84d0905f1f63fdfe071c891dce5b7f) Thanks [@ardatan](https://github.com/ardatan)! - Now `SupergraphSchemaManager` can be used in `ApolloServer` as `gateway`;
```ts
import { ApolloServer } from '@apollo/server';
import { SupergraphSchemaManager } from '@graphql-tools/federation';
const gateway = new SupergraphSchemaManager();
const apolloServer = new ApolloServer({
gateway,
});
```
And with the new `onStitchedSchema` option, you can manipulate the executable schema created from the supergraph.
The following example demonstrates how to use `onStitchedSchema` with `applyMiddleware` from `graphql-middleware`:
```ts
import { SupergraphSchemaManager } from '@graphql-tools/federation';
import { applyMiddleware } from 'graphql-middleware';
const logInput = async (resolve, root, args, context, info) => {
console.log(`1. logInput: ${JSON.stringify(args)}`);
const result = await resolve(root, args, context, info);
console.log(`5. logInput`);
return result;
};
const logResult = async (resolve, root, args, context, info) => {
console.log(`2. logResult`);
const result = await resolve(root, args, context, info);
console.log(`4. logResult: ${JSON.stringify(result)}`);
return result;
};
const gateway = new SupergraphSchemaManager({
onStitchedSchema: async (schema) => {
// Manipulate the schema
return applyMiddleware(schema, logInput, logResult);
},
});
```
### Patch Changes
- [#552](https://github.com/graphql-hive/gateway/pull/552) [`b0bc26b`](https://github.com/graphql-hive/gateway/commit/b0bc26b8e18a2e61e5fa96f48cd77820e3598b52) Thanks [@ardatan](https://github.com/ardatan)! - Handle shared subscription root fields correctly
In case of conflicting subscription root fields coming from different subgraphs or different entry points(multiple keys),
subscription was failing.
- Updated dependencies [[`9144222`](https://github.com/graphql-hive/gateway/commit/91442220b2242a0fa082d4b544d03621572eecd0)]:
- @graphql-tools/delegate@10.2.11
- @graphql-tools/stitch@9.4.16
- @graphql-tools/wrap@10.0.29
## 3.0.10
### Patch Changes
- Updated dependencies [[`18682e6`](https://github.com/graphql-hive/gateway/commit/18682e6873091afe63f09414f02f93649a4da141), [`e9f78cd`](https://github.com/graphql-hive/gateway/commit/e9f78cd29681ca9b4371e12953a31d2b8f5e4c17)]:
- @graphql-tools/delegate@10.2.10
- @graphql-tools/wrap@10.0.28
- @graphql-tools/stitch@9.4.15
## 3.0.9
### Patch Changes
- [#443](https://github.com/graphql-hive/gateway/pull/443) [`a625269`](https://github.com/graphql-hive/gateway/commit/a62526936680d030339fc26cc55d76507134b022) Thanks [@ardatan](https://github.com/ardatan)! - In case of shared Mutation field in different subgraphs, choose the best option instead of choosing the last option just like we do in Query root fields
- Updated dependencies [[`a625269`](https://github.com/graphql-hive/gateway/commit/a62526936680d030339fc26cc55d76507134b022), [`14152f7`](https://github.com/graphql-hive/gateway/commit/14152f70d91572c0e60ba15ddeb2ffd0b41c9e92)]:
- @graphql-tools/stitch@9.4.14
- @graphql-tools/executor-http@1.2.5
## 3.0.8
### Patch Changes
- [#351](https://github.com/graphql-hive/gateway/pull/351) [`0591aa9`](https://github.com/graphql-hive/gateway/commit/0591aa9cc9718a1c7d8b6fa68723a3155f775cc7) Thanks [@ardatan](https://github.com/ardatan)! - Keep the custom directives(using @composeDirective) from the supergraph, in the unified schema served by the gateway should keep it.
## 3.0.7
### Patch Changes
- [#387](https://github.com/graphql-hive/gateway/pull/387) [`3571399`](https://github.com/graphql-hive/gateway/commit/35713997b5330989b001c6317631621af24c404b) Thanks [@ardatan](https://github.com/ardatan)! - In case of shared root field on Mutation, it was batched incorrectly across subgraphs. But instead only one mutation should be called as mutations should not be parallel
- Updated dependencies []:
- @graphql-tools/executor-http@1.2.4
- @graphql-tools/stitch@9.4.13
## 3.0.6
### Patch Changes
- Updated dependencies []:
- @graphql-tools/stitch@9.4.12
## 3.0.5
### Patch Changes
- Updated dependencies [[`55eb1b4`](https://github.com/graphql-hive/gateway/commit/55eb1b4d14aec7b3e6c7bcf9f596bc01192d022c), [`55eb1b4`](https://github.com/graphql-hive/gateway/commit/55eb1b4d14aec7b3e6c7bcf9f596bc01192d022c)]:
- @graphql-tools/executor-http@1.2.3
## 3.0.4
### Patch Changes
- [#373](https://github.com/graphql-hive/gateway/pull/373) [`e606975`](https://github.com/graphql-hive/gateway/commit/e60697593290255fb9ac407e591ae3e8cb752df2) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@graphql-tools/utils@^10.7.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.7.0) (from `^10.6.2`, in `dependencies`)
- Updated dependencies [[`e606975`](https://github.com/graphql-hive/gateway/commit/e60697593290255fb9ac407e591ae3e8cb752df