@graphql-tools/schema
11.0.9 · 10 Nov 2026MIT26.1M / weekRepositoryHomepagenpmAtom feed
11.0.9 is the newest release of 11.x.
In short
1 new3 internal
Release note
The section about @graphql-tools/schema of a note shared by several packages.
Patch Changes
mergeSchemasandmakeExecutableSchemanow acceptonFieldTypeConflict, the same callbackmergeTypeDefsalready had.When two schemas define the same field with different types, default merge throws. When only nullability differs, it keeps the earlier type.
# first schema type Post { id: ID! title: String! content: String! published: Boolean! } # second schema type Post { id: ID! title: String content: Int fieldA: Int fieldB: String }content: String!vscontent: Intthrows.title: String!vstitle: StringkeepsString!.mergeSchemas({ schemas: [firstSchema, secondSchema], onFieldTypeConflict: (_existing, incoming) => incoming, });The merged
Posttakestitle: Stringandcontent: Intfrom the second schema, keepspublishedfrom the first, and addsfieldA/fieldB. Types that exist on only one schema, such asUseron the first, stay.The same callback applies to field arguments. Returning the incoming field uses the second schema's argument types and still keeps arguments that exist on only one side. Returning the existing field with
reverseArguments: truekeeps the first schema's argument types and still appends new arguments.
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.