@graphql-tools/utils@12.1.0
Minor Changes
-
#8445
82457d1Thanks @ardatan! - Fix: Preserve symbol-keyed GraphQL extensions when building, merging, or extracting schemas.GraphQL.js v17 allows
string | symbolkeys on schema/type/fieldextensions(viatoObjMapWithSymbols).@graphql-toolswas dropping those symbol keys in two places:mergeDeeponly walked enumerable string keys (for...in), so symbol extensions were lost when applyingschemaExtensions.extractExtensionsFromSchemadid 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.)mergeDeepAPImergeDeepnow 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 }, })
respectSymbolsdefaults 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 resolverextensionsand type__extensions) now useExtensionsObject(Record<string | symbol, any>), so symbol-keyed resolver extensions type-check under GraphQL.js v17+.
Patch Changes
-
#8513
98673c3Thanks @ardatan! - fix(utils): coerce GraphQL 17 argument defaults in getArgumentValues via local input coercion (defaults, missing variables, nested sources) -
#8493
a75d725Thanks @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
-
#8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
-
#8471
7c71575Thanks @kruckenberg! - Preserve response field order when asynchronous resolvers complete, including in deferred data and streamed items. -
#8513
98673c3Thanks @ardatan! - fix(utils): coerce GraphQL 17 argument defaults in getArgumentValues via local input coercion (defaults, missing variables, nested sources) -
Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/executor-apollo-link@2.0.18
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/executor-envelop@4.0.18
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/executor-legacy-ws@1.1.39
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies) - Updated dependency
@types/ws@^8.18.2↗︎ (from^8.0.0, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/executor-urql-exchange@1.0.40
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/executor-yoga@3.0.48
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/executor-envelop@^4.0.17↗︎ (from^4.0.16, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/executor-envelop@4.0.18
- @graphql-tools/utils@12.1.0
@graphql-tools/graphql-tag-pluck@8.3.41
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
graphql-tools@9.0.39
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/schema@^10.1.4↗︎ (from^10.1.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,82457d1]:- @graphql-tools/schema@10.1.5
@graphql-tools/import@7.2.4
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/links@10.0.18
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/load@8.1.21
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/schema@^10.1.4↗︎ (from^10.1.3, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/schema@10.1.5
- @graphql-tools/utils@12.1.0
@graphql-tools/apollo-engine-loader@8.0.40
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/code-file-loader@8.1.43
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/graphql-tag-pluck@8.3.40↗︎ (from8.3.39, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/graphql-tag-pluck@8.3.41
- @graphql-tools/utils@12.1.0
@graphql-tools/external-fragment-loader@0.0.1
Patch Changes
- #8373
4d2537aThanks @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
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/graphql-tag-pluck@8.3.40↗︎ (from8.3.39, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/graphql-tag-pluck@8.3.41
- @graphql-tools/utils@12.1.0
@graphql-tools/github-loader@9.1.13
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/graphql-tag-pluck@^8.3.40↗︎ (from^8.3.39, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/graphql-tag-pluck@8.3.41
- @graphql-tools/utils@12.1.0
@graphql-tools/graphql-file-loader@8.1.24
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/import@^7.2.3↗︎ (from^7.2.2, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/import@7.2.4
- @graphql-tools/utils@12.1.0
@graphql-tools/json-file-loader@8.0.38
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/module-loader@8.0.38
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/url-loader@9.1.14
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/executor-legacy-ws@^1.1.38↗︎ (from^1.1.37, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies) - Updated dependency
@types/ws@^8.18.2↗︎ (from^8.0.0, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/executor-legacy-ws@1.1.39
- @graphql-tools/utils@12.1.0
@graphql-tools/merge@9.2.8
Patch Changes
-
#8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
-
#8445
82457d1Thanks @ardatan! - Fix: Preserve symbol-keyed GraphQL extensions when building, merging, or extracting schemas.GraphQL.js v17 allows
string | symbolkeys on schema/type/fieldextensions(viatoObjMapWithSymbols).@graphql-toolswas dropping those symbol keys in two places:mergeDeeponly walked enumerable string keys (for...in), so symbol extensions were lost when applyingschemaExtensions.extractExtensionsFromSchemadid 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.)mergeDeepAPImergeDeepnow 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 }, })
respectSymbolsdefaults 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 resolverextensionsand type__extensions) now useExtensionsObject(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
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/schema@^10.1.4↗︎ (from^10.1.3, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/schema@10.1.5
- @graphql-tools/utils@12.1.0
@graphql-tools/node-require@7.0.50
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/graphql-file-loader@8.1.23↗︎ (from8.1.22, independencies) - Updated dependency
@graphql-tools/load@8.1.20↗︎ (from8.1.19, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
82457d1,82457d1,98673c3,a75d725,82457d1]:- @graphql-tools/graphql-file-loader@8.1.24
- @graphql-tools/load@8.1.21
- @graphql-tools/utils@12.1.0
@graphql-tools/relay-operation-optimizer@7.1.14
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/resolvers-composition@7.0.41
Patch Changes
- #8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
- Updated dependencies [
98673c3,a75d725,82457d1]:- @graphql-tools/utils@12.1.0
@graphql-tools/schema@10.1.5
Patch Changes
-
#8445
82457d1Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/merge@^9.2.7↗︎ (from^9.2.6, independencies) - Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
- Updated dependency
-
#8445
82457d1Thanks @ardatan! - Fix: Preserve symbol-keyed GraphQL extensions when building, merging, or extracting schemas.GraphQL.js v17 allows
string | symbolkeys on schema/type/fieldextensions(viatoObjMapWithSymbols).@graphql-toolswas dropping those symbol keys in two places:mergeDeeponly walked enumerable string keys (for...in), so symbol extensions were lost when applyingschemaExtensions.extractExtensionsFromSchemadid 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.)mergeDeepAPImergeDeepnow 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 }, })
respectSymbolsdefaults 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 resolverextensionsand type__extensions) now useExtensionsObject(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