From 06911ab40d23c4133f5377eab5ae8b0ba486ea65 Mon Sep 17 00:00:00 2001 From: TheGuildBot <59414373+theguild-bot@users.noreply.github.com> Date: Sat, 22 Jul 2023 06:46:53 +0300 Subject: [PATCH] chore(release): update monorepo packages versions (#5446) Co-authored-by: github-actions[bot] --- .changeset/stupid-pans-breathe.md | 5 - packages/utils/CHANGELOG.md | 393 ++++++++++++++++++++++-------- packages/utils/package.json | 2 +- 3 files changed, 286 insertions(+), 114 deletions(-) delete mode 100644 .changeset/stupid-pans-breathe.md diff --git a/.changeset/stupid-pans-breathe.md b/.changeset/stupid-pans-breathe.md deleted file mode 100644 index 4788f7b61f3..00000000000 --- a/.changeset/stupid-pans-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-tools/utils': patch ---- - -Exports the `DirectableGraphQLObject` type. diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 9fb968b1367..50af95658c0 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,155 +1,237 @@ # @graphql-tools/utils +## 10.0.4 + +### Patch Changes + +- [#5444](https://github.com/ardatan/graphql-tools/pull/5444) + [`c1afb545`](https://github.com/ardatan/graphql-tools/commit/c1afb5452d2df1e9fa5553ba024d77a00e0d9398) + Thanks [@kennyjwilli](https://github.com/kennyjwilli)! - Exports the `DirectableGraphQLObject` + type. + ## 10.0.3 ### Patch Changes -- [#5398](https://github.com/ardatan/graphql-tools/pull/5398) [`be3411c7`](https://github.com/ardatan/graphql-tools/commit/be3411c7fa95b0c0a85e516450314038fae85e3a) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - incremental merge also merges extensions +- [#5398](https://github.com/ardatan/graphql-tools/pull/5398) + [`be3411c7`](https://github.com/ardatan/graphql-tools/commit/be3411c7fa95b0c0a85e516450314038fae85e3a) + Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - incremental merge also merges + extensions ## 10.0.2 ### Patch Changes -- [#5396](https://github.com/ardatan/graphql-tools/pull/5396) [`bb8f169e`](https://github.com/ardatan/graphql-tools/commit/bb8f169e21a8a7002b66d3bc6e4e4b40cc2a5f5c) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates: +- [#5396](https://github.com/ardatan/graphql-tools/pull/5396) + [`bb8f169e`](https://github.com/ardatan/graphql-tools/commit/bb8f169e21a8a7002b66d3bc6e4e4b40cc2a5f5c) + Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates: - - Added dependency [`dset@^3.1.2` ↗︎](https://www.npmjs.com/package/dset/v/3.1.2) (to `dependencies`) + - Added dependency [`dset@^3.1.2` ↗︎](https://www.npmjs.com/package/dset/v/3.1.2) (to + `dependencies`) -- [#5396](https://github.com/ardatan/graphql-tools/pull/5396) [`bb8f169e`](https://github.com/ardatan/graphql-tools/commit/bb8f169e21a8a7002b66d3bc6e4e4b40cc2a5f5c) Thanks [@ardatan](https://github.com/ardatan)! - Move the merging logic of incremental results to the utils package +- [#5396](https://github.com/ardatan/graphql-tools/pull/5396) + [`bb8f169e`](https://github.com/ardatan/graphql-tools/commit/bb8f169e21a8a7002b66d3bc6e4e4b40cc2a5f5c) + Thanks [@ardatan](https://github.com/ardatan)! - Move the merging logic of incremental results to + the utils package ## 10.0.1 ### Patch Changes -- [`dcdc6eb7`](https://github.com/ardatan/graphql-tools/commit/dcdc6eb787ca77d741d98d68b70d4083f4d72b91) Thanks [@ardatan](https://github.com/ardatan)! - Support BigInt values +- [`dcdc6eb7`](https://github.com/ardatan/graphql-tools/commit/dcdc6eb787ca77d741d98d68b70d4083f4d72b91) + Thanks [@ardatan](https://github.com/ardatan)! - Support BigInt values ## 10.0.0 ### Major Changes -- [#5274](https://github.com/ardatan/graphql-tools/pull/5274) [`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955) Thanks [@ardatan](https://github.com/ardatan)! - Drop Node 14 support. Require Node.js `>= 16` +- [#5274](https://github.com/ardatan/graphql-tools/pull/5274) + [`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955) + Thanks [@ardatan](https://github.com/ardatan)! - Drop Node 14 support. Require Node.js `>= 16` -- [#5274](https://github.com/ardatan/graphql-tools/pull/5274) [`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955) Thanks [@ardatan](https://github.com/ardatan)! - `AggregateError` is no longer exported from `@graphql-tools/utils`. - You can use the native `AggregateError` instead. +- [#5274](https://github.com/ardatan/graphql-tools/pull/5274) + [`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955) + Thanks [@ardatan](https://github.com/ardatan)! - `AggregateError` is no longer exported from + `@graphql-tools/utils`. You can use the native `AggregateError` instead. ## 9.2.1 ### Patch Changes -- [`b5c8f640`](https://github.com/ardatan/graphql-tools/commit/b5c8f6407b74466ed0d2989000458cb59239e9af) Thanks [@ardatan](https://github.com/ardatan)! - Do not use a global `WeakMap` for `memoize2of4`, and introduce `memoize2of5` +- [`b5c8f640`](https://github.com/ardatan/graphql-tools/commit/b5c8f6407b74466ed0d2989000458cb59239e9af) + Thanks [@ardatan](https://github.com/ardatan)! - Do not use a global `WeakMap` for `memoize2of4`, + and introduce `memoize2of5` ## 9.2.0 ### Minor Changes -- [`a94217e9`](https://github.com/ardatan/graphql-tools/commit/a94217e920c5d6237471ab6ad4d96cf230984177) Thanks [@ardatan](https://github.com/ardatan)! - Support TypedDocumentNode in ExecutionRequest +- [`a94217e9`](https://github.com/ardatan/graphql-tools/commit/a94217e920c5d6237471ab6ad4d96cf230984177) + Thanks [@ardatan](https://github.com/ardatan)! - Support TypedDocumentNode in ExecutionRequest ### Patch Changes -- [#5016](https://github.com/ardatan/graphql-tools/pull/5016) [`62d074be`](https://github.com/ardatan/graphql-tools/commit/62d074be48779b1e096e056ca1233822c421dc99) Thanks [@mayrn-techdivision](https://github.com/mayrn-techdivision)! - Fixes introspection query issues when visiting field '\_\_type' +- [#5016](https://github.com/ardatan/graphql-tools/pull/5016) + [`62d074be`](https://github.com/ardatan/graphql-tools/commit/62d074be48779b1e096e056ca1233822c421dc99) + Thanks [@mayrn-techdivision](https://github.com/mayrn-techdivision)! - Fixes introspection query + issues when visiting field '\_\_type' ## 9.1.4 ### Patch Changes -- [#4961](https://github.com/ardatan/graphql-tools/pull/4961) [`e3ec35ed`](https://github.com/ardatan/graphql-tools/commit/e3ec35ed27d4a329739c8da6be06ce74c8f25591) Thanks [@gilgardosh](https://github.com/gilgardosh)! - Bug fix: better handle array field types used for alias field names +- [#4961](https://github.com/ardatan/graphql-tools/pull/4961) + [`e3ec35ed`](https://github.com/ardatan/graphql-tools/commit/e3ec35ed27d4a329739c8da6be06ce74c8f25591) + Thanks [@gilgardosh](https://github.com/gilgardosh)! - Bug fix: better handle array field types + used for alias field names ## 9.1.3 ### Patch Changes -- [#4887](https://github.com/ardatan/graphql-tools/pull/4887) [`904fe770`](https://github.com/ardatan/graphql-tools/commit/904fe770a355ee3d79464c3bbf0375d2dcd64759) Thanks [@ardatan](https://github.com/ardatan)! - Fix leak on Node 14 and add cancellation to async iterables correctly +- [#4887](https://github.com/ardatan/graphql-tools/pull/4887) + [`904fe770`](https://github.com/ardatan/graphql-tools/commit/904fe770a355ee3d79464c3bbf0375d2dcd64759) + Thanks [@ardatan](https://github.com/ardatan)! - Fix leak on Node 14 and add cancellation to async + iterables correctly ## 9.1.2 ### Patch Changes -- [`13c24883`](https://github.com/ardatan/graphql-tools/commit/13c24883004d5330f7402cb20566e37535c5729b) Thanks [@ardatan](https://github.com/ardatan)! - Fix handling argument values in gateway request +- [`13c24883`](https://github.com/ardatan/graphql-tools/commit/13c24883004d5330f7402cb20566e37535c5729b) + Thanks [@ardatan](https://github.com/ardatan)! - Fix handling argument values in gateway request ## 9.1.1 ### Patch Changes -- [#4842](https://github.com/ardatan/graphql-tools/pull/4842) [`7411a5e7`](https://github.com/ardatan/graphql-tools/commit/7411a5e71a8138d9ccfe907b1fb01e62fcbb0cdb) Thanks [@charlypoly](https://github.com/charlypoly)! - Fix validation swallowing fragments on naming conflicts +- [#4842](https://github.com/ardatan/graphql-tools/pull/4842) + [`7411a5e7`](https://github.com/ardatan/graphql-tools/commit/7411a5e71a8138d9ccfe907b1fb01e62fcbb0cdb) + Thanks [@charlypoly](https://github.com/charlypoly)! - Fix validation swallowing fragments on + naming conflicts ## 9.1.0 ### Minor Changes -- [#4827](https://github.com/ardatan/graphql-tools/pull/4827) [`c0639dd0`](https://github.com/ardatan/graphql-tools/commit/c0639dd0065db1b5bcedaabf58b11945714bab8d) Thanks [@ardatan](https://github.com/ardatan)! - TypeError and all other GraphQLError s from argument value parsing should return 400 +- [#4827](https://github.com/ardatan/graphql-tools/pull/4827) + [`c0639dd0`](https://github.com/ardatan/graphql-tools/commit/c0639dd0065db1b5bcedaabf58b11945714bab8d) + Thanks [@ardatan](https://github.com/ardatan)! - TypeError and all other GraphQLError s from + argument value parsing should return 400 ## 9.0.1 ### Patch Changes -- [`d83b1960`](https://github.com/ardatan/graphql-tools/commit/d83b19605be71481ccf8effd80d5254423ea811a) Thanks [@ardatan](https://github.com/ardatan)! - Fix @stream support +- [`d83b1960`](https://github.com/ardatan/graphql-tools/commit/d83b19605be71481ccf8effd80d5254423ea811a) + Thanks [@ardatan](https://github.com/ardatan)! - Fix @stream support ## 9.0.0 ### Major Changes -- [#4801](https://github.com/ardatan/graphql-tools/pull/4801) [`8f6d3efc`](https://github.com/ardatan/graphql-tools/commit/8f6d3efc92b25236f5a3a761ea7ba2f0a7c7f550) Thanks [@ardatan](https://github.com/ardatan)! - _BREAKING_: `checkValidationErrors` has been dropped and `validateGraphQlDocuments` now accepts `DocumentNode[]` instead and it throws the original `GraphQLError`s with the correct stack trace +- [#4801](https://github.com/ardatan/graphql-tools/pull/4801) + [`8f6d3efc`](https://github.com/ardatan/graphql-tools/commit/8f6d3efc92b25236f5a3a761ea7ba2f0a7c7f550) + Thanks [@ardatan](https://github.com/ardatan)! - _BREAKING_: `checkValidationErrors` has been + dropped and `validateGraphQlDocuments` now accepts `DocumentNode[]` instead and it throws the + original `GraphQLError`s with the correct stack trace -- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) Thanks [@saihaj](https://github.com/saihaj)! - update `collectFields` to support collecting deffered values +- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) + [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) + Thanks [@saihaj](https://github.com/saihaj)! - update `collectFields` to support collecting + deffered values ### Minor Changes -- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) Thanks [@saihaj](https://github.com/saihaj)! - add `@defer` directive +- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) + [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) + Thanks [@saihaj](https://github.com/saihaj)! - add `@defer` directive -- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) Thanks [@saihaj](https://github.com/saihaj)! - export collect field helpers +- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) + [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) + Thanks [@saihaj](https://github.com/saihaj)! - export collect field helpers -- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) Thanks [@saihaj](https://github.com/saihaj)! - add `@stream` directive +- [#4796](https://github.com/ardatan/graphql-tools/pull/4796) + [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931) + Thanks [@saihaj](https://github.com/saihaj)! - add `@stream` directive ## 8.13.1 ### Patch Changes -- [#4795](https://github.com/ardatan/graphql-tools/pull/4795) [`f7daf777`](https://github.com/ardatan/graphql-tools/commit/f7daf7777cc214801886e4a45c0389bc5837d175) Thanks [@glasser](https://github.com/glasser)! - Fix build break in v8.13.0 in some ESM environments. +- [#4795](https://github.com/ardatan/graphql-tools/pull/4795) + [`f7daf777`](https://github.com/ardatan/graphql-tools/commit/f7daf7777cc214801886e4a45c0389bc5837d175) + Thanks [@glasser](https://github.com/glasser)! - Fix build break in v8.13.0 in some ESM + environments. ## 8.13.0 ### Minor Changes -- [#4778](https://github.com/ardatan/graphql-tools/pull/4778) [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f) Thanks [@saihaj](https://github.com/saihaj)! - add isIterableObject, isObjectLike, isPromise, promiseReduce, hasOwnProperty +- [#4778](https://github.com/ardatan/graphql-tools/pull/4778) + [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f) + Thanks [@saihaj](https://github.com/saihaj)! - add isIterableObject, isObjectLike, isPromise, + promiseReduce, hasOwnProperty -- [#4778](https://github.com/ardatan/graphql-tools/pull/4778) [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f) Thanks [@saihaj](https://github.com/saihaj)! - add `Path` util from `graphql/jsutils` +- [#4778](https://github.com/ardatan/graphql-tools/pull/4778) + [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f) + Thanks [@saihaj](https://github.com/saihaj)! - add `Path` util from `graphql/jsutils` ### Patch Changes -- [#4778](https://github.com/ardatan/graphql-tools/pull/4778) [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f) Thanks [@saihaj](https://github.com/saihaj)! - improve inpsect util +- [#4778](https://github.com/ardatan/graphql-tools/pull/4778) + [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f) + Thanks [@saihaj](https://github.com/saihaj)! - improve inpsect util ## 8.12.0 ### Minor Changes -- [#4706](https://github.com/ardatan/graphql-tools/pull/4706) [`43c736bd`](https://github.com/ardatan/graphql-tools/commit/43c736bd1865c00898966a7ed14060496c9e6a0c) Thanks [@ardatan](https://github.com/ardatan)! - Do not throw duplicate type error name while rewiring types +- [#4706](https://github.com/ardatan/graphql-tools/pull/4706) + [`43c736bd`](https://github.com/ardatan/graphql-tools/commit/43c736bd1865c00898966a7ed14060496c9e6a0c) + Thanks [@ardatan](https://github.com/ardatan)! - Do not throw duplicate type error name while + rewiring types ## 8.11.0 ### Minor Changes -- [#4661](https://github.com/ardatan/graphql-tools/pull/4661) [`403ed450`](https://github.com/ardatan/graphql-tools/commit/403ed4507eff7cd509f410f7542a702da72e1a9a) Thanks [@nicolaslt](https://github.com/nicolaslt)! - Add getArgumentsWithDirectives +- [#4661](https://github.com/ardatan/graphql-tools/pull/4661) + [`403ed450`](https://github.com/ardatan/graphql-tools/commit/403ed4507eff7cd509f410f7542a702da72e1a9a) + Thanks [@nicolaslt](https://github.com/nicolaslt)! - Add getArgumentsWithDirectives ### Patch Changes -- [#4694](https://github.com/ardatan/graphql-tools/pull/4694) [`71cb4fae`](https://github.com/ardatan/graphql-tools/commit/71cb4faeb0833a228520a7bc2beed8ac7274443f) Thanks [@dimatill](https://github.com/dimatill)! - Fix pruneSchema to not remove type that is used only as a directive argument type +- [#4694](https://github.com/ardatan/graphql-tools/pull/4694) + [`71cb4fae`](https://github.com/ardatan/graphql-tools/commit/71cb4faeb0833a228520a7bc2beed8ac7274443f) + Thanks [@dimatill](https://github.com/dimatill)! - Fix pruneSchema to not remove type that is used + only as a directive argument type ## 8.10.1 ### Patch Changes -- [#4673](https://github.com/ardatan/graphql-tools/pull/4673) [`4fe3d9c0`](https://github.com/ardatan/graphql-tools/commit/4fe3d9c037e9c138bd8a9b04b3977d74eba32c97) Thanks [@thgreasi](https://github.com/thgreasi)! - Fix typings for TypeScript 4.8 +- [#4673](https://github.com/ardatan/graphql-tools/pull/4673) + [`4fe3d9c0`](https://github.com/ardatan/graphql-tools/commit/4fe3d9c037e9c138bd8a9b04b3977d74eba32c97) + Thanks [@thgreasi](https://github.com/thgreasi)! - Fix typings for TypeScript 4.8 ## 8.10.0 ### Minor Changes -- [#4643](https://github.com/ardatan/graphql-tools/pull/4643) [`2609d71f`](https://github.com/ardatan/graphql-tools/commit/2609d71f7c3a0ef2b381c51d9ce60b0de49f9b27) Thanks [@ardatan](https://github.com/ardatan)! - Revert the breaking change introduced in `@graphql-tools/merge` +- [#4643](https://github.com/ardatan/graphql-tools/pull/4643) + [`2609d71f`](https://github.com/ardatan/graphql-tools/commit/2609d71f7c3a0ef2b381c51d9ce60b0de49f9b27) + Thanks [@ardatan](https://github.com/ardatan)! - Revert the breaking change introduced in + `@graphql-tools/merge` ## 8.9.1 ### Patch Changes -- [#4624](https://github.com/ardatan/graphql-tools/pull/4624) [`e3167edc`](https://github.com/ardatan/graphql-tools/commit/e3167edc98172fda88ce2306c10c7d4a23d91d67) Thanks [@n1ru4l](https://github.com/n1ru4l)! - Fix CommonJS TypeScript resolution with `moduleResolution` `node16` or `nodenext` +- [#4624](https://github.com/ardatan/graphql-tools/pull/4624) + [`e3167edc`](https://github.com/ardatan/graphql-tools/commit/e3167edc98172fda88ce2306c10c7d4a23d91d67) + Thanks [@n1ru4l](https://github.com/n1ru4l)! - Fix CommonJS TypeScript resolution with + `moduleResolution` `node16` or `nodenext` ## 8.9.0 @@ -167,15 +249,22 @@ ### Patch Changes -- a0abbbcd: fix(visitResult): handle introspection fields correctly with an introspection query result +- a0abbbcd: fix(visitResult): handle introspection fields correctly with an introspection query + result ## 8.7.0 ### Minor Changes -- 4914970b: `mergeSchemas` was skipping `defaultFieldResolver` and `defaultMergedResolver` by default while extracting resolvers for each given schema to reduce the overhead. But this doesn't work properly if you mix wrapped schemas and local schemas. So new `includeDefaultMergedResolver` flag is introduced in `getResolversFromSchema` to put default "proxy" resolvers in the extracted resolver map for `mergeSchemas`. +- 4914970b: `mergeSchemas` was skipping `defaultFieldResolver` and `defaultMergedResolver` by + default while extracting resolvers for each given schema to reduce the overhead. But this doesn't + work properly if you mix wrapped schemas and local schemas. So new `includeDefaultMergedResolver` + flag is introduced in `getResolversFromSchema` to put default "proxy" resolvers in the extracted + resolver map for `mergeSchemas`. - This fixes an issue with alias issue, so nested aliased fields weren't resolved properly because of the missing `defaultMergedResolver` in the final merged schema which should come from the wrapped schema. + This fixes an issue with alias issue, so nested aliased fields weren't resolved properly because + of the missing `defaultMergedResolver` in the final merged schema which should come from the + wrapped schema. ## 8.6.13 @@ -187,7 +276,8 @@ ### Patch Changes -- da7ad43b: Fix GraphQL v17 incompatibility issues and introduce `createGraphQLError` helper function for backwards compatibility. +- da7ad43b: Fix GraphQL v17 incompatibility issues and introduce `createGraphQLError` helper + function for backwards compatibility. ## 8.6.11 @@ -219,15 +309,12 @@ - 0bbb1769: Refine generic typings using `extends X` when appropriate - Typescript 4.7 has stricter requirements around generics - which is explained well in the related PR: - https://github.com/microsoft/TypeScript/pull/48366 + Typescript 4.7 has stricter requirements around generics which is explained well in the related + PR: https://github.com/microsoft/TypeScript/pull/48366 - These changes resolve the errors that these packages will - face when attempting to upgrade to TS 4.7 (still in beta - at the time of writing this). Landing these changes now - will allow other TS libraries which depend on these - packages to experiment with TS 4.7 in the meantime. + These changes resolve the errors that these packages will face when attempting to upgrade to TS + 4.7 (still in beta at the time of writing this). Landing these changes now will allow other TS + libraries which depend on these packages to experiment with TS 4.7 in the meantime. ## 8.6.6 @@ -266,7 +353,8 @@ - 43a60f93: Improve getArgumentValues check for null values - 20e1058b: fix pruneSchema - Schema pruning must be done in rounds, as pruning types will automatically prune any fields that rely on them (within mapSchema), but then the empty types may also require pruning. + Schema pruning must be done in rounds, as pruning types will automatically prune any fields that + rely on them (within mapSchema), but then the empty types may also require pruning. ## 8.6.0 @@ -388,13 +476,16 @@ ### Minor Changes - b9684631: feat(validate-documents): more clear error messages with stack -- 67691b78: - `schemaExtensions` option has been added to `mergeSchemas`, `makeExecutableSchema` and `stitchSchemas` configurations +- 67691b78: - `schemaExtensions` option has been added to `mergeSchemas`, `makeExecutableSchema` and + `stitchSchemas` configurations Breaking Changes; - - Move `mergeSchemas` and `MergeSchemasConfig` from `@graphql-tools/merge` to `@graphql-tools/schema` package to prevent circular dependency between them. + - Move `mergeSchemas` and `MergeSchemasConfig` from `@graphql-tools/merge` to + `@graphql-tools/schema` package to prevent circular dependency between them. - `mergeSchemasAsync` has been removed. - - Move `NamedDefinitionNode`, `resetComments`, `collectComment`, `pushComment` and `printComment` from `@graphql-tools/merge` to `@graphql-tools/utils`. + - Move `NamedDefinitionNode`, `resetComments`, `collectComment`, `pushComment` and `printComment` + from `@graphql-tools/merge` to `@graphql-tools/utils`. ### Patch Changes @@ -418,11 +509,14 @@ - af9a78de: BREAKING CHANGE - - Now each loader handles glob patterns internally and returns an array of `Source` object instead of single `Source` + - Now each loader handles glob patterns internally and returns an array of `Source` object instead + of single `Source` - - GraphQL Tag Pluck now respects code locations and returns graphql-js `Source` objects for each found code block + - GraphQL Tag Pluck now respects code locations and returns graphql-js `Source` objects for each + found code block - - Thanks to the one above, `CodeFileLoader` now returns different `Source` objects for each found SDL code block. + - Thanks to the one above, `CodeFileLoader` now returns different `Source` objects for each found + SDL code block. - 7d3e3006: BREAKING CHANGE - Remove `fieldToFieldConfig`, `argsToFieldConfigArgument` and `argumentToArgumentConfig` @@ -437,18 +531,20 @@ When delegating with delegateToSchema, rootValue can be set multiple ways: - - when using a custom executor, the custom executor can utilize a rootValue in whichever custom way it specifies. - - when using the default executor (execute/subscribe from graphql-js): - -- rootValue can be passed to delegateToSchema via a named option - -- rootValue can be included within a subschemaConfig - -- otherwise, rootValue is inferred from the originating schema + - when using a custom executor, the custom executor can utilize a rootValue in whichever custom + way it specifies. + - when using the default executor (execute/subscribe from graphql-js): -- rootValue can be passed + to delegateToSchema via a named option -- rootValue can be included within a subschemaConfig -- + otherwise, rootValue is inferred from the originating schema - When using wrapSchema/stitchSchemas, a subschemaConfig can specify the createProxyingResolver function which can pass whatever rootValue it wants to delegateToSchema as above. + When using wrapSchema/stitchSchemas, a subschemaConfig can specify the createProxyingResolver + function which can pass whatever rootValue it wants to delegateToSchema as above. - 6877b913: BREAKING CHANGES; - `mergeDeep` now takes an array of sources instead of set of parameters as input and it takes an additional flag to enable prototype merging - Instead of `mergeDeep(...sources)` => `mergeDeep(sources)` + `mergeDeep` now takes an array of sources instead of set of parameters as input and it takes an + additional flag to enable prototype merging Instead of `mergeDeep(...sources)` => + `mergeDeep(sources)` - c42e811d: BREAKING CHANGES; @@ -456,20 +552,27 @@ - Add required `operationType: OperationTypeNode` field in `ExecutionRequest` - Add `context` in `createRequest` and `createRequestInfo` instead of `delegateToSchema` - > It doesn't rely on info.operation.operationType to allow the user to call an operation from different root type. - > And it doesn't call getOperationAST again and again to get operation type from the document/operation because we have it in Request and ExecutionParams + > It doesn't rely on info.operation.operationType to allow the user to call an operation from + > different root type. And it doesn't call getOperationAST again and again to get operation type + > from the document/operation because we have it in Request and ExecutionParams > https://github.com/ardatan/graphql-tools/pull/3166/files#diff-d4824895ea613dcc1f710c3ac82e952fe0ca12391b671f70d9f2d90d5656fdceR38 Improvements; - - Memoize `defaultExecutor` for a single `GraphQLSchema` so allow `getBatchingExecutor` to memoize `batchingExecutor` correctly. - - And there is no different `defaultExecutor` is created for `subscription` and other operation types. Only one executor is used. + - Memoize `defaultExecutor` for a single `GraphQLSchema` so allow `getBatchingExecutor` to memoize + `batchingExecutor` correctly. + - And there is no different `defaultExecutor` is created for `subscription` and other operation + types. Only one executor is used. - > Batch executor is memoized by `executor` reference but `createDefaultExecutor` didn't memoize the default executor so this memoization wasn't working correctly on `batch-execute` side. + > Batch executor is memoized by `executor` reference but `createDefaultExecutor` didn't memoize + > the default executor so this memoization wasn't working correctly on `batch-execute` side. > https://github.com/ardatan/graphql-tools/blob/remove-info-executor/packages/batch-execute/src/getBatchingExecutor.ts#L9 - 7d3e3006: BREAKING CHANGE - - Now it uses the native [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) implementation. The major difference is the individual errors are kept under `errors` property instead of the object itself with `Symbol.iterator`. + - Now it uses the native + [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) + implementation. The major difference is the individual errors are kept under `errors` property + instead of the object itself with `Symbol.iterator`. ```js // From; for (const error of aggregateError) @@ -478,25 +581,33 @@ ``` - 8c8d4fc0: BREAKING CHANGE: remove cloneSchema - 7d3e3006: BREAKING CHANGE - - No longer exports `debugLog` but uses `console.log` directly only if `DEBUG` is available under `process.env` + - No longer exports `debugLog` but uses `console.log` directly only if `DEBUG` is available under + `process.env` - 7d3e3006: BREAKING CHANGE - No longer applies `camelCase` naming convention in `buildOperationNodeForField` - 74581cf3: fix(getDirectives): preserve order around repeatable directives - BREAKING CHANGE: getDirectives now always return an array of individual DirectiveAnnotation objects consisting of `name` and `args` properties. + BREAKING CHANGE: getDirectives now always return an array of individual DirectiveAnnotation + objects consisting of `name` and `args` properties. - New useful function `getDirective` returns an array of objects representing any args for each use of a single directive (returning the empty object `{}` when a directive is used without arguments). + New useful function `getDirective` returns an array of objects representing any args for each use + of a single directive (returning the empty object `{}` when a directive is used without + arguments). - Note: The `getDirective` function returns an array even when the specified directive is non-repeatable. This is because one use of this function is to throw an error if more than one directive annotation is used for a non repeatable directive! + Note: The `getDirective` function returns an array even when the specified directive is + non-repeatable. This is because one use of this function is to throw an error if more than one + directive annotation is used for a non repeatable directive! When specifying directives in extensions, one can use either the old or new format. - c0ca3190: BREAKING CHANGE - Remove Subscriber and use only Executor - - - Now `Executor` can receive `AsyncIterable` and subscriptions will also be handled by `Executor`. This is a future-proof change for defer, stream and live queries + - - Now `Executor` can receive `AsyncIterable` and subscriptions will also be handled by + `Executor`. This is a future-proof change for defer, stream and live queries - 7d3e3006: BREAKING CHANGE - No longer exports `SchemaVisitor`, `visitSchema` and `VisitSchemaKind` - - - Use [`mapSchema`](https://www.graphql-tools.com/docs/schema-directives/#full-mapschema-api) instead + - - Use [`mapSchema`](https://www.graphql-tools.com/docs/schema-directives/#full-mapschema-api) + instead ### Minor Changes @@ -515,7 +626,8 @@ ### Patch Changes -- 99f092fd: fix(getResolversFromSchema) Fix resolvers for type names starting with a single underscore. +- 99f092fd: fix(getResolversFromSchema) Fix resolvers for type names starting with a single + underscore. ## 7.9.1 @@ -618,13 +730,15 @@ ### Patch Changes -- e53f97b3: fix(utils): provide { done: true } from iterator when complete is called on observer in observableToAsyncIterable +- e53f97b3: fix(utils): provide { done: true } from iterator when complete is called on observer in + observableToAsyncIterable ## 7.2.5 ### Patch Changes -- 4fc05eb7: Fixes the handling of repeatable directives in the `getDirectives` method. Previously repeatable directives were nested and duplicated. They will now return as a flat array map: +- 4fc05eb7: Fixes the handling of repeatable directives in the `getDirectives` method. Previously + repeatable directives were nested and duplicated. They will now return as a flat array map: ```graphql @mydir(arg: "first") @mydir(arg: "second") @@ -644,7 +758,9 @@ - 6e50d9fc: enhance(stitching-directives): use keyField - When using simple keys, i.e. when using the keyField argument to `@merge`, the keyField can be added implicitly to the types's key. In most cases, therefore, `@key` should not be required at all. + When using simple keys, i.e. when using the keyField argument to `@merge`, the keyField can be + added implicitly to the types's key. In most cases, therefore, `@key` should not be required at + all. ## 7.2.3 @@ -656,7 +772,8 @@ ### Patch Changes -- 63ab0034: fix(printSchemaWithDirectives): should print directives where used, even if directives themselves are not defined within the schema. +- 63ab0034: fix(printSchemaWithDirectives): should print directives where used, even if directives + themselves are not defined within the schema. ## 7.2.1 @@ -668,7 +785,8 @@ ### Minor Changes -- c3996f60: enhance(utils): support code-first schemas by allowing directives to be read from extensions +- c3996f60: enhance(utils): support code-first schemas by allowing directives to be read from + extensions ### Patch Changes @@ -739,59 +857,118 @@ #### Schema Generation and Decoration API (`@graphql-tools/schema`) - - Resolver validation options should now be set to `error`, `warn` or `ignore` rather than `true` or `false`. In previous versions, some of the validators caused errors to be thrown, while some issued warnings. This changes brings consistency to validator behavior. + - Resolver validation options should now be set to `error`, `warn` or `ignore` rather than `true` + or `false`. In previous versions, some of the validators caused errors to be thrown, while some + issued warnings. This changes brings consistency to validator behavior. - - The `allowResolversNotInSchema` has been renamed to `requireResolversToMatchSchema`, to harmonize the naming convention of all the validators. The default setting of `requireResolversToMatchSchema` is `error`, matching the previous behavior. + - The `allowResolversNotInSchema` has been renamed to `requireResolversToMatchSchema`, to + harmonize the naming convention of all the validators. The default setting of + `requireResolversToMatchSchema` is `error`, matching the previous behavior. #### Schema Delegation (`delegateToSchema` & `@graphql-tools/delegate`) - - The `delegateToSchema` return value has matured and been formalized as an `ExternalObject`, in which all errors are integrated into the GraphQL response, preserving their initial path. Those advanced users accessing the result directly will note the change in error handling. This also allows for the deprecation of unnecessary helper functions including `slicedError`, `getErrors`, `getErrorsByPathSegment` functions. Only external errors with missing or invalid paths must still be preserved by annotating the remote object with special properties. The new `getUnpathedErrors` function is therefore necessary for retrieving only these errors. Note also the new `annotateExternalObject` and `mergeExternalObjects` functions, as well as the renaming of `handleResult` to `resolveExternalValue`. - - - Transform types and the `applySchemaTransforms` are now relocated to the `delegate` package; `applyRequestTransforms`/`applyResultTransforms` functions have been deprecated, however, as this functionality has been replaced since v6 by the `Transformer` abstraction. - - - The `transformRequest`/`transformResult` methods are now provided additional `delegationContext` and `transformationContext` arguments -- these were introduced in v6, but previously optional. - - - The `transformSchema` method may wish to create additional delegating resolvers and so it is now provided the `subschemaConfig` and final (non-executable) `transformedSchema` parameters. As in v6, the `transformSchema` is kicked off once to produce the non-executable version, and then, if a wrapping schema is being generated, proxying resolvers are created with access to the (non-executable) initial result. In v7, the individual `transformSchema` methods also get access to the result of the first run, if necessary, they can create additional wrapping schema proxying resolvers. - - - `applySchemaTransforms` parameters have been updated to match and support the `transformSchema` parameters above. + - The `delegateToSchema` return value has matured and been formalized as an `ExternalObject`, in + which all errors are integrated into the GraphQL response, preserving their initial path. Those + advanced users accessing the result directly will note the change in error handling. This also + allows for the deprecation of unnecessary helper functions including `slicedError`, `getErrors`, + `getErrorsByPathSegment` functions. Only external errors with missing or invalid paths must + still be preserved by annotating the remote object with special properties. The new + `getUnpathedErrors` function is therefore necessary for retrieving only these errors. Note also + the new `annotateExternalObject` and `mergeExternalObjects` functions, as well as the renaming + of `handleResult` to `resolveExternalValue`. + + - Transform types and the `applySchemaTransforms` are now relocated to the `delegate` package; + `applyRequestTransforms`/`applyResultTransforms` functions have been deprecated, however, as + this functionality has been replaced since v6 by the `Transformer` abstraction. + + - The `transformRequest`/`transformResult` methods are now provided additional `delegationContext` + and `transformationContext` arguments -- these were introduced in v6, but previously optional. + + - The `transformSchema` method may wish to create additional delegating resolvers and so it is now + provided the `subschemaConfig` and final (non-executable) `transformedSchema` parameters. As in + v6, the `transformSchema` is kicked off once to produce the non-executable version, and then, if + a wrapping schema is being generated, proxying resolvers are created with access to the + (non-executable) initial result. In v7, the individual `transformSchema` methods also get access + to the result of the first run, if necessary, they can create additional wrapping schema + proxying resolvers. + + - `applySchemaTransforms` parameters have been updated to match and support the `transformSchema` + parameters above. #### Remote Schemas & Wrapping (`wrapSchema`, `makeRemoteExecutableSchema`, and `@graphql-tools/wrap`) - - `wrapSchema` and `generateProxyingResolvers` now only take a single options argument with named properties of type `SubschemaConfig`. The previously possible shorthand version with first argument consisting of a `GraphQLSchema` and second argument representing the transforms should be reworked as a `SubschemaConfig` object. - - - Similarly, the `ICreateProxyingResolverOptions` interface that provides the options for the `createProxyingResolver` property of `SubschemaConfig` options has been adjusted. The `schema` property previously could be set to a `GraphQLSchema` or a `SubschemaConfig` object. This property has been removed in favor of a `subschemaConfig` property that will always be a `SubschemaConfig` object. The `transforms` property has been removed; transforms should be included within the `SubschemaConfig` object.` - - - The format of the wrapping schema has solidified. All non-root fields are expected to use identical resolvers, either `defaultMergedResolver` or a custom equivalent, with root fields doing the hard work of proxying. Support for custom merged resolvers throught `createMergedResolver` has been deprecated, as custom merging resolvers conflicts when using stitching's type merging, where resolvers are expected to be identical across subschemas. - - - The `WrapFields` transform's `wrappingResolver` option has been removed, as this complicates multiple wrapping layers, as well as planned functionality to wrap subscription root fields in potentially multiple layers, as the wrapping resolvers may be different in different layers. Modifying resolvers can still be performed by use of an additional transform such as `TransformRootFields` or `TransformObjectFields`. - - - The `ExtendSchema` transform has been removed, as it is conceptually simpler just to use `stitchSchemas` with one subschema. - - - The `ReplaceFieldsWithFragment`, `AddFragmentsByField`, `AddSelectionSetsByField`, and `AddMergedTypeSelectionSets` transforms has been removed, as they are superseded by the `AddSelectionSets` and `VisitSelectionSets` transforms. The `AddSelectionSets` purposely takes parsed SDL rather than strings, to nudge end users to parse these strings at build time (when possible), rather than at runtime. Parsing of selection set strings can be performed using the `parseSelectionSet` function from `@graphql-tools/utils`. + - `wrapSchema` and `generateProxyingResolvers` now only take a single options argument with named + properties of type `SubschemaConfig`. The previously possible shorthand version with first + argument consisting of a `GraphQLSchema` and second argument representing the transforms should + be reworked as a `SubschemaConfig` object. + + - Similarly, the `ICreateProxyingResolverOptions` interface that provides the options for the + `createProxyingResolver` property of `SubschemaConfig` options has been adjusted. The `schema` + property previously could be set to a `GraphQLSchema` or a `SubschemaConfig` object. This + property has been removed in favor of a `subschemaConfig` property that will always be a + `SubschemaConfig` object. The `transforms` property has been removed; transforms should be + included within the `SubschemaConfig` object.` + + - The format of the wrapping schema has solidified. All non-root fields are expected to use + identical resolvers, either `defaultMergedResolver` or a custom equivalent, with root fields + doing the hard work of proxying. Support for custom merged resolvers throught + `createMergedResolver` has been deprecated, as custom merging resolvers conflicts when using + stitching's type merging, where resolvers are expected to be identical across subschemas. + + - The `WrapFields` transform's `wrappingResolver` option has been removed, as this complicates + multiple wrapping layers, as well as planned functionality to wrap subscription root fields in + potentially multiple layers, as the wrapping resolvers may be different in different layers. + Modifying resolvers can still be performed by use of an additional transform such as + `TransformRootFields` or `TransformObjectFields`. + + - The `ExtendSchema` transform has been removed, as it is conceptually simpler just to use + `stitchSchemas` with one subschema. + + - The `ReplaceFieldsWithFragment`, `AddFragmentsByField`, `AddSelectionSetsByField`, and + `AddMergedTypeSelectionSets` transforms has been removed, as they are superseded by the + `AddSelectionSets` and `VisitSelectionSets` transforms. The `AddSelectionSets` purposely takes + parsed SDL rather than strings, to nudge end users to parse these strings at build time (when + possible), rather than at runtime. Parsing of selection set strings can be performed using the + `parseSelectionSet` function from `@graphql-tools/utils`. #### Schema Stitching (`stitchSchemas` & `@graphql-tools/stitch`) - - `stitchSchemas`'s `mergeTypes` option is now true by default! This causes the `onTypeConflict` option to be ignored by default. To use `onTypeConflict` to select a specific type instead of simply merging, simply set `mergeTypes` to false. + - `stitchSchemas`'s `mergeTypes` option is now true by default! This causes the `onTypeConflict` + option to be ignored by default. To use `onTypeConflict` to select a specific type instead of + simply merging, simply set `mergeTypes` to false. - - `schemas` argument has been deprecated, use `subschemas`, `typeDefs`, or `types`, depending on what you are stitching. + - `schemas` argument has been deprecated, use `subschemas`, `typeDefs`, or `types`, depending on + what you are stitching. - - When using batch delegation in type merging, the `argsFromKeys` function is now set only via the `argsFromKeys` property. Previously, if `argsFromKeys` was absent, it could be read from `args`. + - When using batch delegation in type merging, the `argsFromKeys` function is now set only via the + `argsFromKeys` property. Previously, if `argsFromKeys` was absent, it could be read from `args`. - Support for fragment hints has been removed in favor of selection set hints. - - `stitchSchemas` now processes all `GraphQLSchema` and `SubschemaConfig` subschema input into new `Subschema` objects, handling schema config directives such aso`@computed` as well as generating the final transformed schema, stored as the `transformedSchema` property, if transforms are used. Signatures of the `onTypeConflict`, `fieldConfigMerger`, and `inputFieldConfigMerger` have been updated to include metadata related to the original and transformed subschemas. Note the property name change for `onTypeConflict` from `schema` to `subschema`. + - `stitchSchemas` now processes all `GraphQLSchema` and `SubschemaConfig` subschema input into new + `Subschema` objects, handling schema config directives such aso`@computed` as well as generating + the final transformed schema, stored as the `transformedSchema` property, if transforms are + used. Signatures of the `onTypeConflict`, `fieldConfigMerger`, and `inputFieldConfigMerger` have + been updated to include metadata related to the original and transformed subschemas. Note the + property name change for `onTypeConflict` from `schema` to `subschema`. #### Mocking (`addMocksToSchema` and `@graphql-tools/mock`) - - Mocks returning objects with fields set as functions are now operating according to upstream graphql-js convention, i.e. these functions take three arguments, `args`, `context`, and `info` with `parent` available as `this` rather than as the first argument. + - Mocks returning objects with fields set as functions are now operating according to upstream + graphql-js convention, i.e. these functions take three arguments, `args`, `context`, and `info` + with `parent` available as `this` rather than as the first argument. #### Other Utilities (`@graphql-tools/utils`) - - `filterSchema`'s `fieldFilter` will now filter _all_ fields across Object, Interface, and Input types. For the previous Object-only behavior, switch to the `objectFieldFilter` option. + - `filterSchema`'s `fieldFilter` will now filter _all_ fields across Object, Interface, and Input + types. For the previous Object-only behavior, switch to the `objectFieldFilter` option. - Unused `fieldNodes` utility functions have been removed. - - Unused `typeContainsSelectionSet` function has been removed, and `typesContainSelectionSet` has been moved to the `stitch` package. - - Unnecessary `Operation` type has been removed in favor of `OperationTypeNode` from upstream graphql-js. - - As above, `applySchemaTransforms`/`applyRequestTransforms`/`applyResultTransforms` have been removed from the `utils` package, as they are implemented elsewhere or no longer necessary. + - Unused `typeContainsSelectionSet` function has been removed, and `typesContainSelectionSet` has + been moved to the `stitch` package. + - Unnecessary `Operation` type has been removed in favor of `OperationTypeNode` from upstream + graphql-js. + - As above, `applySchemaTransforms`/`applyRequestTransforms`/`applyResultTransforms` have been + removed from the `utils` package, as they are implemented elsewhere or no longer necessary. ## Related Issues diff --git a/packages/utils/package.json b/packages/utils/package.json index 323d1d8d474..ea6d9b28343 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-tools/utils", - "version": "10.0.3", + "version": "10.0.4", "type": "module", "description": "Common package containing utils and types for GraphQL tools", "repository": {