NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #3076 most downloaded on npm
Fork of GraphQL.js' execute function
Latest stable
4.1.8
Last release 12 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
1184 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
So if a type resolver returns a type instead of type name which is required since graphql@16, the executor should handle it correctly.
#6280
7dcd0af
Thanks @ardatan! - Since the executor is version agnostic, it should
respect the schemas created with older versions.
So if a type resolver returns a type instead of type name which is required since graphql@16,
the executor should handle it correctly.
See the following example:
// Assume that the following code is executed with `graphql@15`
import { execute } from '@graphql-tools/executor'
const BarType = new GraphQLObjectType({
name: 'Bar',
fields: {
bar: {
type: GraphQLString,
resolve: () => 'bar'
}
}
})
const BazType = new GraphQLObjectType({
name: 'Baz',
fields: {
baz: {
type: GraphQLString,
resolve: () => 'baz'
}
}
})
const BarBazType = new GraphQLUnionType({
name: 'BarBaz',
types: [BarType, BazType],
// This is the resolver that returns the type instead of type name
resolveType(obj) {
if ('bar' in obj) {
return BarType
}
if ('baz' in obj) {
return BazType
}
}
})
const QueryType = new GraphQLObjectType({
name: 'Query',
fields: {
barBaz: {
type: BarBazType,
resolve: () => ({ bar: 'bar' })
}
}
})
const schema = new GraphQLSchema({
query: QueryType
})
const result = await execute({
schema,
document: parse(/* GraphQL */ `
query {
barBaz {
... on Bar {
bar
}
... on Baz {
baz
}
}
}
`)
})
expect(result).toEqual({
data: {
barBaz: {
bar: 'bar'
}
}
})
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
` NonErrorThrown: Unexpected error value: {...} at toError (/usr/src/app/node_modules/graphql/jsutils/toError.js:16:7) at locatedError (/usr/src/app/n
#6038
02dd9ac
Thanks @ardatan! - Some libraries like undici throw objects that
are not Error instances when the response is tried to parse as JSON but failed. In that case,
executor prints an error like below;
NonErrorThrown: Unexpected error value: {...}
at toError (/usr/src/app/node_modules/graphql/jsutils/toError.js:16:7)
at locatedError (/usr/src/app/node_modules/graphql/error/locatedError.js:20:46)
at /usr/src/app/node_modules/@graphql-tools/executor/cjs/execution/execute.js:330:58
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /usr/src/app/node_modules/@graphql-tools/executor/cjs/execution/promiseForObject.js:18:35
at async Promise.all (index 0)
But actually the shape of the object matches the Error interface. In that case, the executor now
coerces the object to an Error instance by taking message, stack, name and cause
properties. So the user will get the error correctly.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Patch Changes - #6020 `b07be2b` Thanks @n1ru4l! - Correctly raise AbortError for defer payloads
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Patch Changes - #6009 `14a001e` Thanks @n1ru4l! - correctly raise abort exception for Promise and sync execution
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Patch Changes - #6006 `a5364eb` Thanks @n1ru4l! - fix rejecting when canceling async iterable returned from normalized executor
Nothing published for this version
Nothing published for this version
Updated dependencies [`baf3c28`]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Updated dependency `@graphql-tools/utils@^10.0.13` ↗︎ (from ^10.0.8, in dependencies)
83c0af0
Thanks @enisdenjo! - dependencies updates:
@graphql-tools/utils@^10.0.13 ↗︎
(from ^10.0.8, in dependencies)Nothing published for this version
Nothing published for this version
### Minor Changes - #5291 `ae20c707` Thanks @ardatan! - Accept AbortSignal in ExecutionArgs
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Minor Changes - #5295 `b255b62c` Thanks @n1ru4l! - Ensure errors thrown within scalars serialize function are mapped to Error.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.