From 876ea0c9da1221df39c6380b9d9be02802dca049 Mon Sep 17 00:00:00 2001 From: TheGuildBot <59414373+theguild-bot@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:17:05 +0100 Subject: [PATCH] chore(release): update monorepo packages versions (#10165) Co-authored-by: github-actions[bot] --- .changeset/fifty-dodos-marry.md | 11 --- .changeset/grumpy-moose-bake.md | 8 -- .changeset/shy-berries-shop.md | 5 -- .changeset/slimy-years-behave.md | 5 -- .changeset/twenty-spiders-sell.md | 5 -- examples/programmatic-typescript/package.json | 10 +-- examples/typescript-resolvers/package.json | 4 +- .../other/visitor-plugin-common/CHANGELOG.md | 19 +++++ .../other/visitor-plugin-common/package.json | 4 +- .../typescript/document-nodes/CHANGELOG.md | 8 ++ .../typescript/document-nodes/package.json | 6 +- .../gql-tag-operations/CHANGELOG.md | 8 ++ .../gql-tag-operations/package.json | 6 +- .../typescript/operations/CHANGELOG.md | 9 +++ .../typescript/operations/package.json | 8 +- .../plugins/typescript/resolvers/CHANGELOG.md | 21 +++++ .../plugins/typescript/resolvers/package.json | 8 +- .../typed-document-node/CHANGELOG.md | 10 +++ .../typed-document-node/package.json | 6 +- .../typescript/typescript/CHANGELOG.md | 8 ++ .../typescript/typescript/package.json | 6 +- packages/presets/client/CHANGELOG.md | 18 +++++ packages/presets/client/package.json | 14 ++-- packages/presets/graphql-modules/CHANGELOG.md | 8 ++ packages/presets/graphql-modules/package.json | 6 +- packages/utils/plugins-helpers/CHANGELOG.md | 76 +++++++++++-------- packages/utils/plugins-helpers/package.json | 2 +- website/package.json | 10 +-- 28 files changed, 197 insertions(+), 112 deletions(-) delete mode 100644 .changeset/fifty-dodos-marry.md delete mode 100644 .changeset/grumpy-moose-bake.md delete mode 100644 .changeset/shy-berries-shop.md delete mode 100644 .changeset/slimy-years-behave.md delete mode 100644 .changeset/twenty-spiders-sell.md diff --git a/.changeset/fifty-dodos-marry.md b/.changeset/fifty-dodos-marry.md deleted file mode 100644 index aec4dc48134..00000000000 --- a/.changeset/fifty-dodos-marry.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@graphql-codegen/visitor-plugin-common': minor -'@graphql-codegen/typescript-resolvers': minor -'@graphql-codegen/plugin-helpers': minor ---- - -Add `generateInternalResolversIfNeeded` option - -This option can be used to generate more correct types for internal resolvers. For example, only generate `__resolveReference` if the federation object has a resolvable `@key`. - -In the future, this option can be extended to support other internal resolvers e.g. `__isTypeOf` is only generated for implementing types and union members. diff --git a/.changeset/grumpy-moose-bake.md b/.changeset/grumpy-moose-bake.md deleted file mode 100644 index f3f05d28f6c..00000000000 --- a/.changeset/grumpy-moose-bake.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@graphql-codegen/visitor-plugin-common': minor -'@graphql-codegen/typescript-resolvers': minor ---- - -Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursively - -For users that already sets recursive default mappers e.g. `Partial<{T}>` or `DeepPartial<{T}>`, having both options on will cause a nested loop which eventually crashes Codegen. In such case, setting `avoidCheckingAbstractTypesRecursively: true` allows users to continue to use recursive default mappers as before. diff --git a/.changeset/shy-berries-shop.md b/.changeset/shy-berries-shop.md deleted file mode 100644 index 8fb21f26ba0..00000000000 --- a/.changeset/shy-berries-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-codegen/client-preset': patch ---- - -Revert slimmer client preset output diff --git a/.changeset/slimy-years-behave.md b/.changeset/slimy-years-behave.md deleted file mode 100644 index a376c7cf441..00000000000 --- a/.changeset/slimy-years-behave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-codegen/client-preset': minor ---- - -foward skipTypeNameForRoot to client-preset diff --git a/.changeset/twenty-spiders-sell.md b/.changeset/twenty-spiders-sell.md deleted file mode 100644 index 6acb6454b63..00000000000 --- a/.changeset/twenty-spiders-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphql-codegen/typed-document-node': patch ---- - -Allow explicit `undefined` in additional to optional arguments diff --git a/examples/programmatic-typescript/package.json b/examples/programmatic-typescript/package.json index 9652a7f63bd..3ba68095182 100644 --- a/examples/programmatic-typescript/package.json +++ b/examples/programmatic-typescript/package.json @@ -11,11 +11,11 @@ }, "dependencies": { "@graphql-codegen/core": "4.0.2", - "@graphql-codegen/plugin-helpers": "5.0.4", - "@graphql-codegen/typed-document-node": "5.0.10", - "@graphql-codegen/typescript": "4.1.0", - "@graphql-codegen/typescript-operations": "4.3.0", - "@graphql-codegen/typescript-resolvers": "4.3.0", + "@graphql-codegen/plugin-helpers": "5.1.0", + "@graphql-codegen/typed-document-node": "5.0.11", + "@graphql-codegen/typescript": "4.1.1", + "@graphql-codegen/typescript-operations": "4.3.1", + "@graphql-codegen/typescript-resolvers": "4.4.0", "@graphql-tools/graphql-file-loader": "8.0.1", "@graphql-tools/load": "8.0.2", "@graphql-tools/schema": "10.0.6", diff --git a/examples/typescript-resolvers/package.json b/examples/typescript-resolvers/package.json index 6c85f512de3..889e730ba01 100644 --- a/examples/typescript-resolvers/package.json +++ b/examples/typescript-resolvers/package.json @@ -4,8 +4,8 @@ "private": true, "devDependencies": { "@graphql-codegen/cli": "5.0.3", - "@graphql-codegen/typescript": "4.1.0", - "@graphql-codegen/typescript-resolvers": "4.3.0" + "@graphql-codegen/typescript": "4.1.1", + "@graphql-codegen/typescript-resolvers": "4.4.0" }, "dependencies": { "graphql": "16.9.0", diff --git a/packages/plugins/other/visitor-plugin-common/CHANGELOG.md b/packages/plugins/other/visitor-plugin-common/CHANGELOG.md index 2d6de1da573..016f66589c9 100644 --- a/packages/plugins/other/visitor-plugin-common/CHANGELOG.md +++ b/packages/plugins/other/visitor-plugin-common/CHANGELOG.md @@ -1,5 +1,24 @@ # @graphql-codegen/visitor-plugin-common +## 5.5.0 + +### Minor Changes + +- [#9989](https://github.com/dotansimha/graphql-code-generator/pull/9989) [`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc) Thanks [@eddeee888](https://github.com/eddeee888)! - Add `generateInternalResolversIfNeeded` option + + This option can be used to generate more correct types for internal resolvers. For example, only generate `__resolveReference` if the federation object has a resolvable `@key`. + + In the future, this option can be extended to support other internal resolvers e.g. `__isTypeOf` is only generated for implementing types and union members. + +- [#10141](https://github.com/dotansimha/graphql-code-generator/pull/10141) [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03) Thanks [@eddeee888](https://github.com/eddeee888)! - Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursively + + For users that already sets recursive default mappers e.g. `Partial<{T}>` or `DeepPartial<{T}>`, having both options on will cause a nested loop which eventually crashes Codegen. In such case, setting `avoidCheckingAbstractTypesRecursively: true` allows users to continue to use recursive default mappers as before. + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc)]: + - @graphql-codegen/plugin-helpers@5.1.0 + ## 5.4.0 ### Minor Changes diff --git a/packages/plugins/other/visitor-plugin-common/package.json b/packages/plugins/other/visitor-plugin-common/package.json index 5e5d4bd19ae..fb9176655e9 100644 --- a/packages/plugins/other/visitor-plugin-common/package.json +++ b/packages/plugins/other/visitor-plugin-common/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/visitor-plugin-common", - "version": "5.4.0", + "version": "5.5.0", "license": "MIT", "repository": { "type": "git", @@ -13,7 +13,7 @@ }, "dependencies": { "@graphql-tools/optimize": "^2.0.0", - "@graphql-codegen/plugin-helpers": "^5.0.4", + "@graphql-codegen/plugin-helpers": "^5.1.0", "@graphql-tools/relay-operation-optimizer": "^7.0.0", "@graphql-tools/utils": "^10.0.0", "auto-bind": "~4.0.0", diff --git a/packages/plugins/typescript/document-nodes/CHANGELOG.md b/packages/plugins/typescript/document-nodes/CHANGELOG.md index 543ae56a4b4..11dcf033a05 100644 --- a/packages/plugins/typescript/document-nodes/CHANGELOG.md +++ b/packages/plugins/typescript/document-nodes/CHANGELOG.md @@ -1,5 +1,13 @@ # @graphql-codegen/typescript-document-nodes +## 4.0.11 + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + ## 4.0.10 ### Patch Changes diff --git a/packages/plugins/typescript/document-nodes/package.json b/packages/plugins/typescript/document-nodes/package.json index 4e24cbf3715..869648a8f26 100644 --- a/packages/plugins/typescript/document-nodes/package.json +++ b/packages/plugins/typescript/document-nodes/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/typescript-document-nodes", - "version": "4.0.10", + "version": "4.0.11", "description": "GraphQL Code Generator plugin for generating TypeScript modules with embedded GraphQL document nodes", "repository": { "type": "git", @@ -13,8 +13,8 @@ "test": "jest --no-watchman --config ../../../../jest.config.js" }, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" }, diff --git a/packages/plugins/typescript/gql-tag-operations/CHANGELOG.md b/packages/plugins/typescript/gql-tag-operations/CHANGELOG.md index f00e43c412f..b34d0d39431 100644 --- a/packages/plugins/typescript/gql-tag-operations/CHANGELOG.md +++ b/packages/plugins/typescript/gql-tag-operations/CHANGELOG.md @@ -1,5 +1,13 @@ # @graphql-codegen/gql-tag-operations +## 4.0.11 + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + ## 4.0.10 ### Patch Changes diff --git a/packages/plugins/typescript/gql-tag-operations/package.json b/packages/plugins/typescript/gql-tag-operations/package.json index bb31a18b5e9..8b8aa3f8c58 100644 --- a/packages/plugins/typescript/gql-tag-operations/package.json +++ b/packages/plugins/typescript/gql-tag-operations/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/gql-tag-operations", - "version": "4.0.10", + "version": "4.0.11", "description": "GraphQL Code Generator plugin for generating a typed gql tag function", "repository": { "type": "git", @@ -17,8 +17,8 @@ }, "dependencies": { "@graphql-tools/utils": "^10.0.0", - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" }, diff --git a/packages/plugins/typescript/operations/CHANGELOG.md b/packages/plugins/typescript/operations/CHANGELOG.md index 0d7243be925..845b23946af 100644 --- a/packages/plugins/typescript/operations/CHANGELOG.md +++ b/packages/plugins/typescript/operations/CHANGELOG.md @@ -1,5 +1,14 @@ # @graphql-codegen/typescript-operations +## 4.3.1 + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + - @graphql-codegen/typescript@4.1.1 + ## 4.3.0 ### Minor Changes diff --git a/packages/plugins/typescript/operations/package.json b/packages/plugins/typescript/operations/package.json index 669abfc63e9..3dea59f34db 100644 --- a/packages/plugins/typescript/operations/package.json +++ b/packages/plugins/typescript/operations/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/typescript-operations", - "version": "4.3.0", + "version": "4.3.1", "description": "GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments", "repository": { "type": "git", @@ -13,9 +13,9 @@ "test": "jest --no-watchman --config ../../../../jest.config.js" }, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/typescript": "^4.1.0", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/typescript": "^4.1.1", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" }, diff --git a/packages/plugins/typescript/resolvers/CHANGELOG.md b/packages/plugins/typescript/resolvers/CHANGELOG.md index 6c2bf3a47a2..5c0a633ee6a 100644 --- a/packages/plugins/typescript/resolvers/CHANGELOG.md +++ b/packages/plugins/typescript/resolvers/CHANGELOG.md @@ -1,5 +1,26 @@ # @graphql-codegen/typescript-resolvers +## 4.4.0 + +### Minor Changes + +- [#9989](https://github.com/dotansimha/graphql-code-generator/pull/9989) [`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc) Thanks [@eddeee888](https://github.com/eddeee888)! - Add `generateInternalResolversIfNeeded` option + + This option can be used to generate more correct types for internal resolvers. For example, only generate `__resolveReference` if the federation object has a resolvable `@key`. + + In the future, this option can be extended to support other internal resolvers e.g. `__isTypeOf` is only generated for implementing types and union members. + +- [#10141](https://github.com/dotansimha/graphql-code-generator/pull/10141) [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03) Thanks [@eddeee888](https://github.com/eddeee888)! - Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursively + + For users that already sets recursive default mappers e.g. `Partial<{T}>` or `DeepPartial<{T}>`, having both options on will cause a nested loop which eventually crashes Codegen. In such case, setting `avoidCheckingAbstractTypesRecursively: true` allows users to continue to use recursive default mappers as before. + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + - @graphql-codegen/typescript@4.1.1 + ## 4.3.0 ### Minor Changes diff --git a/packages/plugins/typescript/resolvers/package.json b/packages/plugins/typescript/resolvers/package.json index 1f973d19334..1f955ccebab 100644 --- a/packages/plugins/typescript/resolvers/package.json +++ b/packages/plugins/typescript/resolvers/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/typescript-resolvers", - "version": "4.3.0", + "version": "4.4.0", "description": "GraphQL Code Generator plugin for generating TypeScript types for resolvers signature", "repository": { "type": "git", @@ -13,9 +13,9 @@ "test": "jest --no-watchman --config ../../../../jest.config.js" }, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/typescript": "^4.1.0", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/typescript": "^4.1.1", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "@graphql-tools/utils": "^10.0.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" diff --git a/packages/plugins/typescript/typed-document-node/CHANGELOG.md b/packages/plugins/typescript/typed-document-node/CHANGELOG.md index 59c572e8732..bee7933d6da 100644 --- a/packages/plugins/typescript/typed-document-node/CHANGELOG.md +++ b/packages/plugins/typescript/typed-document-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @graphql-codegen/typed-document-node +## 5.0.11 + +### Patch Changes + +- [#10160](https://github.com/dotansimha/graphql-code-generator/pull/10160) [`c7af639`](https://github.com/dotansimha/graphql-code-generator/commit/c7af63964089938150402db69d49f11f93bb5175) Thanks [@jyasskin](https://github.com/jyasskin)! - Allow explicit `undefined` in additional to optional arguments + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + ## 5.0.10 ### Patch Changes diff --git a/packages/plugins/typescript/typed-document-node/package.json b/packages/plugins/typescript/typed-document-node/package.json index 267f2b10366..6f629d971a9 100644 --- a/packages/plugins/typescript/typed-document-node/package.json +++ b/packages/plugins/typescript/typed-document-node/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/typed-document-node", - "version": "5.0.10", + "version": "5.0.11", "description": "GraphQL Code Generator plugin for generating ready-to-use TypedDocumentNode based on GraphQL operations", "repository": { "type": "git", @@ -17,8 +17,8 @@ }, "dependencies": { "change-case-all": "1.0.15", - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" }, diff --git a/packages/plugins/typescript/typescript/CHANGELOG.md b/packages/plugins/typescript/typescript/CHANGELOG.md index e68a5b5ccec..2179b73e971 100644 --- a/packages/plugins/typescript/typescript/CHANGELOG.md +++ b/packages/plugins/typescript/typescript/CHANGELOG.md @@ -1,5 +1,13 @@ # @graphql-codegen/typescript +## 4.1.1 + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + ## 4.1.0 ### Minor Changes diff --git a/packages/plugins/typescript/typescript/package.json b/packages/plugins/typescript/typescript/package.json index 70974aaf29a..27a82e4c590 100644 --- a/packages/plugins/typescript/typescript/package.json +++ b/packages/plugins/typescript/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/typescript", - "version": "4.1.0", + "version": "4.1.1", "description": "GraphQL Code Generator plugin for generating TypeScript types", "repository": { "type": "git", @@ -13,9 +13,9 @@ "test": "jest --no-watchman --config ../../../../jest.config.js" }, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", + "@graphql-codegen/plugin-helpers": "^5.1.0", "@graphql-codegen/schema-ast": "^4.0.2", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" }, diff --git a/packages/presets/client/CHANGELOG.md b/packages/presets/client/CHANGELOG.md index bf91a06cdd1..7025df3ec53 100644 --- a/packages/presets/client/CHANGELOG.md +++ b/packages/presets/client/CHANGELOG.md @@ -1,5 +1,23 @@ # @graphql-codegen/client-preset +## 4.5.0 + +### Minor Changes + +- [#10136](https://github.com/dotansimha/graphql-code-generator/pull/10136) [`3fd4486`](https://github.com/dotansimha/graphql-code-generator/commit/3fd4486a548c27099377c7bd696a22d1638227f4) Thanks [@wxt2005](https://github.com/wxt2005)! - foward skipTypeNameForRoot to client-preset + +### Patch Changes + +- [#10182](https://github.com/dotansimha/graphql-code-generator/pull/10182) [`effd875`](https://github.com/dotansimha/graphql-code-generator/commit/effd875b205fa9c5a99ce5e7fcdeb86cea7723fc) Thanks [@eddeee888](https://github.com/eddeee888)! - Revert slimmer client preset output + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03), [`c7af639`](https://github.com/dotansimha/graphql-code-generator/commit/c7af63964089938150402db69d49f11f93bb5175)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + - @graphql-codegen/typed-document-node@5.0.11 + - @graphql-codegen/gql-tag-operations@4.0.11 + - @graphql-codegen/typescript-operations@4.3.1 + - @graphql-codegen/typescript@4.1.1 + ## 4.4.0 ### Minor Changes diff --git a/packages/presets/client/package.json b/packages/presets/client/package.json index 8447c5a2a2b..3b233c3dc23 100644 --- a/packages/presets/client/package.json +++ b/packages/presets/client/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/client-preset", - "version": "4.4.0", + "version": "4.5.0", "description": "GraphQL Code Generator preset for client.", "repository": { "type": "git", @@ -20,12 +20,12 @@ "@babel/helper-plugin-utils": "^7.20.2", "@babel/template": "^7.20.7", "@graphql-codegen/add": "^5.0.3", - "@graphql-codegen/typed-document-node": "^5.0.10", - "@graphql-codegen/typescript": "^4.1.0", - "@graphql-codegen/typescript-operations": "^4.3.0", - "@graphql-codegen/gql-tag-operations": "4.0.10", - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "^5.4.0", + "@graphql-codegen/typed-document-node": "^5.0.11", + "@graphql-codegen/typescript": "^4.1.1", + "@graphql-codegen/typescript-operations": "^4.3.1", + "@graphql-codegen/gql-tag-operations": "4.0.11", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/visitor-plugin-common": "^5.5.0", "@graphql-typed-document-node/core": "3.2.0", "@graphql-tools/documents": "^1.0.0", "@graphql-tools/utils": "^10.0.0", diff --git a/packages/presets/graphql-modules/CHANGELOG.md b/packages/presets/graphql-modules/CHANGELOG.md index dc1bad8a9c1..6d4e47dc3f9 100644 --- a/packages/presets/graphql-modules/CHANGELOG.md +++ b/packages/presets/graphql-modules/CHANGELOG.md @@ -1,5 +1,13 @@ # @graphql-codegen/graphql-modules-preset +## 4.0.11 + +### Patch Changes + +- Updated dependencies [[`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc), [`a235051`](https://github.com/dotansimha/graphql-code-generator/commit/a23505180ac2f275a55ece27162ec9bfcdc52e03)]: + - @graphql-codegen/visitor-plugin-common@5.5.0 + - @graphql-codegen/plugin-helpers@5.1.0 + ## 4.0.10 ### Patch Changes diff --git a/packages/presets/graphql-modules/package.json b/packages/presets/graphql-modules/package.json index a411b7d9a87..0cc82e1b837 100644 --- a/packages/presets/graphql-modules/package.json +++ b/packages/presets/graphql-modules/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/graphql-modules-preset", - "version": "4.0.10", + "version": "4.0.11", "description": "GraphQL Code Generator preset for modularized schema", "repository": { "type": "git", @@ -15,8 +15,8 @@ "@types/parse-filepath": "1.0.2" }, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "5.4.0", + "@graphql-codegen/plugin-helpers": "^5.1.0", + "@graphql-codegen/visitor-plugin-common": "5.5.0", "@graphql-tools/utils": "^10.0.0", "parse-filepath": "^1.0.2", "change-case-all": "1.0.15", diff --git a/packages/utils/plugins-helpers/CHANGELOG.md b/packages/utils/plugins-helpers/CHANGELOG.md index f9045c77ea2..0857ef1938d 100644 --- a/packages/utils/plugins-helpers/CHANGELOG.md +++ b/packages/utils/plugins-helpers/CHANGELOG.md @@ -1,5 +1,15 @@ # @graphql-codegen/plugin-helpers +## 5.1.0 + +### Minor Changes + +- [#9989](https://github.com/dotansimha/graphql-code-generator/pull/9989) [`55a1e9e`](https://github.com/dotansimha/graphql-code-generator/commit/55a1e9e63830df17ed40602ea7e322bbf48b17bc) Thanks [@eddeee888](https://github.com/eddeee888)! - Add `generateInternalResolversIfNeeded` option + + This option can be used to generate more correct types for internal resolvers. For example, only generate `__resolveReference` if the federation object has a resolvable `@key`. + + In the future, this option can be extended to support other internal resolvers e.g. `__isTypeOf` is only generated for implementing types and union members. + ## 5.0.4 ### Patch Changes @@ -99,7 +109,7 @@ To use this feature, you can write `documentTransforms` as follows: ```ts - import type { CodegenConfig } from '@graphql-codegen/cli'; + import type { CodegenConfig } from '@graphql-codegen/cli' const config: CodegenConfig = { schema: 'https://localhost:4000/graphql', @@ -111,21 +121,21 @@ { transform: ({ documents }) => { // Make some changes to the documents - return documents; - }, - }, - ], - }, - }, - }; - export default config; + return documents + } + } + ] + } + } + } + export default config ``` For instance, to remove a `@localOnlyDirective` directive from `documents`, you can write the following code: ```js - import type { CodegenConfig } from '@graphql-codegen/cli'; - import { visit } from 'graphql'; + import type { CodegenConfig } from '@graphql-codegen/cli' + import { visit } from 'graphql' const config: CodegenConfig = { schema: 'https://localhost:4000/graphql', @@ -140,19 +150,19 @@ documentFile.document = visit(documentFile.document, { Directive: { leave(node) { - if (node.name.value === 'localOnlyDirective') return null; - }, - }, - }); - return documentFile; - }); - }, - }, - ], - }, - }, - }; - export default config; + if (node.name.value === 'localOnlyDirective') return null + } + } + }) + return documentFile + }) + } + } + ] + } + } + } + export default config ``` DocumentTransform can also be specified by file name. You can create a custom file for a specific transformation and pass it to `documentTransforms`. @@ -163,15 +173,15 @@ module.exports = { transform: ({ documents }) => { // Make some changes to the documents - return documents; - }, - }; + return documents + } + } ``` Then, you can specify the file name as follows: ```ts - import type { CodegenConfig } from '@graphql-codegen/cli'; + import type { CodegenConfig } from '@graphql-codegen/cli' const config: CodegenConfig = { schema: 'https://localhost:4000/graphql', @@ -179,11 +189,11 @@ generates: { './src/gql/': { preset: 'client', - documentTransforms: ['./my-document-transform.js'], - }, - }, - }; - export default config; + documentTransforms: ['./my-document-transform.js'] + } + } + } + export default config ``` ### Patch Changes diff --git a/packages/utils/plugins-helpers/package.json b/packages/utils/plugins-helpers/package.json index 6cb2c6c3915..5fd19d4c9a5 100644 --- a/packages/utils/plugins-helpers/package.json +++ b/packages/utils/plugins-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-codegen/plugin-helpers", - "version": "5.0.4", + "version": "5.1.0", "description": "GraphQL Code Generator common utils and types", "repository": { "type": "git", diff --git a/website/package.json b/website/package.json index c77f5b187c8..bf52c1a8e94 100644 --- a/website/package.json +++ b/website/package.json @@ -24,7 +24,7 @@ "@graphql-codegen/c-sharp": "4.3.1", "@graphql-codegen/c-sharp-operations": "2.3.1", "@graphql-codegen/cli": "5.0.3", - "@graphql-codegen/client-preset": "4.4.0", + "@graphql-codegen/client-preset": "4.5.0", "@graphql-codegen/core": "4.0.2", "@graphql-codegen/flow": "2.3.6", "@graphql-codegen/flow-operations": "2.3.6", @@ -43,8 +43,8 @@ "@graphql-codegen/near-operation-file-preset": "2.5.0", "@graphql-codegen/schema-ast": "4.1.0", "@graphql-codegen/time": "5.0.1", - "@graphql-codegen/typed-document-node": "5.0.10", - "@graphql-codegen/typescript": "4.1.0", + "@graphql-codegen/typed-document-node": "5.0.11", + "@graphql-codegen/typescript": "4.1.1", "@graphql-codegen/typescript-apollo-angular": "3.5.6", "@graphql-codegen/typescript-apollo-client-helpers": "2.2.6", "@graphql-codegen/typescript-generic-sdk": "3.1.0", @@ -53,10 +53,10 @@ "@graphql-codegen/typescript-mongodb": "2.4.6", "@graphql-codegen/typescript-msw": "3.0.0", "@graphql-codegen/typescript-nhost": "0.0.2", - "@graphql-codegen/typescript-operations": "4.3.0", + "@graphql-codegen/typescript-operations": "4.3.1", "@graphql-codegen/typescript-react-apollo": "3.3.7", "@graphql-codegen/typescript-react-query": "4.1.0", - "@graphql-codegen/typescript-resolvers": "4.3.0", + "@graphql-codegen/typescript-resolvers": "4.4.0", "@graphql-codegen/typescript-rtk-query": "2.4.1", "@graphql-codegen/typescript-stencil-apollo": "2.3.6", "@graphql-codegen/typescript-type-graphql": "2.3.6",