@graphql-tools/batch-execute
10.3.2 · 9 Nov 2026MIT15.5M / weekRepositorynpmAtom feed
7.1.2 is the newest release of 7.x.
In short
25 breaking1 fixed4 changed1 internal
- Breaking
- Breaking
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. - Breaking
The
allowResolversNotInSchemahas been renamed torequireResolversToMatchSchema, to harmonize the naming convention of all the validators. The default setting ofrequireResolversToMatchSchemaiserror, matching the previous behavior. - Breaking
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. - Breaking
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. - Breaking
The
transformRequest/transformResultmethods are now provided additionaldelegationContextandtransformationContextarguments -- these were introduced in v6, but previously optional. - Breaking
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. - Breaking
applySchemaTransformsparameters have been updated to match and support thetransformSchemaparameters above.
Release note
The section about @graphql-tools/batch-execute of a note shared by several packages.
Major Changes
- Breaking
Breaking Changes:
Schema Generation and Decoration API (@graphql-tools/schema)
- Breaking
Resolver validation options should now be set to
error,warnorignorerather thantrue
orfalse. In previous versions, some of the validators caused errors to be thrown, while some
issued warnings. This changes brings consistency to validator behavior. - Breaking
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)
- Breaking
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. - Breaking
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. - Breaking
The
transformRequest/transformResultmethods are now provided additionaldelegationContext
andtransformationContextarguments -- these were introduced in v6, but previously optional. - Breaking
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. - Breaking
applySchemaTransformsparameters have been updated to match and support thetransformSchema
parameters above.
Remote Schemas & Wrapping (wrapSchema, makeRemoteExecutableSchema, and @graphql-tools/wrap)
- Breaking
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. - Breaking
Similarly, the
ICreateProxyingResolverOptionsinterface that provides the options for thecreateProxyingResolverproperty ofSubschemaConfigoptions has been adjusted. Theschema
property 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.` - Breaking
The format of the wrapping schema has solidified. All non-root fields are expected to use
identical resolvers, eitherdefaultMergedResolveror 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. - Breaking
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. - Breaking
The
ExtendSchematransform has been removed, as it is conceptually simpler just to usestitchSchemaswith one subschema. - Breaking
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)
- Breaking
stitchSchemas'smergeTypesoption is now true by default! This causes theonTypeConflict
option to be ignored by default. To useonTypeConflictto select a specific type instead of
simply merging, simply setmergeTypesto false. - Breaking
schemasargument has been deprecated, usesubschemas,typeDefs, ortypes, depending on
what you are stitching. - Breaking
When using batch delegation in type merging, the
argsFromKeysfunction is now set only via theargsFromKeysproperty. Previously, ifargsFromKeyswas absent, it could be read fromargs. - Breaking
Support for fragment hints has been removed in favor of selection set hints.
- Breaking
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 (addMocksToSchema and @graphql-tools/mock)
- Breaking
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, andinfo
withparentavailable asthisrather than as the first argument.
Other Utilities (@graphql-tools/utils)
- Breaking
filterSchema'sfieldFilterwill now filter all fields across Object, Interface, and Input
types. For the previous Object-only behavior, switch to theobjectFieldFilteroption. - Breaking
Unused
fieldNodesutility functions have been removed. - Breaking
Unused
typeContainsSelectionSetfunction has been removed, andtypesContainSelectionSethas
been moved to thestitchpackage. - Breaking
Unnecessary
Operationtype has been removed in favor ofOperationTypeNodefrom upstream
graphql-js. - Breaking
As above,
applySchemaTransforms/applyRequestTransforms/applyResultTransformshave been
removed from theutilspackage, as they are implemented elsewhere or no longer necessary.
Related Issues
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.