@graphql-tools/schema
11.0.9 · 10 Nov 2026MIT26.1M / weekRepositoryHomepagenpmAtom feed
9.0.19 is the newest release of 9.x.
In short
1 fixed2 internal
Release note
The section about @graphql-tools/schema of a note shared by several packages.
Major Changes
- Breaking
#4463
8cc8721f
Thanks @ardatan! - Thanks @mattkrick and @borisno2!
Breaking changes
addResolversToSchema;
If you are using the legacy parameters like below, you should update them to the new usage. Other
than that, there is no functional change;
// From
addResolversToSchema(schema, resolvers, resolverValidationOptions)
// To
addResolversToSchema({
schema,
resolvers,
resolverValidationOptions
}) mergeSchemas;
The provided resolver overrides the resolvers in the schema with the same name;
The hello resolver in the schema would be overridden by the hello resolver in theresolvers. Before it was opposite which is not expected.
const schema = makeExecutableSchema({
typeDefs: `
type Query {
hello: String
}
`,
resolvers: {
Query: {
hello: () => 'Hello world!'
}
}
})
mergeSchemas({
schemas: [schema],
resolvers: {
Query: {
hello: () => 'New hello world'
}
}
}) makeExecutableSchema no longer takes parseOptions and you can pass those options directly;
makeExecutableSchema({
typeDefs: ``,
parseOptions: {
assumeValid: true
}
})
// After
makeExecutableSchema({
typeDefs: ``,
assumeValid: true
}) makeExecutableSchema no longer does pruning and it doesn't take pruningOptions anymore. You
can use pruneSchema from @graphql-tools/utils if you need.
extractExtensionsFromSchema moved from @graphql-tools/merge to @graphql-tools/schema. AndtravelSchemaPossibleExtensions has been dropped in favor of mapSchema.
Patch Changes
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.