github ardatan/graphql-tools release-1792070865000
October 15, 2026

@graphql-tools/utils@12.1.0

Minor Changes

  • #8445 82457d1 Thanks @ardatan! - Fix: Preserve symbol-keyed GraphQL extensions when building, merging, or extracting schemas.

    GraphQL.js v17 allows string | symbol keys on schema/type/field extensions (via toObjMapWithSymbols). @graphql-tools was dropping those symbol keys in two places:

    1. mergeDeep only walked enumerable string keys (for...in), so symbol extensions were lost when applying schemaExtensions.
    2. extractExtensionsFromSchema did not copy non-enumerable own symbol keys (enumerable symbols already survive object rest/spread; the explicit loop covers the non-enumerable case).

    Example (bug)

    import { makeExecutableSchema } from '@graphql-tools/schema'
    
    const META = Symbol('META')
    
    const schema = makeExecutableSchema({
      typeDefs: /* GraphQL */ `
        type Query {
          hello: String
        }
      `,
      schemaExtensions: {
        schemaExtensions: {
          [META]: { source: 'app' },
          tagged: true,
        },
        types: {},
      },
    })
    
    // Before: only string keys survived
    // schema.extensions === { tagged: true }
    
    // After: symbol keys are preserved
    // schema.extensions[META] === { source: 'app' }
    // schema.extensions.tagged === true

    Schema extension merge/extract and resolver merging always enable { enumerable: true, nonEnumerable: true } so symbol keys survive in tools' own merge/extract paths on every supported GraphQL.js major. (GraphQL.js itself may still drop symbol keys from field configs below v17 when rebuilding types.)

    mergeDeep API

    mergeDeep now accepts an options object. The old positional boolean arguments still work but are deprecated.

    import { mergeDeep } from '@graphql-tools/utils'
    
    // Deprecated (still supported)
    mergeDeep([a, b], false, true, false, true)
    //                ^proto ^arrays ^len  ^non-enumerable symbols only
    
    // Preferred
    mergeDeep([a, b], {
      respectPrototype: false,
      respectArrays: true,
      respectArrayLength: false,
      respectSymbols: {
        enumerable: true, // merge `obj[sym] = value` keys
        nonEnumerable: true, // copy defineProperty(..., { enumerable: false }) symbols
      },
    })

    respectSymbols defaults to { enumerable: false, nonEnumerable: false } (symbols dropped), matching the historical default. The legacy 5th positional flag still maps to { nonEnumerable: true } only.

    Resolver map types (IResolvers / field resolver extensions and type __extensions) now use ExtensionsObject (Record<string | symbol, any>), so symbol-keyed resolver extensions type-check under GraphQL.js v17+.

Patch Changes

  • #8513 98673c3 Thanks @ardatan! - fix(utils): coerce GraphQL 17 argument defaults in getArgumentValues via local input coercion (defaults, missing variables, nested sources)

  • #8493 a75d725 Thanks @cpruijsen! - Keep argument types of defined directives when pruning so that unused directives such as @key(fields: _FieldSet!) retain their full definitions instead of losing the argument together with its type.

@graphql-tools/executor@2.0.5

Patch Changes

@graphql-tools/executor-apollo-link@2.0.18

Patch Changes

@graphql-tools/executor-envelop@4.0.18

Patch Changes

@graphql-tools/executor-legacy-ws@1.1.39

Patch Changes

@graphql-tools/executor-urql-exchange@1.0.40

Patch Changes

@graphql-tools/executor-yoga@3.0.48

Patch Changes

@graphql-tools/graphql-tag-pluck@8.3.41

Patch Changes

graphql-tools@9.0.39

Patch Changes

@graphql-tools/import@7.2.4

Patch Changes

@graphql-tools/links@10.0.18

Patch Changes

@graphql-tools/load@8.1.21

Patch Changes

@graphql-tools/apollo-engine-loader@8.0.40

Patch Changes

@graphql-tools/code-file-loader@8.1.43

Patch Changes

@graphql-tools/external-fragment-loader@0.0.1

Patch Changes

  • #8373 4d2537a Thanks @ikusakov2! - Add the external fragment loader package with GraphQL Code Generator custom-loader support.
  • Updated dependencies [82457d1, 98673c3, a75d725, 82457d1]:
    • @graphql-tools/graphql-tag-pluck@8.3.41
    • @graphql-tools/utils@12.1.0

@graphql-tools/git-loader@8.0.46

Patch Changes

@graphql-tools/github-loader@9.1.13

Patch Changes

@graphql-tools/graphql-file-loader@8.1.24

Patch Changes

@graphql-tools/json-file-loader@8.0.38

Patch Changes

@graphql-tools/module-loader@8.0.38

Patch Changes

@graphql-tools/url-loader@9.1.14

Patch Changes

@graphql-tools/merge@9.2.8

