npm / @graphql-tools/utils
@graphql-tools/utils
What changed in @graphql-tools/utils 8 to 13, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.
48 breaking3 security1 deprecations20 new APIs and options2 performance8 behavior and defaults23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@graphql-tools/utils 1342 changes
Breaking changes 22
createStub returns graphql-js specified scalars for String, ID, Int, Float, and Boolean instead of building an object or input with that name.
Configuration is consolidated into a single .yml file, replacing CLI flags, gql-gen.json, and environment variables.
Removed along with graphqlJSCompat; use graphql@16+ APIs such as getArgumentValues.
Removed along with createDeferredPromise; use Promise.withResolvers().
Removed along with createDeferred; use Promise.withResolvers().
Removed; construct errors with GraphQLError from graphql instead.
Removed along with debugTimerStart; use your own timing or console.time if needed.
Removed along with debugTimerEnd; use your own timing or console.time if needed.
Node.js >=22.18.0 is now required.
Removed along with registerAbortSignalListener; use AbortSignal APIs.
Removed from @graphql-tools/utils; import it from graphql instead.
Removed along with the cancellation helpers; handle cancellation on the iterator's return() or transport abort path.
The graphql peer range is now ^16.0.0 || ^17.0.0; GraphQL v14 and v15 are no longer supported.
Update NPM scripts to run graphql-codegen without CLI flags, using codegen.yml for configuration.
Replace the deprecated graphql-codegen-typescript-template package with this plugins package.
Removed along with coerceInputs; use graphql@16+ APIs such as getArgumentValues.
Removed from @graphql-tools/utils; import promise helpers from @whatwg-node/promise-helpers.
Removed; use handleMaybePromise from @whatwg-node/promise-helpers.
Removed from @graphql-tools/utils; use the helper from @whatwg-node/promise-helpers.
The exported type was removed; use the built-in PromiseWithResolvers<T> or the return type of Promise.withResolvers().
Removed along with getAbortPromise; use AbortSignal APIs.
Removed along with the async-iterable cancellation helpers; handle cancellation on the iterator's return() or transport abort path.
New APIs and options 10
loadDocuments, loadTypedefs, GraphQLFileLoader, and CodeFileLoader accept errorHandling: throw, aggregate, or return, letting callers choose how load and parse failures are handled.
Source has an optional error field, allowing failed sources returned with errorHandling: 'return' to expose the failure without a document.
A helper for getting the default incremental delivery spec.
A helper for getting incremental spec parameter names.
A helper for getting the multipart content type.
Provides a shared HTTP contract mapping Accept and Content-Type parameters to executor payload IDs, so servers can look up spec strings instead of hardcoding them.
A helper for looking up an incremental delivery spec.
Pass incrementalSpec as 'v0.1' or 'v0.2' on execute, subscribe, normalizedExecutor, or ExecutionRequest to select the incremental delivery payload format; 'v0.1' remains the default.
Adds a helper for GraphQL 16/17 VariableValues compatibility when calling getArgumentValues.
Adds a helper to normalize getVariableValues results for GraphQL 16/17 VariableValues compatibility.
Performance 2
Results are cached across executions when the document has no variable-conditional @skip, @include, or @defer, omitting variableValues from the cache key.
rewireTypes rebuilds only types that reference a replaced type; unaffected types keep the same JavaScript object.
Behavior and default changes 1
Supports merging v0.2 payloads by tracking pending ids, placing deferred data and streamed items, and folding completed errors into errors.
Fixes and other changes 7
Prints argument and input field defaults configured with the deprecated defaultValue on graphql 17, where default is undefined.
Preserves falsy singleton values when GraphQL coerces them into a list, rather than turning them into an empty list.
Published types preserve a reference to TypeScript's esnext.disposable lib, avoiding missing Disposable names for consumers without skipLibCheck or a full esnext lib.
Walks directive arguments too, so makeExecutableSchema enum resolvers get the same result.
Remaps directive argument defaults using the source type before parsing with the remapped type, preserving the intended internal value.
Preserves original directive argument AST nodes, so unquoted enum-value literals remain unquoted in printed SDL, including nested list and input-object values.
Flattens nested deferred patches so result visiting sees fields under a child @defer.
@graphql-tools/utils 1223 changes
Breaking changes 3
Now requires a VariableValues object instead of Record<string, any> for the variableValues argument.
Now returns { variableValues } on success, with variableValues as a VariableValues object, and { errors } on failure.
Aligns variableValues with the GraphQL version: GraphQL v17 and above use the wrapped shape, while v16 and below retain a flat map.
Security 3
Incremental path keys are also compared to __proto__ at property access, in addition to the existing isSafeObjectKey check.
GraphQL Tools: Prototype pollution in mergeIncrementalResult via non-primitive path segments
GraphQL Tools has prototype pollution in well-established utility function
mergeDeep
Deprecations 1
The old positional boolean arguments remain supported but are deprecated in favor of the options object.
New APIs and options 4
Resolver map field extensions and type __extensions use Record<string | symbol, any>, allowing symbol-keyed resolver extensions to type-check under GraphQL.js v17+.
Accepts an options object with respectPrototype, respectArrays, respectArrayLength, and respectSymbols settings.
Exports a shared helper used by the path walker and other package call sites.
Adds getAsyncHelpers to GraphQLResolveInfo; its track method is used whenever waitUntil is available.
Behavior and default changes 2
Adds GraphQL v17 support and aligns the existing executor implementation with the latest GraphQL v17 API changes.
In GraphQL v17, custom scalar resolvers defining __serialize and __parseValue are automatically mapped to coerceOutputValue and coerceInputValue.
Fixes and other changes 10
Pruning retains argument types for defined directives, so unused directives keep their full definitions.
Coerces GraphQL 17 argument defaults using local input coercion, including defaults, missing variables, and nested sources.
Schema extension merging and extraction, and resolver merging, preserve enumerable and non-enumerable symbol keys.
Empty and whitespace-only description values are skipped by getDescriptionNode and printSchemaWithDirectives, preventing empty descriptions from appearing in printed SDL.
Prefers runtime description values over stale astNode descriptions.
Allows
%in paths checked by the function, including directories from URL-encoded repo names.Cleans up queues and unsubscribes when the observable completes, preventing iterators from retaining references after done.
Omits mutation and subscription from printed schemas when those root types are no longer present, such as after pruneSchema.
Adds getAbortSignal to GraphQLResolveInfo, matching behavior already available in this executor implementation.
Normalizes ExecutionRequest.variables into a VariableValues-compatible shape before traversing selections.
@graphql-tools/utils 117 changes
Breaking changes 2
mergeDeep treats explicit undefined property values as overrides rather than skipping them, distinguishing them from absent properties.
Treats null property values as explicit overrides rather than skipping them.
Behavior and default changes 1
Supports federation/subgraph-style schemas without defined operation types by printing the schema definition as an extension.
Fixes and other changes 4
Supports argument defaultValue when used with graphql@17.
Merging two or more empty objects now returns {} instead of undefined, preventing empty-object values from being dropped during nested merges.
Deep merge now preserves non-enumerable symbols.
Handles enum values correctly when they are arguments of directives defined in extensions.
@graphql-tools/utils 105 changes
Breaking changes 2
Builtin scalars are no longer mapped.
Nullish values are ignored, and calls with no sources return undefined.
New APIs and options 1
Opt in to adding schema coordinates to GraphQL error extensions so tracing or monitoring tools can identify the source of an error. The coordinate exposes schema information.
Behavior and default changes 1
Generated operations now include schema argument default values in their variable definitions.
Fixes and other changes 1
Schema extension nodes are always converted to schema definition nodes, avoiding the unexpected breaking changes introduced by the reverted change.
@graphql-tools/utils 96 changes
Breaking changes 1
The API has been dropped.
New APIs and options 3
Collect field helpers are now exported.
The @defer directive was added.
The @stream directive was added.
Behavior and default changes 2
Supports collecting deferred values.
Now accepts DocumentNode[] and throws the original GraphQLError instances with the correct stack trace.
@graphql-tools/utils 822 changes
Breaking changes 18
Uses the native AggregateError implementation; individual errors are available under the errors property instead of through Symbol.iterator.
No longer applies the camelCase naming convention.
The cloneSchema export was removed.
Returns different Source objects for each found SDL code block.
The package no longer exports debugLog; it uses console.log directly only if DEBUG is available under process.env.
Directive Resolvers were removed; the notes point to a new method for schema directives.
ExecutionParams was replaced by Request, then renamed to ExecutionRequest; it requires operationType, and context is supplied to createRequest and createRequestInfo instead of delegateToSchema.
This export was removed; use the
.toConfigmethod instead.Always returns an array of individual DirectiveAnnotation objects with name and args properties, preserving order around repeatable directives.
Respects code locations and returns graphql-js Source objects for each found code block.
Legacy Schema Directives were removed; the notes point to a new method for schema directives.
Each loader handles glob patterns internally and returns an array of Source objects instead of a single Source.
Optional methods were removed from the Loader interface.
Takes an array of sources instead of separate source arguments and accepts an additional flag to enable prototype merging.
SchemaVisitor is no longer exported; use mapSchema instead.
Subscriber was removed in favor of Executor.
visitSchema is no longer exported; use mapSchema instead.
VisitSchemaKind is no longer exported; use mapSchema instead.
New APIs and options 2
Returns an array of objects representing the args for each use of a directive, including an empty object when a use has no arguments.
rootValue is part of the request and can be passed to delegateToSchema as a named option, included in subschemaConfig, or inferred from the originating schema when using the default executor.
Behavior and default changes 1
Can receive AsyncIterable and handles subscriptions, preparing for defer, stream, and live queries.
Fixes and other changes 1
ExecutionParams respects operationName and rootValue.