@graphql-tools/merge
9.1.1
Patch Changes
-
#7298
984d542Thanks @jdolle ! - dependencies updates:- Removed dependency
@theguild/federation-composition@^0.19.0↗︎ (fromdependencies)
- Removed dependency
-
#7298
984d542Thanks @jdolle ! - Fix “Named export ‘OperationTypeNode’ not found” -
Updated dependencies [
32d0457]:- @graphql-tools/utils@10.9.1
9.1.0
Minor Changes
- #7249
e5f98c2Thanks @jdolle ! - Support repeatable @link-ed federation directives; fix merging non-identical, repeatable directives
Patch Changes
-
#7249
e5f98c2Thanks @jdolle ! - dependencies updates:- Added dependency
@theguild/federation-composition@^0.16.0↗︎ (todependencies)
- Added dependency
-
#7276
3c21496Thanks @renovate ! - dependencies updates:- Updated dependency
@theguild/federation-composition@^0.19.0↗︎ (from^0.16.0, independencies)
- Updated dependency
-
Updated dependencies [
22af985,53db005]:- @graphql-tools/utils@10.9.0
9.0.24
Patch Changes
- Updated dependencies
[
d123e26]:- @graphql-tools/utils@10.8.6
9.0.23
Patch Changes
-
#7028
4899c62Thanks @ardatan ! - Prevent prototype polluting assignment -
Updated dependencies [
90a717e,26518de]:- @graphql-tools/utils@10.8.5
9.0.22
Patch Changes
- Updated dependencies
[
155944b]:- @graphql-tools/utils@10.8.4
9.0.21
Patch Changes
- Updated dependencies
[
4a2eb14]:- @graphql-tools/utils@10.8.3
9.0.20
Patch Changes
- Updated dependencies
[
3547bba]:- @graphql-tools/utils@10.8.2
9.0.19
Patch Changes
- Updated dependencies
[
651a5dc]:- @graphql-tools/utils@10.8.1
9.0.18
Patch Changes
9.0.17
Patch Changes
9.0.16
Patch Changes
- Updated dependencies
[
4912f19]:- @graphql-tools/utils@10.7.1
9.0.15
Patch Changes
- Updated dependencies
[
2c70d27]:- @graphql-tools/utils@10.7.0
9.0.14
Patch Changes
- Updated dependencies
[
6a8123b]:- @graphql-tools/utils@10.6.4
9.0.13
Patch Changes
- Updated dependencies
[
020b9e4]:- @graphql-tools/utils@10.6.3
9.0.12
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.11
Patch Changes
- Updated dependencies
[
1e02935]:- @graphql-tools/utils@10.6.1
9.0.10
Patch Changes
- Updated dependencies
[
414e404]:- @graphql-tools/utils@10.6.0
9.0.9
Patch Changes
- Updated dependencies
[
dc5043b]:- @graphql-tools/utils@10.5.6
9.0.8
Patch Changes
- Updated dependencies
[
cf2ce5e]:- @graphql-tools/utils@10.5.5
9.0.7
Patch Changes
9.0.6
Patch Changes
-
Updated dependencies [
0286437]:- @graphql-tools/utils@10.5.4
9.0.5
Patch Changes
-
b8bf584Thanks @ardatan ! - Introduce `getDirectiveExtensions` and refactor directive handling in the extensions -
Updated dependencies [
b8bf584]:- @graphql-tools/utils@10.4.0
9.0.4
Patch Changes
- #6111
a06dbd2Thanks @lesleydreyer ! - Fix directive merging when directive name is inherited from object prototype (i.e. toString)
9.0.3
Patch Changes
- #5913
83c0af0Thanks @enisdenjo ! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.0.13↗︎ (from^10.0.10, independencies)
- Updated dependency
9.0.2
Patch Changes
9.0.1
Patch Changes
-
a570a601Thanks @ardatan ! - Add respectArrays flag to extensions merging -
Updated dependencies [
a570a601]:- @graphql-tools/utils@10.0.10
9.0.0
Major Changes
Patch Changes
8.4.2
Patch Changes
8.4.1
Patch Changes
8.4.0
Minor Changes
- #5075
04e3ecb9Thanks @simplecommerce ! - Added onFieldTypeConflict option to handle manual conflicts for mergeTypeDef and reverseArguments option to select left side arguments if specified.
8.3.18
Patch Changes
- Updated dependencies
[
b5c8f640]:- @graphql-tools/utils@9.2.1
8.3.17
Patch Changes
8.3.16
Patch Changes
8.3.15
Patch Changes
- Updated dependencies
[
e3ec35ed]:- @graphql-tools/utils@9.1.4
8.3.14
Patch Changes
- Updated dependencies
[
904fe770]:- @graphql-tools/utils@9.1.3
8.3.13
Patch Changes
- Updated dependencies
[
13c24883]:- @graphql-tools/utils@9.1.2
8.3.12
Patch Changes
- Updated dependencies
[
7411a5e7]:- @graphql-tools/utils@9.1.1
8.3.11
Patch Changes
- Updated dependencies
[
c0639dd0]:- @graphql-tools/utils@9.1.0
8.3.10
Patch Changes
- Updated dependencies
[
d83b1960]:- @graphql-tools/utils@9.0.1
8.3.9
Patch Changes
8.3.8
Patch Changes
- Updated dependencies
[
f7daf777]:- @graphql-tools/utils@8.13.1
8.3.7
Patch Changes
8.3.6
Patch Changes
- Updated dependencies
[
43c736bd]:- @graphql-tools/utils@8.12.0
8.3.5
Patch Changes
8.3.4
Patch Changes
- Updated dependencies
[
4fe3d9c0]:- @graphql-tools/utils@8.10.1
8.3.3
Patch Changes
-
#4643
2609d71fThanks @ardatan ! - Revert the breaking change introduced in@graphql-tools/merge -
Updated dependencies [
2609d71f]:- @graphql-tools/utils@8.10.0
8.3.2
Patch Changes
-
#4624
e3167edcThanks @n1ru4l ! - Fix CommonJS TypeScript resolution withmoduleResolutionnode16ornodenext -
Updated dependencies [
e3167edc]:- @graphql-tools/utils@8.9.1
8.3.1
Patch Changes
- Updated dependencies [2a3b45e3]
- @graphql-tools/utils@8.9.0
8.3.0
Minor Changes
- d76a299c: Support TypeScript module resolution.
Patch Changes
- Updated dependencies [a0abbbcd]
- Updated dependencies [d76a299c]
- @graphql-tools/utils@8.8.0
8.2.15
Patch Changes
- Updated dependencies [4914970b]
- @graphql-tools/utils@8.7.0
8.2.14
Patch Changes
- 041c5ba1: Use caret range for the tslib dependency
- Updated dependencies [041c5ba1]
- @graphql-tools/utils@8.6.13
8.2.13
Patch Changes
- Updated dependencies [da7ad43b]
- @graphql-tools/utils@8.6.12
8.2.12
Patch Changes
- Updated dependencies [c0762ee3]
- @graphql-tools/utils@8.6.11
8.2.11
Patch Changes
- Updated dependencies [0fc510cb]
- @graphql-tools/utils@8.6.10
8.2.10
Patch Changes
- Updated dependencies [31a33e2b]
- @graphql-tools/utils@8.6.9
8.2.9
Patch Changes
- Updated dependencies [cb238877]
- @graphql-tools/utils@8.6.8
8.2.8
Patch Changes
- Updated dependencies [0bbb1769]
- @graphql-tools/utils@8.6.7
8.2.7
Patch Changes
- Updated dependencies [904c0847]
- @graphql-tools/utils@8.6.6
8.2.6
Patch Changes
- Updated dependencies [be2c02d7]
- @graphql-tools/utils@8.6.5
8.2.5
Patch Changes
- Updated dependencies [d36d530b]
- @graphql-tools/utils@8.6.4
8.2.4
Patch Changes
- 0c0c6857: fix - align versions
8.2.3
Patch Changes
- 18341363: feat(visitResult): ignore if field not present in visited object
- Updated dependencies [18341363]
- @graphql-tools/utils@8.6.2
8.2.2
Patch Changes
- 12691405: Update
mergeTypeDefsto mergeimplementsdefinitions defined within interface extensions.
8.2.1
Patch Changes
- 4bfb3428: enhance: use ^ for tslib dependency
- Updated dependencies [4bfb3428]
- @graphql-tools/utils@8.5.1
8.2.0
Minor Changes
- 149afddb: fix: getting ready for GraphQL v16
Patch Changes
- Updated dependencies [149afddb]
- @graphql-tools/utils@8.4.0
8.1.2
Patch Changes
- 9a005161: fix(merge): convertExtensions should convert extensions to regular definitions not other way around
8.1.1
Patch Changes
- d4918a78: fix(commentDescriptions): handle descriptions and comments correctly during merge
- Updated dependencies [d4918a78]
- @graphql-tools/utils@8.2.2
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/utils@8.2.0
8.0.3
Patch Changes
- c8c13ed1: enhance: remove TypeMap and small improvements
- Updated dependencies [c8c13ed1]
- @graphql-tools/utils@8.1.2
8.0.2
Patch Changes
- e50852e6: use version ranges instead of a fixed version for the graphql-tools package versions
8.0.1
Patch Changes
- Updated dependencies [2c807ddb]
- @graphql-tools/utils@8.1.1
8.0.0
Major Changes
-
67691b78: -
schemaExtensionsoption has been added tomergeSchemas,makeExecutableSchemaandstitchSchemasconfigurationsBreaking Changes;
- Move
mergeSchemasandMergeSchemasConfigfrom@graphql-tools/mergeto@graphql-tools/schemapackage to prevent circular dependency between them. mergeSchemasAsynchas been removed.- Move
NamedDefinitionNode,resetComments,collectComment,pushCommentandprintCommentfrom@graphql-tools/mergeto@graphql-tools/utils.
- Move
Patch Changes
- a5fb77a4: fix(merge): ignore comments while merging directives #3031
- Updated dependencies [b9684631]
- Updated dependencies [9ede806a]
- Updated dependencies [67691b78]
- @graphql-tools/utils@8.1.0
7.0.0
Major Changes
- 4992b472: BREAKING: change type signature and generic parameters of
mergeResolvers
Patch Changes
- @graphql-tools/schema@8.0.3
6.2.17
Patch Changes
- Updated dependencies [04830049]
- @graphql-tools/utils@8.0.2
- @graphql-tools/schema@8.0.2
6.2.16
Patch Changes
- Updated dependencies [b823dbaf]
- @graphql-tools/utils@8.0.1
- @graphql-tools/schema@8.0.1
6.2.15
Patch Changes
- a31f9593: fix(merge): handle schema definitions correctly
- Updated dependencies [af9a78de]
- Updated dependencies [9c26b847]
- Updated dependencies [7d3e3006]
- Updated dependencies [7d3e3006]
- Updated dependencies [dae6dc7b]
- Updated dependencies [6877b913]
- Updated dependencies [7d3e3006]
- Updated dependencies [c42e811d]
- Updated dependencies [7d3e3006]
- Updated dependencies [8c8d4fc0]
- Updated dependencies [7d3e3006]
- Updated dependencies [7d3e3006]
- Updated dependencies [7d3e3006]
- Updated dependencies [74581cf3]
- Updated dependencies [c0ca3190]
- Updated dependencies [7d3e3006]
- Updated dependencies [982c8f53]
- Updated dependencies [7d3e3006]
- Updated dependencies [7d3e3006]
- Updated dependencies [7d3e3006]
- @graphql-tools/utils@8.0.0
- @graphql-tools/schema@8.0.0
6.2.14
Patch Changes
- eae28793: fix(merge): handle undefined interfaces array on ObjectTypeDefinitionNode #2629
6.2.13
Patch Changes
- 60a9c9a5: fix(merge): handle arrays correctly
6.2.12
Patch Changes
- 68946667: fix(merge): fix handling schema definitions with convertExtensions flag
6.2.11
Patch Changes
- 43da6b59: enhance(merge): reduce number of iterations
- Updated dependencies [58fd4b28]
- Updated dependencies [43da6b59]
- @graphql-tools/utils@7.7.0
6.2.10
Patch Changes
-
0194118f: Introduces a suite of stitched schema validations that enforce the integrity of merged schemas. This includes validations for:
- Strict and safe null consistency (the later of which allows safe transitions in nullability).
- Named type consistency with the option to whitelist proxiable scalar mappings.
- Argument and input field name consistency.
- Enum value consistency when used as an input value.
Validations may be adjusted by setting
validationLeveltooff|warn|errorglobally or scoped for specific types and fields. In this initial v7 release, all validations are introduced at thewarnthreshold for backwards compatibility. Most of these validations will become automatic errors in v8. To enable validation errors now, setvalidationLevel: 'error'. Full configuration options look like this:const gatewaySchema = stitchSchemas({ subschemas: [...], typeMergingOptions: { validationSettings: { validationLevel: 'error', strictNullComparison: false, // << gateway "String" may proxy subschema "String!" proxiableScalars: { ID: ['String'], // << gateway "ID" may proxy subschema "String" } }, validationScopes: { // scope to specific element paths 'User.id': { validationLevel: 'warn', strictNullComparison: true, }, } }, });
6.2.9
Patch Changes
- 219ed392: enhance(load/module-loader/merge): use getDocumentNodeFromSchema instead of parse and printSchemaWithDirectives together
- Updated dependencies [219ed392]
- Updated dependencies [219ed392]
- Updated dependencies [219ed392]
- @graphql-tools/utils@7.5.0
6.2.8
Patch Changes
- 8f331aaa: enhance(load/module-loader/merge): use getDocumentNodeFromSchema instead of parse and printSchemaWithDirectives together
- Updated dependencies [8f331aaa]
- Updated dependencies [8f331aaa]
- @graphql-tools/utils@7.4.0
6.2.7
Patch Changes
- d9b82a2e: fix(merge/stitch) consistent enum value merge
- d9b82a2e: enhance(stitch) canonical merged type and field definitions. Use the @canonical directive to promote preferred type and field descriptions into the combined gateway schema.
6.2.6
Patch Changes
- 878c36b6: enhance(stitch): use mergeScalar from merge
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/schema@7.0.0
- @graphql-tools/utils@7.0.0
6.2.4
Patch Changes
- 32c3c4f8: Fix duplication of scalar directives in merge
- 32c3c4f8: Support scalar extensions by merging directives
- 533d6d53: Bump all packages to allow adjustments
- Updated dependencies [32c3c4f8]
- Updated dependencies [533d6d53]
- @graphql-tools/utils@6.2.4
- @graphql-tools/schema@6.2.4