Patch Changes

  • #8445 82457d1 Thanks @ardatan! - dependencies updates:

  • #8445 82457d1 Thanks @ardatan! - Fix: Preserve symbol-keyed GraphQL extensions when building, merging, or extracting schemas.

    GraphQL.js v17 allows string | symbol keys on schema/type/field extensions (via toObjMapWithSymbols). @graphql-tools was dropping those symbol keys in two places:

    1. mergeDeep only walked enumerable string keys (for...in), so symbol extensions were lost when applying schemaExtensions.
    2. extractExtensionsFromSchema did not copy non-enumerable own symbol keys (enumerable symbols already survive object rest/spread; the explicit loop covers the non-enumerable case).

    Example (bug)

    import { makeExecutableSchema } from '@graphql-tools/schema'
    
    const META = Symbol('META')
    
    const schema = makeExecutableSchema({
      typeDefs: /* GraphQL */ `
        type Query {
          hello: String
        }
      `,
      schemaExtensions: {
        schemaExtensions: {
          [META]: { source: 'app' },
          tagged: true,
        },
        types: {},
      },
    })
    
    // Before: only string keys survived
    // schema.extensions === { tagged: true }
    
    // After: symbol keys are preserved
    // schema.extensions[META] === { source: 'app' }
    // schema.extensions.tagged === true

    Schema extension merge/extract and resolver merging always enable { enumerable: true, nonEnumerable: true } so symbol keys survive in tools' own merge/extract paths on every supported GraphQL.js major. (GraphQL.js itself may still drop symbol keys from field configs below v17 when rebuilding types.)

    mergeDeep API

    mergeDeep now accepts an options object. The old positional boolean arguments still work but are deprecated.

    import { mergeDeep } from '@graphql-tools/utils'
    
    // Deprecated (still supported)
    mergeDeep([a, b], false, true, false, true)
    //                ^proto ^arrays ^len  ^non-enumerable symbols only
    
    // Preferred
    mergeDeep([a, b], {
      respectPrototype: false,
      respectArrays: true,
      respectArrayLength: false,
      respectSymbols: {
        enumerable: true, // merge `obj[sym] = value` keys
        nonEnumerable: true, // copy defineProperty(..., { enumerable: false }) symbols
      },
    })

    respectSymbols defaults to { enumerable: false, nonEnumerable: false } (symbols dropped), matching the historical default. The legacy 5th positional flag still maps to { nonEnumerable: true } only.

    Resolver map types (IResolvers / field resolver extensions and type __extensions) now use ExtensionsObject (Record<string | symbol, any>), so symbol-keyed resolver extensions type-check under GraphQL.js v17+.

  • Updated dependencies [98673c3, a75d725, 82457d1]:

    • @graphql-tools/utils@12.1.0

@graphql-tools/mock@9.1.18

Patch Changes

@graphql-tools/node-require@7.0.50

Patch Changes

@graphql-tools/relay-operation-optimizer@7.1.14

Patch Changes

@graphql-tools/resolvers-composition@7.0.41

Patch Changes

@graphql-tools/schema@10.1.5

Patch Changes

  • #8445 82457d1 Thanks @ardatan! - dependencies updates:

  • #8445 82457d1 Thanks @ardatan! - Fix: Preserve symbol-keyed GraphQL extensions when building, merging, or extracting schemas.

    GraphQL.js v17 allows string | symbol keys on schema/type/field extensions (via toObjMapWithSymbols). @graphql-tools was dropping those symbol keys in two places:

    1. mergeDeep only walked enumerable string keys (for...in), so symbol extensions were lost when applying schemaExtensions.
    2. extractExtensionsFromSchema did not copy non-enumerable own symbol keys (enumerable symbols already survive object rest/spread; the explicit loop covers the non-enumerable case).

    Example (bug)

    import { makeExecutableSchema } from '@graphql-tools/schema'
    
    const META = Symbol('META')
    
    const schema = makeExecutableSchema({
      typeDefs: /* GraphQL */ `
        type Query {
          hello: String
        }
      `,
      schemaExtensions: {
        schemaExtensions: {
          [META]: { source: 'app' },
          tagged: true,
        },
        types: {},
      },
    })
    
    // Before: only string keys survived
    // schema.extensions === { tagged: true }
    
    // After: symbol keys are preserved
    // schema.extensions[META] === { source: 'app' }
    // schema.extensions.tagged === true

    Schema extension merge/extract and resolver merging always enable { enumerable: true, nonEnumerable: true } so symbol keys survive in tools' own merge/extract paths on every supported GraphQL.js major. (GraphQL.js itself may still drop symbol keys from field configs below v17 when rebuilding types.)

    mergeDeep API

    mergeDeep now accepts an options object. The old positional boolean arguments still work but are deprecated.

    import { mergeDeep } from '@graphql-tools/utils'
    
    // Deprecated (still supported)
    mergeDeep([a, b], false, true, false, true)
    //                ^proto ^arrays ^len  ^non-enumerable symbols only
    
    // Preferred
    mergeDeep([a, b], {
      respectPrototype: false,
      respectArrays: true,
      respectArrayLength: false,
      respectSymbols: {
        enumerable: true, // merge `obj[sym] = value` keys
        nonEnumerable: true, // copy defineProperty(..., { enumerable: false }) symbols
      },
    })

    respectSymbols defaults to { enumerable: false, nonEnumerable: false } (symbols dropped), matching the historical default. The legacy 5th positional flag still maps to { nonEnumerable: true } only.

    Resolver map types (IResolvers / field resolver extensions and type __extensions) now use ExtensionsObject (Record<string | symbol, any>), so symbol-keyed resolver extensions type-check under GraphQL.js v17+.

  • Updated dependencies [82457d1, 98673c3, a75d725, 82457d1]:

    • @graphql-tools/merge@9.2.8
    • @graphql-tools/utils@12.1.0

Don't miss a new graphql-tools release

NewReleases is sending notifications on new releases.