@graphql-tools/delegate
Version:
A set of utils for faster development of GraphQL tools
1,304 lines (945 loc) • 109 kB
Markdown
# @graphql-tools/delegate
## 12.0.12
### 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`.
## 12.0.11
### Patch Changes
- Updated dependencies [[`08c9da2`](https://github.com/graphql-hive/gateway/commit/08c9da28af4587aa823f3b7a10af493fa87dab87)]:
- @graphql-tools/batch-execute@10.0.7
## 12.0.10
### Patch Changes
- [#2099](https://github.com/graphql-hive/gateway/pull/2099) [`dae3fe4`](https://github.com/graphql-hive/gateway/commit/dae3fe4fbb9c78598d1bbf91c2ed07ab1b90f05d) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fix missing NPM provenance attestation by enabling `npmPublishProvenance` in Yarn configuration
- Updated dependencies [[`dae3fe4`](https://github.com/graphql-hive/gateway/commit/dae3fe4fbb9c78598d1bbf91c2ed07ab1b90f05d)]:
- @graphql-tools/batch-execute@10.0.6
## 12.0.9
### Patch Changes
- [#2022](https://github.com/graphql-hive/gateway/pull/2022) [`43aaa6a`](https://github.com/graphql-hive/gateway/commit/43aaa6ab8c1c64cae92e9cdff7016ebdf1afa756) Thanks [@ardatan](https://github.com/ardatan)! - Fix redundant extra calls to the same subschema in case of `@canonical` annotation
## 12.0.8
### Patch Changes
- [#1971](https://github.com/graphql-hive/gateway/pull/1971) [`4065b7f`](https://github.com/graphql-hive/gateway/commit/4065b7fbb08d9e75c5f0d3b2b4d42d665aa9dbd9) Thanks [@ardatan](https://github.com/ardatan)! - Reuse the existing variables from the gateway request correctly
When you have an argument in a nested field that uses the variable from the gateway request like below;
```graphql
query GetArticles($date: Datetime!) {
view {
articlesByDate(date: $date) {
id
title
publishedAt
}
}
}
```
And if `Datetime` is renamed from `DateTime` in the original schema, the transform wasn't applied correctly to the variable definitions, and the delegation failed with an error in the subgraph like `Datetime` is not known.
## 12.0.7
### Patch Changes
- [#1948](https://github.com/graphql-hive/gateway/pull/1948) [`584a293`](https://github.com/graphql-hive/gateway/commit/584a293e3dafa7cd2d0210f80299c81b6707bcd4) Thanks [@Tolsee](https://github.com/Tolsee)! - Respect existing variable definitions from the gateway request;
1. If the argument uses a variable definition on the gateway request, keep and re-use it as-is.
```graphql
query ($var1: String = "default") {
rootField(arg1: $var1)
}
```
2. If the argument does not use a variable definition on the gateway request, create a new variable definition for it and make sure it does not conflict with any existing variable definitions on the gateway request, because the gateway request can have variables that have nothing to do with the delegated argument.
```graphql
query ($arg1: String = "default") {
rootField(arg1: 2) {
someField(arg2: $arg1)
}
}
```
In that case it should be delegated as:
```graphql
query ($arg1: String = "default", $rootField_arg1: String = "default") {
rootField(arg1: $rootField_arg1) {
someField(arg2: $arg1)
}
}
```
## 12.0.6
### 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
## 12.0.5
### Patch Changes
- [#1901](https://github.com/graphql-hive/gateway/pull/1901) [`e92c5a9`](https://github.com/graphql-hive/gateway/commit/e92c5a9702a2aea395a4a4e3a482b92f528655e8) Thanks [@ardatan](https://github.com/ardatan)! - Do not add required fields if they are already present in the original selection set.
For example in Federation;
If you have a subgraph schema like below;
```graphql
type Book @key(fields: "upc otherUpc shop { id }") {
upc: ID!
otherUpc: ID!
shop: Shop!
}
type Shop @key(fields: "id") {
id: ID!
name: String!
location: Location!
}
```
And when you send a mutation like below;
```graphql
mutation {
buyBook(input: { bookUpc: "test" }) {
book {
upc
otherUpc
shop {
id
name
location {
address1
city
state
}
}
}
}
}
```
Previously, the gateway would add the required key fields again to the selection set when resolving the type like below;
```diff
mutation {
buyBook(input: { bookUpc: "test" }) {
book {
upc
otherUpc
- upc
- otherUpc
- shop { id } # from the key fields
shop {
id
name
location {
address1
city
state
}
}
}
}
}
```
## 12.0.4
### 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)]:
- @graphql-tools/batch-execute@10.0.5
## 12.0.3
### Patch Changes
- [#1835](https://github.com/graphql-hive/gateway/pull/1835) [`dcd8f0e`](https://github.com/graphql-hive/gateway/commit/dcd8f0e93fd220cb99f79cadea759ea49bc15308) Thanks [@ardatan](https://github.com/ardatan)! - Delegate variable values correctly;
When delegating requests with variables that include nested arrays, ensure that null values are preserved and passed correctly to the subschema. This fix addresses issues where null values in nested arrays were not handled properly during delegation.
Let's say we have the following schema;
```ts
makeExecutableSchema({
typeDefs: /* GraphQL */ `
type Query {
test(input: InputType!): [String!]
}
input InputType {
value: [String!]
}
`,
resolvers: {
Query: {
test: (_, args) => {
// Returns the incoming variable value
return args.input.value;
},
},
}
});
```
When delegating a query with a variable like:
```json
{
"query": "query Test($value: [String!]) { test(input: { value: $value } ) }",
"variables": { "value": null }
}
```
And the result was
```json
{
"data": {
"test": []
}
}
```
But with this fix, the result will correctly be:
```json
{
"data": {
"test": null
}
}
```
## 12.0.2
### Patch Changes
- [`da8b8e3`](https://github.com/graphql-hive/gateway/commit/da8b8e3f3545487249b11c6577e3889f68527249) Thanks [@ardatan](https://github.com/ardatan)! - Use `getDefinedRootType` instead of `schema.getRootType` for GraphQL v15 compatibility
## 12.0.1
### Patch Changes
- [`0d14faf`](https://github.com/graphql-hive/gateway/commit/0d14fafdbaf3fb27eef123016ef2ca977d6688d8) Thanks [@ardatan](https://github.com/ardatan)! - Fix leftover handling 2nd take
## 12.0.0
### Major Changes
- [#1708](https://github.com/graphql-hive/gateway/pull/1708) [`bc6cddd`](https://github.com/graphql-hive/gateway/commit/bc6cddd1c53a012dd02a1d8a7217a28e65cc6ae9) Thanks [@ardatan](https://github.com/ardatan)! - Breaking changes in `createRequest` function;
- No more `sourceParentType`, `sourceFieldName`, `variableDefinitions`, `variableValues` and `targetRootValue`
- `targetRootValue` has been renamed to `rootValue`
- `targetSchema` is a required option now and `args` is also accepted as a map of the arguments of the target field
- `fragments` is now an array of `FragmentDefinitionNode` instead of a record `{ [fragmentName: string]: FragmentDefinitionNode }`
Breaking changes in `delegateRequest` and `delegateToSchema` functions;
- No more `transformedSchema` option, it has been renamed to `targetSchema`
- `targetSchema` is a required option now
### Patch Changes
- [#1727](https://github.com/graphql-hive/gateway/pull/1727) [`1dbc653`](https://github.com/graphql-hive/gateway/commit/1dbc6536cb992a705cac7894acca6fe5431b72de) Thanks [@ardatan](https://github.com/ardatan)! - Avoid extra `__typename` in the root selection
```diff
query {
- __typename
hello
}
```
- [#1743](https://github.com/graphql-hive/gateway/pull/1743) [`b520eb2`](https://github.com/graphql-hive/gateway/commit/b520eb2309f627578519826d6b9e0056252c6c46) Thanks [@ardatan](https://github.com/ardatan)! - Handle leftovers recursively but in async
Fixes `requires-circular` test suite's second case on federation audit repository
## 11.1.3
### Patch Changes
- [#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/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)]:
- @graphql-tools/batch-execute@10.0.4
## 11.1.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/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`)
- Removed dependency [`dset@^3.1.2` ↗︎](https://www.npmjs.com/package/dset/v/3.1.2) (from `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`)
- Removed dependency [`dset@^3.1.2` ↗︎](https://www.npmjs.com/package/dset/v/3.1.2) (from `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/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)]:
- @graphql-tools/batch-execute@10.0.3
## 11.1.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/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)]:
- @graphql-tools/batch-execute@10.0.2
## 11.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
- [#1557](https://github.com/graphql-hive/gateway/pull/1557) [`a54b0c1`](https://github.com/graphql-hive/gateway/commit/a54b0c1777229aaeea295bcd15d4f4d6e4e615f7) Thanks [@ardatan](https://github.com/ardatan)! - Apply type-merging correctly in extended fields
- [#1556](https://github.com/graphql-hive/gateway/pull/1556) [`058ef2f`](https://github.com/graphql-hive/gateway/commit/058ef2f8373ea822fed985b705416cb39d5b6efc) Thanks [@ardatan](https://github.com/ardatan)! - Correct error paths in case of batch delegation with the same error
- [#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
## 11.0.1
### 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)]:
- @graphql-tools/batch-execute@10.0.1
## 11.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.
### Minor 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)! - Added `subgraphName` to `ExecutionRequest` for easier plugin developpment.
### 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)! - Fixed subgraph name being lost when execution requests get batched together.
- Updated dependencies [[`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a), [`46d2661`](https://github.com/graphql-hive/gateway/commit/46d26615c2c3c5f936c1d1bca1d03b025c1ce86a)]:
- @graphql-tools/batch-execute@10.0.0
## 10.2.23
### 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/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)]:
- @graphql-tools/batch-execute@9.0.19
## 10.2.22
### Patch Changes
- [#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/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`)
- Updated dependencies [[`a71236d`](https://github.com/graphql-hive/gateway/commit/a71236d6ba356741bc85fe27757bea45576dcf1a)]:
- @graphql-tools/batch-execute@9.0.18
## 10.2.21
### Patch Changes
- [#1301](https://github.com/graphql-hive/gateway/pull/1301) [`b69c80b`](https://github.com/graphql-hive/gateway/commit/b69c80b259bd0565eb9826f7ee9bc8e6c32076d1) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Filter selection sets recursively when finalizing gateway requests
Because abstract types can be nested.
## 10.2.20
### Patch Changes
- [#1280](https://github.com/graphql-hive/gateway/pull/1280) [`0655d1f`](https://github.com/graphql-hive/gateway/commit/0655d1fc604179b6cc0c148d73e38d6e8d839c56) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Relocate each error in multi-error ExecutionResult
Handling errors now works the same for both single-error and multi-error ExecutionResults.
- [#1280](https://github.com/graphql-hive/gateway/pull/1280) [`0655d1f`](https://github.com/graphql-hive/gateway/commit/0655d1fc604179b6cc0c148d73e38d6e8d839c56) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Remove trailing spaces when merging multi-error responses
- [#1280](https://github.com/graphql-hive/gateway/pull/1280) [`0655d1f`](https://github.com/graphql-hive/gateway/commit/0655d1fc604179b6cc0c148d73e38d6e8d839c56) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Call onLocatedError hook from delegation context for each error in multi-error ExecutionResult
## 10.2.19
### Patch Changes
- Updated dependencies [[`dca6529`](https://github.com/graphql-hive/gateway/commit/dca6529b234f1e178ad87a8992c5a7de12831128)]:
- @graphql-tools/batch-execute@9.0.17
## 10.2.18
### 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 [[`faffc17`](https://github.com/graphql-hive/gateway/commit/faffc17e72f8893e7e717d5a425205a6364e4d44)]:
- @graphql-tools/batch-execute@9.0.16
## 10.2.17
### Patch Changes
- [#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
- [#994](https://github.com/graphql-hive/gateway/pull/994) [`0af3485`](https://github.com/graphql-hive/gateway/commit/0af3485abb1b3dfba4126f09d291b2096d23aa32) Thanks [@ardatan](https://github.com/ardatan)! - Do not use the global \`PromiseWithResolvers\`
## 10.2.16
### 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)]:
- @graphql-tools/batch-execute@9.0.15
## 10.2.15
### 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)]:
- @graphql-tools/batch-execute@9.0.14
## 10.2.14
### 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`)
- [#742](https://github.com/graphql-hive/gateway/pull/742) [`2a54e85`](https://github.com/graphql-hive/gateway/commit/2a54e85f2848aea7525703ea33918a21db96b26b) Thanks [@kathrynkodama](https://github.com/kathrynkodama)! - Remove the index from the batched error;
In case of batched delegation (for example multiple book entitites fetched from different places from a field), remove the index from the error message, as it is not relevant in this case.
[See the test](https://github.com/graphql-hive/gateway/blob/ff61b87b5928f065edfd3a6e6c0fd13bc2beac45/packages/stitch/tests/stitchSchemasPathBug.test.ts)
- Updated dependencies [[`6334b2e`](https://github.com/graphql-hive/gateway/commit/6334b2e5d4942693121ab7d44a96fa80408aace1)]:
- @graphql-tools/batch-execute@9.0.13
## 10.2.13
### Patch Changes
- [#662](https://github.com/graphql-hive/gateway/pull/662) [`2318393`](https://github.com/graphql-hive/gateway/commit/2318393bc7b3aca7f53806a44b59277cd176702d) Thanks [@ardatan](https://github.com/ardatan)! - When a field with `@skip` and `@include` directives in a selection set throws, show the correct error
```
// Query
query myQuery($toInclude: Boolean! = false) {
user(id: 1) {
id
name
username
totalReviews @include(if: $toInclude)
# If this throws, show the actual error instead of `Argument \"if\" of required type \"Boolean!\" was provided the variable` error
}
}
// Variables
{
"toInclude": true
}
```
## 10.2.12
### 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)]:
- @graphql-tools/batch-execute@9.0.12
## 10.2.11
### Patch Changes
- [#506](https://github.com/graphql-hive/gateway/pull/506) [`9144222`](https://github.com/graphql-hive/gateway/commit/91442220b2242a0fa082d4b544d03621572eecd0) Thanks [@ardatan](https://github.com/ardatan)! - Add `isPrototypePollutingKey` to prevent accidential prototype pollution, whenever object manipulation happens with the keys based on the user input, it is validated to prevent prototype pollution.
For example, `WrapQuery` takes `path` which is used to manipulate the object returned to the client. If the user input is `__proto__`, it will throw an error from now on but previously it would have polluted the prototype.
## 10.2.10
### Patch Changes
- [#471](https://github.com/graphql-hive/gateway/pull/471) [`18682e6`](https://github.com/graphql-hive/gateway/commit/18682e6873091afe63f09414f02f93649a4da141) Thanks [@ardatan](https://github.com/ardatan)! - While creating a delegation request for the subschema, an selection set should be spreaded on the union type field correctly.
In case of the following schema;
```graphql
type Query {
foo: Foo
}
union Foo = Bar | Baz
type Bar {
id: ID!
name: String
age: Age
}
type Age {
years: Int
months: Int
}
type Baz {
id: ID!
name: Name
age: Int
}
type Name {
first: String
last: String
}
```
If the operation is generated as following;
```graphql
query {
foo {
id
name
age {
years
months
}
}
}
```
It should be spreaded on the union type field correctly as following;
```graphql
query {
foo {
... on Bar {
id
age {
years
months
}
}
... on Baz {
id
name {
first
last
}
}
}
}
```
## 10.2.9
### 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/executor@^1.3.10` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.3.10) (from `^1.3.8`, in `dependencies`)
- 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/e60697593290255fb9ac407e591ae3e8cb752df2)]:
- @graphql-tools/batch-execute@9.0.11
## 10.2.8
### Patch Changes
- [#322](https://github.com/graphql-hive/gateway/pull/322) [`23b8987`](https://github.com/graphql-hive/gateway/commit/23b89874fcf10b4cb6b1b941f29fa5f5aecf0ef2) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.3.8` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.3.8) (from `^1.3.6`, in `dependencies`)
## 10.2.7
### Patch Changes
- [#291](https://github.com/graphql-hive/gateway/pull/291) [`34d1224`](https://github.com/graphql-hive/gateway/commit/34d12249ead65b8277df976f6318dca757df1151) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`tslib@^2.8.1` ↗︎](https://www.npmjs.com/package/tslib/v/2.8.1) (from `^2.5.0`, in `dependencies`)
- Updated dependencies [[`34d1224`](https://github.com/graphql-hive/gateway/commit/34d12249ead65b8277df976f6318dca757df1151)]:
- @graphql-tools/batch-execute@9.0.10
## 10.2.6
### Patch Changes
- [#268](https://github.com/graphql-hive/gateway/pull/268) [`7df2215`](https://github.com/graphql-hive/gateway/commit/7df2215abd309dc1dfd91f4ec91ce975f3982c62) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`dataloader@^2.2.3` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.3) (from `^2.2.2`, in `dependencies`)
- [#269](https://github.com/graphql-hive/gateway/pull/269) [`cdca511`](https://github.com/graphql-hive/gateway/commit/cdca5116ce30c2bfced1130c9fbead67280af9d4) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.3.6` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.3.6) (from `^1.3.3`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.11` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.11) (from `^10.0.8`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.6.2` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.6.2) (from `^10.6.0`, in `dependencies`)
- Updated dependencies [[`7df2215`](https://github.com/graphql-hive/gateway/commit/7df2215abd309dc1dfd91f4ec91ce975f3982c62), [`cdca511`](https://github.com/graphql-hive/gateway/commit/cdca5116ce30c2bfced1130c9fbead67280af9d4)]:
- @graphql-tools/batch-execute@9.0.9
## 10.2.5
### Patch Changes
- [#257](https://github.com/graphql-hive/gateway/pull/257) [`9ce705c`](https://github.com/graphql-hive/gateway/commit/9ce705c5ccc5e6f4ac26af6e6471a6d2f4e995db) Thanks [@ardatan](https://github.com/ardatan)! - Do not show internal non-nullability errors in the gateway
## 10.2.4
### Patch Changes
- Updated dependencies [[`e53d4af`](https://github.com/graphql-hive/gateway/commit/e53d4af783f9d703dea4d5e703be0dddaa337534)]:
- @graphql-tools/batch-execute@9.0.8
## 10.2.3
### Patch Changes
- [#231](https://github.com/graphql-hive/gateway/pull/231) [`7ca0ff3`](https://github.com/graphql-hive/gateway/commit/7ca0ff331e42c133c4218a8086bbf0a7607f45d0) Thanks [@ardatan](https://github.com/ardatan)! - Avoid extensions and use \`stitchingInfo\` for provided fields
## 10.2.2
### Patch Changes
- [#205](https://github.com/graphql-hive/gateway/pull/205) [`2e0add3`](https://github.com/graphql-hive/gateway/commit/2e0add3ea9b237ad385d5b5cd4c12eeeb847805a) Thanks [@ardatan](https://github.com/ardatan)! - Fix missing key fields in the nested queries
## 10.2.1
### Patch Changes
- [#164](https://github.com/graphql-hive/gateway/pull/164) [`310613d`](https://github.com/graphql-hive/gateway/commit/310613d68d1df3e2bceafbd0730084a4c83527bf) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Updated dependency [`@graphql-tools/utils@^10.6.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.6.0) (from `^10.5.6`, in `dependencies`)
- Updated dependencies [[`310613d`](https://github.com/graphql-hive/gateway/commit/310613d68d1df3e2bceafbd0730084a4c83527bf), [`f0b6921`](https://github.com/graphql-hive/gateway/commit/f0b69219fefc1b24c5511a1c623a5e3bbaf5ca0b), [`f71366d`](https://github.com/graphql-hive/gateway/commit/f71366d234fe8f30a419814fe1460f1e22663241)]:
- @graphql-tools/batch-execute@9.0.7
## 10.2.0
### Minor Changes
- [#148](https://github.com/graphql-hive/gateway/pull/148) [`f32cb2a`](https://github.com/graphql-hive/gateway/commit/f32cb2a0289aa32e4811ced5dc1aac3efb0674f1) Thanks [@ardatan](https://github.com/ardatan)! - Introduce \`onDelegationPlan\` and \`onDelegationStageExecuteDone\` hooks
## 10.1.3
### Patch Changes
- [#118](https://github.com/graphql-hive/gateway/pull/118) [`73c621d`](https://github.com/graphql-hive/gateway/commit/73c621d98a4e6ca134527e349bc71223c03d06db) Thanks [@{](https://github.com/{)! - Do not ignore request selection set when overriding the fields
```ts
import { buildSchema, graphql } from 'graphql';
import { addResolversToSchema } from '@graphql-tools/schema';
import { stitchSchemas } from '@graphql-tools/stitch';
import { delegateToSchema } from '@graphql-tools/delegate';
const sub_schema = addResolversToSchema({
schema: buildSchema(`
type Query {
current_user: User
}
type User {
id: ID!
name: String!
age: Int!
}
`),
resolvers: {
Query: {
current_user: () => ({ id: '5', name: 'John Doe', age: 10 }),
},
},
});
const stitched_schema = stitchSchemas({
subschemas: [
{
schema: sub_schema,
createProxyingResolver: (options) => {
return (_parent, _args, context, info) => {
const operationName = info.operation.name ? info.operation.name.value : undefined;
return delegateToSchema({
schema: options.subschemaConfig,
operation: options.operation,
context,
info,
operationName,
});
};
},
},
],
resolvers: {
name: {
selectionSet: '{ age }',
resolve: (parent) => `${parent.name}(${parent.age})`, // Age should be here
},
},
},
});
```
## 10.1.1
### Patch Changes
- [`342e044`](https://github.com/ardatan/graphql-tools/commit/342e044c7da74aaf5df6a90ce68973c525c9aa10)
Thanks [@ardatan](https://github.com/ardatan)! - Prevent extra queries to the same subgraph
multiple times on the same plan, and merge iterables correctly
## 10.1.0
### Minor Changes
- [#6619](https://github.com/ardatan/graphql-tools/pull/6619)
[`e9906eb`](https://github.com/ardatan/graphql-tools/commit/e9906eb311132ab902720e75bc787228d67c0e34)
Thanks [@kroupacz](https://github.com/kroupacz)! - Handle shared root field queries with aliases
## 10.0.29
### Patch Changes
- [#6620](https://github.com/ardatan/graphql-tools/pull/6620)
[`da1de08`](https://github.com/ardatan/graphql-tools/commit/da1de08c269a4cb3ed8240bf191833f7e75a6b01)
Thanks [@kroupacz](https://github.com/kroupacz)! - - fix `subtractSelectionSets()` method - find
field by its path correctly
## 10.0.28
### Patch Changes
- [`f470f49`](https://github.com/ardatan/graphql-tools/commit/f470f49f7d8445801a2983f14532124588f9f59e)
Thanks [@ardatan](https://github.com/ardatan)! - Support original format of "@stream"
## 10.0.27
### Patch Changes
- [`180f3f0`](https://github.com/ardatan/graphql-tools/commit/180f3f0c8362613eb3013ff12f2d5405cd987903)
Thanks [@ardatan](https://github.com/ardatan)! - Avoid extra calls if the keys are already
resolved
## 10.0.26
### Patch Changes
- [#6586](https://github.com/ardatan/graphql-tools/pull/6586)
[`8effad4`](https://github.com/ardatan/graphql-tools/commit/8effad4ffb9be1bca098b8cb6ce41b84ac7d9b6b)
Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements on upstream request
execution
## 10.0.25
### Patch Changes
- [#6579](https://github.com/ardatan/graphql-tools/pull/6579)
[`8a16b01`](https://github.com/ardatan/graphql-tools/commit/8a16b01296457bdcfbb111e02b6f6569ef8b04aa)
Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements on upstream request
execution
## 10.0.24
### Patch Changes
- [#6576](https://github.com/ardatan/graphql-tools/pull/6576)
[`4cdb462`](https://github.com/ardatan/graphql-tools/commit/4cdb46248774f2d5ae2757d40e1d55e83d7413b3)
Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements on upstream request
execution
## 10.0.23
### Patch Changes
- [#6573](https://github.com/ardatan/graphql-tools/pull/6573)
[`7e2938d`](https://github.com/ardatan/graphql-tools/commit/7e2938d45c6d0a6eb6b18b89f9f80e9b5b5c08db)
Thanks [@ardatan](https://github.com/ardatan)! - When there are two services like below then the
following query senty, the gateway tries to fetch `id` as an extra field because it considers `id`
might be needed while this is not correct. This patch avoids any extra calls, and forwards the
query as is to the 2nd service.
```graphql
query {
viewer {
booksContainer(input: $input) {
edges {
cursor
node {
source {
# Book(upc=)
upc
}
}
}
pageInfo {
endCursor
}
}
}
}
```
```graphql
type Book @key(fields: "id") @key(fields: "upc") {
id: ID!
upc: ID!
}
```
```graphql
type BookContainer { # the type that is used in a collection
id: ID!
# ... other stuff here
source: Book!
}
type Book @key(fields: "upc") {
upc: ID!
}
type Query {
viewer: Viewer
}
type Viewer {
booksContainer: BooksContainerResult
}
type BooksContainerResult {
edges: [BooksContainerEdge!]!
pageInfo: PageInfo!
}
type BooksContainerEdge {
node: BookContainer!
cursor: String!
}
type PageInfo {
endCursor: String
}
```
## 10.0.22
### Patch Changes
- Updated dependencies
[[`cf2ce5e`](https://github.com/ardatan/graphql-tools/commit/cf2ce5ed4773087cc324599f2812f4fb91398b21)]:
- @graphql-tools/utils@10.5.5
- @graphql-tools/batch-execute@9.0.5
- @graphql-tools/executor@1.3.2
- @graphql-tools/schema@10.0.7
## 10.0.21
### Patch Changes
- [#6471](https://github.com/ardatan/graphql-tools/pull/6471)
[`3163978`](https://github.com/ardatan/graphql-tools/commit/31639789ed385c91644c711fa4b451a5b3647e5f)
Thanks [@ardatan](https://github.com/ardatan)! - Fix broken complex-entity-call
## 10.0.20
### Patch Changes
- [#6469](https://github.com/ardatan/graphql-tools/pull/6469)
[`0e87805`](https://github.com/ardatan/graphql-tools/commit/0e8780572fb1a852c8f4d7c8a59b064ae92bdd6b)
Thanks [@User!](https://github.com/User!)! - Handle merged selection sets in the computed fields;
When a selection set for a computed field needs to be merged, resolve that required selection set
fully then resolve the computed field. In the following case, the selection set for the `author`
field in the `Post` type is merged with the selection set for the `authorId` field in the
`Comment` type.
```graphql
type Query {
feed: [Post!]!
}
type Post {
id: ID! @computed(selectionSet: "{ comments { authorId } }")
}
type Comment {
id: ID!
authorId: ID!
}
type User {
id: ID!
name: String!
}
```
```graphql
type Post {
id: ID!
comments: [Comment!]!
}
type Comment {
id: ID!
}
```
## 10.0.19
### Patch Changes
- [#6437](https://github.com/ardatan/graphql-tools/pull/6437)
[`3188051`](https://github.com/ardatan/graphql-tools/commit/3188051ae530772210e9f3a2c9615932ef13f497)
Thanks [@User](https://github.com/User), [@()](<https://github.com/()>),
[@{](https://github.com/{), [@{](https://github.com/{), [@{](https://github.com/{),
[@{](https://github.com/{), [@{](https://github.com/{)! - Fix the bug happens when a merged field
is a computed field requires another computed field requires a field from the initial subschema.
In the following test case, `totalOrdersPrices` needs `userOrders` which needs `lastName` from
initial `Query.user`. So the bug was skipping the dependencies of `userOrders` because it assumed
`lastName` already there by mistake.
```ts
const schema1 = makeExecutableSchema({
typeDefs: /* GraphQL */ `
type User {
id: ID!
firstName: String!
lastName: String!
address: String
}
type Query {
}
`,
resolvers: {
Query: {
=> {
return {
id: 1,
firstName: 'Jake',
lastName: 'Dawkins',
address: 'everywhere',
};
},
},
},
});
const schema2 = makeExecutableSchema({
typeDefs: /* GraphQL */ `
type UserOrder {
id: ID!
}
type User {
id: ID!
totalOrdersPrices: Int
aggregatedOrdersByStatus: Int
}
type Query {
userWithOrderDetails(userId: ID!, userOrderIds: [ID]): User
}
`,
resolvers: {
Query: {
userWithOrderDetails: (_root, { userId, userOrderIds }) => {
return {
id: userId,
userOrders: userOrderIds?.map((userOrderId: string) => ({ id: userOrderId })),
};
},
},
totalOrdersPrices(user) {
if (user.userOrders instanceof Error) {
return user.userOrders;
}
if (!user.userOrders) {
throw new Error('UserOrders is required');
}
return 0;
},
aggregatedOrdersByStatus(user) {
if (user.userOrders instanceof Error) {
return user.userOrders;
}
if (!user.userOrders) {
throw new Error('UserOrders is required');
}
return 1;
},
},
},
});
const schema3 = makeExecutableSchema({
typeDefs: /* GraphQL */ `
type User {
id: ID!
userOrders: [UserOrder!]
}
type UserOrder {
id: ID!
}
type Query {
userWithOrders(id: ID!, lastName: String): User
}
`,
resolvers: {
Query: {
userWithOrders: (_root, { id, lastName }) => {
return {
id,
lastName,
};
},
},
userOrders(user) {
if (!user.lastName) {
throw new Error('LastName is required');
}
return [
{
id: `${user.lastName}1`,
},
];
},
},
},
});
const stitchedSchema = stitchSchemas({
subschemas: [
{
schema: schema1,
},
{
schema: schema2,
merge: {
selectionSet: '{ id }',
fieldName: 'userWithOrderDetails',
args: ({ id, userOrders }: { id: string; userOrders: any[] }) => ({
userId: id,
userOrderIds: userOrders?.map?.(({ id }: { id: string }) => id),
}),
fields: {
totalOrdersPrices: {
selectionSet: '{ userOrders { id } }',
computed: true,
},
aggregatedOrdersByStatus: {
selectionSet: '{ userOrders { id } }',
computed: true,
},
},
},
},
},
{
schema: schema3,
merge: {
selectionSet: '{ id }',
fieldName: 'userWithOrders',
args: ({ id, lastName }: { id: string; lastName: string }) => ({
id,
lastName,
}),
fields: {
userOrders: {
selectionSet: '{ lastName }',
computed: true,
},
},
},
},
},
],
});
const res = await normalizedExecutor({
schema: stitchedSchema,
document: parse(/* GraphQL */ `
query User {
user {
aggregatedOrdersByStatus
totalOrdersPrices
}
}
`),
});
expect(res).toEqual({
data: {
aggregatedOrdersByStatus: 1,
totalOrdersPrices: 0,
},
},
});
```
## 10.0.18
### Patch Changes
- [#6420](https://github.com/ardatan/graphql-tools/pull/6420)
[`a867bbc`](https://github.com/ardatan/graphql-tools/commit/a867bbc9b5b91e89a09447797b4c02e22e47ddb4)
Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
- Added dependency
[`@repeaterjs/repeater@^3.0.6` ↗︎](https://www.npmjs.com/package/@repeaterjs/repeater/v/3.0.6)
(to `dependencies`)
- [#6420](https://github.com/ardatan/graphql-tools/pull/6420)
[`a867bbc`](https://github.com/ardatan/graphql-tools/commit/a867bbc9b5b91e89a09447797b4c02e22e47ddb4)
Thanks [@ardatan](https://github.com/ardatan)! - Pass operation directives correctly to the
subschema;
```graphql
query {
hello @someDir
}
```
- [#6418](https://github.com/ardatan/graphql-tools/pull/6418)
[`da93c08`](https://github.com/ardatan/graphql-tools/commit/da93c08b4bc22b5c9be81ed57beba8577f33118a)
Thanks [@ardatan](https://github.com/ardatan)! - Fix extra inline fragments for all abstract types
in the upstream schema call
If there are two subschemas like below, the final `Node` interface is implemented by both `Oven`
and `Toaster` while they are not implemented in both schemas. In this case the query
`{ products { id ... on Node { id } } }` will need to be transformed to
`{ products { id ... on Oven { id } ... on Node { id } } }` for the first subschema. But
previously the query planner was automatically creating inline fragments for all possible types
which was not optimal. Now it adds inline fragments only if this case is seen.
```graphql
type Query {
products: [Product]
}
union Product = Oven | Toaster
interface Node {
id: ID!
}
type Oven {
id: ID!
}
type Toaster implements Node {
id: ID!
warranty: Int
}
```
And another one like below;
```graphql
interface Node {
id: ID!
}
type Oven implements Node {
id: ID!
warranty: Int
}
```
- Updated dependencies
[[`a867bbc`](https://github.com/ardatan/graphql-tools/commit/a867bbc9b5b91e89a09447797b4c02e22e47ddb4)]:
- @graphql-tools/executor@1.3.1
- @graphql-tools/utils@10.3.4
## 10.0.17
### Patch Changes
- [#6403](https://github.com/ardatan/graphql-tools/pull/6403)
[`3803897`](https://github.com/ardatan/graphql-tools/commit/3803897cef27b15bad1718819c5d75030afbe781)
Thanks [@ardatan](https://github.com/ardatan)! - Cleanup extra fields, empty inline fragments and
duplicate \_\_typename fields
## 10.0.16
### Patch Changes
- [`33e8146`](https://github.com/ardatan/graphql-tools/commit/33e8146e33aa17790ee76d14e52f62c684ee1b16)
Thanks [@ardatan](https://github.com/ardatan)! - Fail on query planning phase if the query plan is
not successful before the actual execution
- Updated dependencies
[[`33e8146`](https://github.com/ardatan/graphql-tools/commit/33e8146e33aa17790ee76d14e52f62c684ee1b16)]:
- @graphql-tools/executor@1.3.0
## 10.0.15
### Patch Changes
- [`d54b21a`](https://github.com/ardatan/graphql-tools/commit/d54b21a235f9632d320a32f15594ecd70b5eae29)
Thanks [@ardatan](https://github.com/ardatan)! - If an abstract type on the gateway resolves to a
type that does not exist on the gateway, return null instead of showing an error to the user
- [`d54b21a`](https://github.com/ardatan/graphql-tools/commit/d54b21a235f9632d320a32f15594ecd70b5eae29)
Thanks [@ardatan](https://github.com/ardatan)! - If an enum value coming from the subschema is not
available on gateway, do not show an error to the user but return null instead
## 10.0.14
### Patch Changes
- [#6356](https://github.com/ardatan/graphql-tools/pull/6356)
[`8094c37`](https://github.com/ardatan/graphql-tools/commit/8094c3733c745b2ccb7adcca38024c82c42319a0)
Thanks [@enisdenjo](https://github.com/enisdenjo)! - AggregateError errors are GraphQL located
errors
Instead of transforming the AggregateError itself to a GraphQL located error.
This is because of two reasons:
- AggregateError wont lose the instanceof its class
- Expanding the AggregateError errors will each contain the proper locations
## 10.0.13
### Patch Changes
- [#6312](https://github.com/ardatan/graphql-tools/pull/6312)
[`7b6f77a`](https://github.com/ardatan/graphql-tools/commit/7b6f77a46177def2488ab70ce938b94d0dcf3018)
Thanks [@ardatan](https://github.com/ardatan)! - Use native `Promise.withResolvers` when possible
## 10.0.12
### Patch Changes
- [#6278](https://github.com/ardatan/graphql-tools/pull/6278)
[`66c99d9`](https://github.com/ardatan/graphql-tools/commit/66c99d9c9e480cc4e1569b032952caea0ff69c0c)
Thanks [@ardatan](https://g