@graphql-tools/utils
13.2.2 · 10 Nov 2026MIT57M / weekRepositoryHomepagenpmAtom feed
8.13.1 is the newest release of 8.x.
In short
5 breaking1 removed1 new1 fixed
- Breaking
BREAKING CHANGE
- Breaking
ExecutionParams type replaced by Request type
- Breaking
BREAKING CHANGES;
- Breaking
Remove cloneSchema
- Breaking
getDirectives: Preserve order around repeatable directives
- Removed
enhance(loaders): remove optional methods from the Loader interface
Security
1 advisory affects 8.0.0; 12.0.1 fixes them
- HighGraphQL Tools has prototype pollution in well-established utility function `mergeDeep`GHSA-7mx3-vvmw-hjmv · 5 Oct 2026Fixed in 12.0.1
Release note
Major Changes
- Breaking
BREAKING CHANGE
Now each loader handles glob patterns internally and returns an array of
Sourceobject instead of singleSourceGraphQL Tag Pluck now respects code locations and returns graphql-js
Sourceobjects for each found code blockThanks to the one above,
CodeFileLoadernow returns differentSourceobjects for each found SDL code block.
- Breaking
BREAKING CHANGE
Remove
fieldToFieldConfig,argsToFieldConfigArgumentandargumentToArgumentConfigYou can use
.toConfigmethod instead for each.
- Breaking
BREAKING CHANGE
Legacy Schema Directives and Directive Resolvers have been removed
You can check the new method for both;
- Breaking
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.
- Breaking
BREAKING CHANGES;
mergeDeepnow takes an array of sources instead of set of parameters as input and it takes an additional flag to enable prototype merging
Instead ofmergeDeep(...sources)=>mergeDeep(sources) - Breaking
BREAKING CHANGES;
Rename
RequesttoExecutionRequestAdd required
operationType: OperationTypeNodefield inExecutionRequestAdd
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
#3166Improvements;
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.
github.com/ardatan/graphql-tools/blob/remove-in… - Breaking
BREAKING CHANGE
Now it uses the native
AggregateErrorimplementation. The major difference is the individual errors are kept undererrorsproperty instead of the object itself withSymbol.iterator.
// From; for (const error of aggregateError) // To; for (const error of aggregateError.errors)
- Breaking
Remove cloneSchema
- Breaking
BREAKING CHANGE
No longer exports
debugLogbut usesconsole.logdirectly only ifDEBUGis available underprocess.env
- Breaking
BREAKING CHANGE
No longer applies
camelCasenaming convention inbuildOperationNodeForField
- Breaking
getDirectives: Preserve order around repeatable directives
BREAKING CHANGE: getDirectives now always return an array of individual DirectiveAnnotation objects consisting of
nameandargsproperties.New useful function
getDirectivereturns an array of objects representing any args for each use of a single directive (returning the empty object{}when a directive is used without arguments).Note: The
getDirectivefunction returns an array even when the specified directive is non-repeatable. This is because one use of this function is to throw an error if more than one directive annotation is used for a non repeatable directive!When specifying directives in extensions, one can use either the old or new format.
- Breaking
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
- Breaking
BREAKING CHANGE
No longer exports
SchemaVisitor,visitSchemaandVisitSchemaKindUse
mapSchemainstead
Minor Changes
- Removed
enhance(loaders): remove optional methods from the Loader interface
utils: Respect operationName and rootValue in ExecutionParams
Patch Changes
enhance(utils): refactor, cleanup and remove extra work
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.