@graphql-tools/links
10.0.0
Major Changes
-
#7449
97e5e18Thanks @renovate ! - dependencies updates:- Updated dependency
@graphql-tools/delegate@^11.0.0↗︎ (from^10.1.2, independencies)
- Updated dependency
-
#7442
7d975c4Thanks @renovate ! - Drop Node 18 and Apollo Client v3 support
Patch Changes
- #7442
7d975c4Thanks @renovate ! - dependencies updates:- Updated dependency
apollo-upload-client@^19.0.0↗︎ (from18.0.1, independencies) - Updated dependency
@apollo/client@^4.0.4↗︎ (from^3, inpeerDependencies)
- Updated dependency
9.0.30
Patch Changes
- #7103
296b883Thanks @dependabot ! - dependencies updates:- Updated dependency
apollo-upload-client@18.0.1↗︎ (from17.0.0, independencies)
- Updated dependency
9.0.29
Patch Changes
- Updated dependencies
[
32d0457]:- @graphql-tools/utils@10.9.1
9.0.28
Patch Changes
9.0.27
Patch Changes
- Updated dependencies
[
d123e26]:- @graphql-tools/utils@10.8.6
9.0.26
Patch Changes
9.0.25
Patch Changes
- Updated dependencies
[
155944b]:- @graphql-tools/utils@10.8.4
9.0.24
Patch Changes
- Updated dependencies
[
4a2eb14]:- @graphql-tools/utils@10.8.3
9.0.23
Patch Changes
- Updated dependencies
[
3547bba]:- @graphql-tools/utils@10.8.2
9.0.22
Patch Changes
- Updated dependencies
[
651a5dc]:- @graphql-tools/utils@10.8.1
9.0.21
Patch Changes
9.0.20
Patch Changes
9.0.19
Patch Changes
- Updated dependencies
[
4912f19]:- @graphql-tools/utils@10.7.1
9.0.18
Patch Changes
- Updated dependencies
[
2c70d27]:- @graphql-tools/utils@10.7.0
9.0.17
Patch Changes
- Updated dependencies
[
6a8123b]:- @graphql-tools/utils@10.6.4
9.0.16
Patch Changes
- Updated dependencies
[
020b9e4]:- @graphql-tools/utils@10.6.3
9.0.15
Patch Changes
- #6662
696a0d5Thanks @renovate ! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.6.1↗︎ (from^10.6.0, independencies)
- Updated dependency
- Updated dependencies
[
1b24656]:- @graphql-tools/utils@10.6.2
9.0.14
Patch Changes
- Updated dependencies
[
1e02935]:- @graphql-tools/utils@10.6.1
9.0.13
Patch Changes
- Updated dependencies
[
414e404]:- @graphql-tools/utils@10.6.0
9.0.12
Patch Changes
- Updated dependencies
[
dc5043b]:- @graphql-tools/utils@10.5.6
- @graphql-tools/delegate@10.1.2
9.0.11
Patch Changes
- Updated dependencies
[
342e044]:- @graphql-tools/delegate@10.1.1
9.0.10
Patch Changes
- Updated dependencies
[
e9906eb]:- @graphql-tools/delegate@10.1.0
9.0.9
Patch Changes
- Updated dependencies
[
da1de08]:- @graphql-tools/delegate@10.0.29
9.0.8
Patch Changes
- Updated dependencies
[
f470f49]:- @graphql-tools/delegate@10.0.28
9.0.7
Patch Changes
- Updated dependencies
[
180f3f0]:- @graphql-tools/delegate@10.0.27
9.0.6
Patch Changes
- Updated dependencies
[
8effad4]:- @graphql-tools/delegate@10.0.26
9.0.5
Patch Changes
- Updated dependencies
[
8a16b01]:- @graphql-tools/delegate@10.0.25
9.0.4
Patch Changes
- Updated dependencies
[
4cdb462]:- @graphql-tools/delegate@10.0.24
9.0.3
Patch Changes
- Updated dependencies
[
7e2938d]:- @graphql-tools/delegate@10.0.23
9.0.2
Patch Changes
- Updated dependencies
[
cf2ce5e]:- @graphql-tools/utils@10.5.5
- @graphql-tools/delegate@10.0.22
9.0.1
Patch Changes
- #5913
83c0af0Thanks @enisdenjo ! - dependencies updates:- Updated dependency
@graphql-tools/delegate@^10.0.3↗︎ (from^10.0.0, independencies) - Updated dependency
@graphql-tools/utils@^10.0.13↗︎ (from^10.0.0, independencies)
- Updated dependency
- Updated dependencies
[
83c0af0,83c0af0]:- @graphql-tools/delegate@10.0.4
9.0.0
Major Changes
Patch Changes
- Updated dependencies
[
8fba6cc1,944a68e8,944a68e8]:- @graphql-tools/delegate@10.0.0
- @graphql-tools/utils@10.0.0
8.3.36
Patch Changes
- #5202
05c97eb8Thanks @ardatan ! - dependencies updates:- Updated dependency
@apollo/client@^3↗︎ (from~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0 || ~3.7.0, inpeerDependencies)
- Updated dependency
- Updated dependencies []:
- @graphql-tools/delegate@9.0.33
8.3.35
Patch Changes
-
1c95368aThanks @ardatan ! - Use ranged versions for dependencies -
Updated dependencies []:
- @graphql-tools/delegate@9.0.31
8.3.34
Patch Changes
- Updated dependencies []:
- @graphql-tools/delegate@9.0.30
8.3.33
Patch Changes
- Updated dependencies
[
f26392a6]:- @graphql-tools/delegate@9.0.29
8.3.32
Patch Changes
- Updated dependencies
[
492220cb]:- @graphql-tools/delegate@9.0.28
8.3.31
Patch Changes
- Updated dependencies
[
30bd4d0c]:- @graphql-tools/delegate@9.0.27
8.3.30
Patch Changes
- Updated dependencies
[
b09ea282,b5c8f640]:- @graphql-tools/delegate@9.0.26
- @graphql-tools/utils@9.2.1
8.3.29
Patch Changes
- Updated dependencies
[
a94217e9,62d074be]:- @graphql-tools/utils@9.2.0
- @graphql-tools/delegate@9.0.25
8.3.28
Patch Changes
- Updated dependencies
[
772b948a]:- @graphql-tools/delegate@9.0.24
8.3.27
Patch Changes
- Updated dependencies []:
- @graphql-tools/delegate@9.0.23
8.3.26
Patch Changes
- Updated dependencies
[
a4d36fcc,e3ec35ed]:- @graphql-tools/delegate@9.0.22
- @graphql-tools/utils@9.1.4
8.3.25
Patch Changes
- Updated dependencies
[
13177794]:- @graphql-tools/delegate@9.0.21
8.3.24
Patch Changes
8.3.23
Patch Changes
- Updated dependencies
[
904fe770,904fe770]:- @graphql-tools/utils@9.1.3
- @graphql-tools/delegate@9.0.19
8.3.22
Patch Changes
- Updated dependencies
[
13c24883,b5e6459f]:- @graphql-tools/delegate@9.0.18
- @graphql-tools/utils@9.1.2
8.3.21
Patch Changes
- Updated dependencies
[
7411a5e7]:- @graphql-tools/utils@9.1.1
- @graphql-tools/delegate@9.0.17
8.3.20
Patch Changes
- Updated dependencies []:
- @graphql-tools/delegate@9.0.16
8.3.19
Patch Changes
- Updated dependencies
[
c0639dd0]:- @graphql-tools/utils@9.1.0
- @graphql-tools/delegate@9.0.15
8.3.18
Patch Changes
- Updated dependencies
[
d83b1960]:- @graphql-tools/utils@9.0.1
- @graphql-tools/delegate@9.0.14
8.3.17
Patch Changes
- Updated dependencies []:
- @graphql-tools/delegate@9.0.13
8.3.16
Patch Changes
- Updated dependencies []:
- @graphql-tools/delegate@9.0.12
8.3.15
Patch Changes
- Updated dependencies
[
80836fa7,8f6d3efc,80836fa7,80836fa7,80836fa7]:- @graphql-tools/utils@9.0.0
- @graphql-tools/delegate@9.0.11
8.3.14
Patch Changes
- Updated dependencies
[
f7daf777]:- @graphql-tools/utils@8.13.1
- @graphql-tools/delegate@9.0.10
8.3.13
Patch Changes
- Updated dependencies
[
df5848b8,df5848b8,df5848b8,df5848b8]:- @graphql-tools/delegate@9.0.9
- @graphql-tools/utils@8.13.0
8.3.12
Patch Changes
-
#4701
4689bd6dThanks @renovate ! - dependencies updates:- Updated dependency
@apollo/client@~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0 || ~3.7.0↗︎ (from~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0, inpeerDependencies)
- Updated dependency
-
#4736
f807a537Thanks @renovate ! - dependencies updates:- Updated dependency
@apollo/client@~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0 || ~3.7.0↗︎ (from~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0, inpeerDependencies)
- Updated dependency
8.3.11
Patch Changes
- Updated dependencies
[
0402894d]:- @graphql-tools/delegate@9.0.8
8.3.10
Patch Changes
- Updated dependencies
[
00c4a1a4]:- @graphql-tools/delegate@9.0.7
8.3.9
Patch Changes
- Updated dependencies
[
43c736bd]:- @graphql-tools/utils@8.12.0
- @graphql-tools/delegate@9.0.6
8.3.8
Patch Changes
- Updated dependencies
[
71cb4fae,403ed450]:- @graphql-tools/utils@8.11.0
- @graphql-tools/delegate@9.0.5
8.3.7
Patch Changes
- Updated dependencies
[
4fe3d9c0]:- @graphql-tools/utils@8.10.1
- @graphql-tools/delegate@9.0.4
8.3.6
Patch Changes
- #4640
27bdc237Thanks @ardatan ! - dependencies updates:- Updated dependency
@graphql-tools/delegate@9.0.3↗︎ (was9.0.2, independencies)
- Updated dependency
8.3.5
Patch Changes
- Updated dependencies
[
0555a972]:- @graphql-tools/delegate@9.0.3
8.3.4
Patch Changes
- Updated dependencies
[
29ee7542]:- @graphql-tools/delegate@9.0.2
8.3.3
Patch Changes
- Updated dependencies
[
2609d71f]:- @graphql-tools/utils@8.10.0
- @graphql-tools/delegate@9.0.1
8.3.2
Patch Changes
-
#4624
e3167edcThanks @n1ru4l ! - Fix CommonJS TypeScript resolution withmoduleResolutionnode16ornodenext -
Updated dependencies [
e3167edc,d8dc67aa]:- @graphql-tools/delegate@9.0.0
- @graphql-tools/utils@8.9.1
8.3.1
Patch Changes
- Updated dependencies [2a3b45e3]
- @graphql-tools/utils@8.9.0
- @graphql-tools/delegate@8.8.1
8.3.0
Minor Changes
- d76a299c: Support TypeScript module resolution.
Patch Changes
- Updated dependencies [a0abbbcd]
- Updated dependencies [d76a299c]
- @graphql-tools/utils@8.8.0
- @graphql-tools/delegate@8.8.0
8.2.19
Patch Changes
- Updated dependencies [6df204de]
- Updated dependencies [4914970b]
- @graphql-tools/delegate@8.7.12
- @graphql-tools/utils@8.7.0
8.2.18
Patch Changes
- 041c5ba1: Use caret range for the tslib dependency
- Updated dependencies [041c5ba1]
- @graphql-tools/delegate@8.7.11
- @graphql-tools/utils@8.6.13
8.2.17
Patch Changes
- da7ad43b: Fix GraphQL v17 incompatibility issues and introduce
createGraphQLErrorhelper function for backwards compatibility. - Updated dependencies [da7ad43b]
- @graphql-tools/utils@8.6.12
- @graphql-tools/delegate@8.7.10
8.2.16
Patch Changes
- Updated dependencies [c0762ee3]
- @graphql-tools/utils@8.6.11
- @graphql-tools/delegate@8.7.9
8.2.15
Patch Changes
- Updated dependencies [0fc510cb]
- @graphql-tools/utils@8.6.10
- @graphql-tools/delegate@8.7.8
8.2.14
Patch Changes
- Updated dependencies [31a33e2b]
- @graphql-tools/utils@8.6.9
- @graphql-tools/delegate@8.7.7
8.2.13
Patch Changes
- Updated dependencies [26e4b464]
- @graphql-tools/delegate@8.7.6
8.2.12
Patch Changes
- Updated dependencies [cb238877]
- @graphql-tools/utils@8.6.8
- @graphql-tools/delegate@8.7.5
8.2.11
Patch Changes
-
0bbb1769: Refine generic typings using
extends Xwhen appropriateTypescript 4.7 has stricter requirements around generics which is explained well in the related PR: https://github.com/microsoft/TypeScript/pull/48366
These changes resolve the errors that these packages will face when attempting to upgrade to TS 4.7 (still in beta at the time of writing this). Landing these changes now will allow other TS libraries which depend on these packages to experiment with TS 4.7 in the meantime.
-
Updated dependencies [0bbb1769]
- @graphql-tools/delegate@8.7.4
- @graphql-tools/utils@8.6.7
8.2.10
Patch Changes
- Updated dependencies [fe9402af]
- @graphql-tools/delegate@8.7.3
8.2.9
Patch Changes
- Updated dependencies [904c0847]
- @graphql-tools/utils@8.6.6
- @graphql-tools/delegate@8.7.2
8.2.8
Patch Changes
- @graphql-tools/delegate@8.7.1
8.2.7
Patch Changes
- Updated dependencies [d8fd6b94]
- @graphql-tools/delegate@8.7.0
8.2.6
Patch Changes
- Updated dependencies [be2c02d7]
- @graphql-tools/utils@8.6.5
- @graphql-tools/delegate@8.6.1
8.2.5
Patch Changes
- Updated dependencies [c40e801f]
- Updated dependencies [d36d530b]
- @graphql-tools/delegate@8.6.0
- @graphql-tools/utils@8.6.4
8.2.4
Patch Changes
- 0c0c6857: fix - align versions
- Updated dependencies [0c0c6857]
- @graphql-tools/delegate@8.5.4
8.2.3
Patch Changes
- 3da3d66c: fix - align versions
- Updated dependencies [3da3d66c]
- @graphql-tools/utils@8.6.3
8.2.2
Patch Changes
- 18341363: feat(visitResult): ignore if field not present in visited object
- Updated dependencies [18341363]
- @graphql-tools/delegate@8.5.1
- @graphql-tools/utils@8.6.2
8.2.1
Patch Changes
- 981eef80: enhance: remove isPromise and cleanup file-upload handling
- 4bfb3428: enhance: use ^ for tslib dependency
- Updated dependencies [4bfb3428]
- @graphql-tools/delegate@8.4.1
- @graphql-tools/utils@8.5.1
8.2.0
Minor Changes
- ad04dc79: enhance: make operationType optional
Patch Changes
- Updated dependencies [ad04dc79]
- @graphql-tools/delegate@8.4.0
- @graphql-tools/utils@8.5.0
8.1.0
Minor Changes
- c5b0719c: feat: GraphQL v16 support
Patch Changes
- Updated dependencies [c5b0719c]
- Updated dependencies [c5b0719c]
- Updated dependencies [c5b0719c]
- Updated dependencies [c5b0719c]
- Updated dependencies [c5b0719c]
- @graphql-tools/delegate@8.2.0
- @graphql-tools/utils@8.2.0
8.0.11
Patch Changes
- e50852e6: use version ranges instead of a fixed version for the graphql-tools package versions
- Updated dependencies [631b11bd]
- Updated dependencies [e50852e6]
- @graphql-tools/delegate@8.1.0
8.0.10
Patch Changes
- Updated dependencies [2c807ddb]
- @graphql-tools/utils@8.1.1
- @graphql-tools/delegate@8.0.10
8.0.9
Patch Changes
- Updated dependencies [9a13357c]
- @graphql-tools/delegate@8.0.9
8.0.8
Patch Changes
- Updated dependencies [b9684631]
- Updated dependencies [9ede806a]
- Updated dependencies [67691b78]
- @graphql-tools/utils@8.1.0
- @graphql-tools/delegate@8.0.8
8.0.7
Patch Changes
- Updated dependencies [d47dcf42]
- @graphql-tools/delegate@8.0.7
8.0.6
Patch Changes
- Updated dependencies [ded29f3d]
- @graphql-tools/delegate@8.0.6
8.0.5
Patch Changes
- Updated dependencies [7fdef335]
- @graphql-tools/delegate@8.0.5
8.0.4
Patch Changes
- Updated dependencies [04830049]
- @graphql-tools/utils@8.0.2
- @graphql-tools/delegate@8.0.4
8.0.3
Patch Changes
- Updated dependencies [b823dbaf]
- @graphql-tools/utils@8.0.1
- @graphql-tools/delegate@8.0.3
8.0.2
Patch Changes
- Updated dependencies [d93945fa]
- @graphql-tools/delegate@8.0.2
8.0.1
Patch Changes
- c36defbe: fix(delegate): fix ESM import
- Updated dependencies [c36defbe]
- @graphql-tools/delegate@8.0.1
8.0.0
Major Changes
-
dae6dc7b: refactor: ExecutionParams type replaced by Request type
rootValue property is now a part of the Request type.
When delegating with delegateToSchema, rootValue can be set multiple ways:
- when using a custom executor, the custom executor can utilize a rootValue in whichever custom way it specifies.
- when using the default executor (execute/subscribe from graphql-js): — rootValue can be passed to delegateToSchema via a named option — rootValue can be included within a subschemaConfig — otherwise, rootValue is inferred from the originating schema
When using wrapSchema/stitchSchemas, a subschemaConfig can specify the createProxyingResolver function which can pass whatever rootValue it wants to delegateToSchema as above.
-
c42e811d: BREAKING CHANGES;
- Rename
RequesttoExecutionRequest - Add required
operationType: OperationTypeNodefield inExecutionRequest - Add
contextincreateRequestandcreateRequestInfoinstead ofdelegateToSchema
It doesn’t rely on info.operation.operationType to allow the user to call an operation from different root type. And it doesn’t call getOperationAST again and again to get operation type from the document/operation because we have it in Request and ExecutionParams https://github.com/ardatan/graphql-tools/pull/3166/files#diff-d4824895ea613dcc1f710c3ac82e952fe0ca12391b671f70d9f2d90d5656fdceR38
Improvements;
- Memoize
defaultExecutorfor a singleGraphQLSchemaso allowgetBatchingExecutorto memoizebatchingExecutorcorrectly. - And there is no different
defaultExecutoris created forsubscriptionand other operation types. Only one executor is used.
Batch executor is memoized by
executorreference butcreateDefaultExecutordidn’t memoize the default executor so this memoization wasn’t working correctly onbatch-executeside. https://github.com/ardatan/graphql-tools/blob/remove-info-executor/packages/batch-execute/src/getBatchingExecutor.ts#L9 - Rename
-
c0ca3190: BREAKING CHANGE
- Remove Subscriber and use only Executor
-
- Now
Executorcan receiveAsyncIterableand subscriptions will also be handled byExecutor. This is a future-proof change for defer, stream and live queries
- Now
Minor Changes
- 7d3e3006: feat(links): Respect operationName
Patch Changes
- Updated dependencies [af9a78de]
- Updated dependencies [7d3e3006]
- Updated dependencies [9c26b847]
- Updated dependencies [7d3e3006]
- Updated dependencies [d53e3be5]
- Updated dependencies [7d3e3006]
- Updated dependencies [dae6dc7b]
- Updated dependencies [6877b913]
- Updated dependencies [c42e811d]
- Updated dependencies [7d3e3006]
- Updated dependencies [8c8d4fc0]
- Updated dependencies [7d3e3006]
- Updated dependencies [aa43054d]
- Updated dependencies [7d3e3006]
- Updated dependencies [74581cf3]
- Updated dependencies [c0ca3190]
- Updated dependencies [982c8f53]
- Updated dependencies [7d3e3006]
- Updated dependencies [7d3e3006]
- @graphql-tools/utils@8.0.0
- @graphql-tools/delegate@8.0.0
7.1.0
Minor Changes
- 58fd4b28: feat(types): add TContext to stitchSchemas and executor
Patch Changes
- Updated dependencies [58fd4b28]
- Updated dependencies [43da6b59]
- @graphql-tools/delegate@7.1.0
- @graphql-tools/utils@7.7.0
7.0.6
Patch Changes
- 1516c89a: fix(links): fix typing issues with linkToExecutor and AsyncExecutor
7.0.5
Patch Changes
- f80ce4f4: enhance(url-loader/links): use new form-data that already supports streams
7.0.4
Patch Changes
- 24926654: fix(links): peer dependency issue
- Updated dependencies [24926654]
- @graphql-tools/delegate@7.0.10
7.0.3
Patch Changes
- a74f885c: links should behave like other packages when releasing and not publish new versions with minor updates of internal dependencies
- Updated dependencies [856e23fa]
- Updated dependencies [e3176633]
- @graphql-tools/delegate@7.0.3
- @graphql-tools/utils@7.0.2
7.0.2
Patch Changes
- 16bb2fdd: fix(links): refactor and fully fix types (#2148)
- Updated dependencies [718eda30]
- @graphql-tools/delegate@7.0.2
7.0.1
Patch Changes
- 38f6decf: use identical ExecutionParams across packages to facilitate TS compilation in strict mode
7.0.0
Major Changes
-
2b6c813e: feat(links): AC3 support
apollo-linkhas been deprecated so this package now uses@apollo/clientas peer dependency; You can see more on migration guide.
Patch Changes
- Updated dependencies [8133a907]
- Updated dependencies [2b6c813e]
- @graphql-tools/utils@7.0.1
6.2.5
Patch Changes
-
be1a1575: ## Breaking Changes:
Schema Generation and Decoration API (
@graphql-tools/schema)-
Resolver validation options should now be set to
error,warnorignorerather thantrueorfalse. In previous versions, some of the validators caused errors to be thrown, while some issued warnings. This changes brings consistency to validator behavior. -
The
allowResolversNotInSchemahas been renamed torequireResolversToMatchSchema, to harmonize the naming convention of all the validators. The default setting ofrequireResolversToMatchSchemaiserror, matching the previous behavior.
Schema Delegation (
delegateToSchema&@graphql-tools/delegate)-
The
delegateToSchemareturn value has matured and been formalized as anExternalObject, in which all errors are integrated into the GraphQL response, preserving their initial path. Those advanced users accessing the result directly will note the change in error handling. This also allows for the deprecation of unnecessary helper functions includingslicedError,getErrors,getErrorsByPathSegmentfunctions. Only external errors with missing or invalid paths must still be preserved by annotating the remote object with special properties. The newgetUnpathedErrorsfunction is therefore necessary for retrieving only these errors. Note also the newannotateExternalObjectandmergeExternalObjectsfunctions, as well as the renaming ofhandleResulttoresolveExternalValue. -
Transform types and the
applySchemaTransformsare now relocated to thedelegatepackage;applyRequestTransforms/applyResultTransformsfunctions have been deprecated, however, as this functionality has been replaced since v6 by theTransformerabstraction. -
The
transformRequest/transformResultmethods are now provided additionaldelegationContextandtransformationContextarguments — these were introduced in v6, but previously optional. -
The
transformSchemamethod may wish to create additional delegating resolvers and so it is now provided thesubschemaConfigand final (non-executable)transformedSchemaparameters. As in v6, thetransformSchemais kicked off once to produce the non-executable version, and then, if a wrapping schema is being generated, proxying resolvers are created with access to the (non-executable) initial result. In v7, the individualtransformSchemamethods also get access to the result of the first run, if necessary, they can create additional wrapping schema proxying resolvers. -
applySchemaTransformsparameters have been updated to match and support thetransformSchemaparameters above.
Remote Schemas & Wrapping (
wrapSchema,makeRemoteExecutableSchema, and@graphql-tools/wrap)-
wrapSchemaandgenerateProxyingResolversnow only take a single options argument with named properties of typeSubschemaConfig. The previously possible shorthand version with first argument consisting of aGraphQLSchemaand second argument representing the transforms should be reworked as aSubschemaConfigobject. -
Similarly, the
ICreateProxyingResolverOptionsinterface that provides the options for thecreateProxyingResolverproperty ofSubschemaConfigoptions has been adjusted. Theschemaproperty previously could be set to aGraphQLSchemaor aSubschemaConfigobject. This property has been removed in favor of asubschemaConfigproperty that will always be aSubschemaConfigobject. Thetransformsproperty has been removed; transforms should be included within theSubschemaConfigobject.` -
The format of the wrapping schema has solidified. All non-root fields are expected to use identical resolvers, either
defaultMergedResolveror a custom equivalent, with root fields doing the hard work of proxying. Support for custom merged resolvers throughtcreateMergedResolverhas been deprecated, as custom merging resolvers conflicts when using stitching’s type merging, where resolvers are expected to be identical across subschemas. -
The
WrapFieldstransform’swrappingResolveroption has been removed, as this complicates multiple wrapping layers, as well as planned functionality to wrap subscription root fields in potentially multiple layers, as the wrapping resolvers may be different in different layers. Modifying resolvers can still be performed by use of an additional transform such asTransformRootFieldsorTransformObjectFields. -
The
ExtendSchematransform has been removed, as it is conceptually simpler just to usestitchSchemaswith one subschema. -
The
ReplaceFieldsWithFragment,AddFragmentsByField,AddSelectionSetsByField, andAddMergedTypeSelectionSetstransforms has been removed, as they are superseded by theAddSelectionSetsandVisitSelectionSetstransforms. TheAddSelectionSetspurposely takes parsed SDL rather than strings, to nudge end users to parse these strings at build time (when possible), rather than at runtime. Parsing of selection set strings can be performed using theparseSelectionSetfunction from@graphql-tools/utils.
Schema Stitching (
stitchSchemas&@graphql-tools/stitch)-
stitchSchemas’smergeTypesoption is now true by default! This causes theonTypeConflictoption to be ignored by default. To useonTypeConflictto select a specific type instead of simply merging, simply setmergeTypesto false. -
schemasargument has been deprecated, usesubschemas,typeDefs, ortypes, depending on what you are stitching. -
When using batch delegation in type merging, the
argsFromKeysfunction is now set only via theargsFromKeysproperty. Previously, ifargsFromKeyswas absent, it could be read fromargs. -
Support for fragment hints has been removed in favor of selection set hints.
-
stitchSchemasnow processes allGraphQLSchemaandSubschemaConfigsubschema input into newSubschemaobjects, handling schema config directives such aso@computedas well as generating the final transformed schema, stored as thetransformedSchemaproperty, if transforms are used. Signatures of theonTypeConflict,fieldConfigMerger, andinputFieldConfigMergerhave been updated to include metadata related to the original and transformed subschemas. Note the property name change foronTypeConflictfromschematosubschema.
Mocking (
addMocksToSchemaand@graphql-tools/mock)- Mocks returning objects with fields set as functions are now operating according to upstream
graphql-js convention, i.e. these functions take three arguments,
args,context, andinfowithparentavailable asthisrather than as the first argument.
Other Utilities (
@graphql-tools/utils)filterSchema’sfieldFilterwill now filter all fields across Object, Interface, and Input types. For the previous Object-only behavior, switch to theobjectFieldFilteroption.- Unused
fieldNodesutility functions have been removed. - Unused
typeContainsSelectionSetfunction has been removed, andtypesContainSelectionSethas been moved to thestitchpackage. - Unnecessary
Operationtype has been removed in favor ofOperationTypeNodefrom upstream graphql-js. - As above,
applySchemaTransforms/applyRequestTransforms/applyResultTransformshave been removed from theutilspackage, as they are implemented elsewhere or no longer necessary.
Related Issues
- proxy all the errors: #1047, #1641
- better error handling for merges #2016, #2062
- fix typings #1614
- disable implicit schema pruning #1817
- mocks not working for functions #1807
-
-
Updated dependencies [be1a1575]
- @graphql-tools/utils@7.0.0
6.2.4
Patch Changes
- 533d6d53: Bump all packages to allow adjustments
- Updated dependencies [32c3c4f8]
- Updated dependencies [533d6d53]
- @graphql-tools/utils@6.2.4