Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
72ab8a1
Add dummy commit to create branch
eddeee888 Nov 7, 2025
df51ccc
Ensure CI runs
eddeee888 Nov 15, 2025
5c5ba93
[typescript-operations] Generate `Exact` into target file (#10504)
eddeee888 Nov 15, 2025
fd7374e
[typescript-operations] Remove inputmaybe and scalars (#10509)
ikusakov2 Nov 24, 2025
8553b62
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Nov 24, 2025
f561b78
[typescript-operations] Extract convertSchemaEnumToDeclarationBlockSt…
eddeee888 Nov 25, 2025
7352cf2
[typescript-operations] Generate enums referenced in operation Variab…
eddeee888 Nov 25, 2025
92a0a56
[typescript-operations] Add missing enum tests & fix enum generating …
eddeee888 Dec 3, 2025
56c2be5
Add generatesOperationTypes config option to generate shared types on…
eddeee888 Dec 4, 2025
7245155
[typescript-operations] Add importSchemaTypesFrom to import user-defi…
eddeee888 Dec 8, 2025
843b062
[typescript-operations][client-preset] Integrate new typescript-opera…
eddeee888 Dec 13, 2025
12a81ca
[typescript-operations] No optional Result fields, unless deferred or…
eddeee888 Dec 17, 2025
3458502
Generate input types and output enums into target file (#10527)
ikusakov2 Dec 24, 2025
2787f41
Remove placeholder and test release 🤞
eddeee888 Dec 24, 2025
daab272
Test snapshot release
eddeee888 Dec 24, 2025
ed7c2fc
[typescript-operations] Fix __typename optionality and nullability (#…
eddeee888 Dec 30, 2025
4ce7cde
[typescript-operations] Clean up selection set processor that depends…
eddeee888 Jan 1, 2026
c062fd8
Adjust config inheritance to reflect usage and type-hint better (#10560)
eddeee888 Jan 6, 2026
6055f6b
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Jan 6, 2026
a02b858
Fix issues after rebasing (#10563)
eddeee888 Jan 7, 2026
8e4eab8
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Jan 7, 2026
7f44749
Remove unused utility types and functions (#10564)
eddeee888 Jan 7, 2026
50bee5e
Add config extract all fields to types field names only (same as apol…
ikusakov2 Jan 11, 2026
a1a5c43
Only generate `Exact` utility type if documents have operations (#10571)
eddeee888 Jan 13, 2026
51e3f11
Make `unknown` instead of `any` the default scalar type (#10566)
eddeee888 Jan 15, 2026
2efb931
Decouple `typescript-operations` plugin from `typescript` plugin (#10…
eddeee888 Jan 15, 2026
b09eb0f
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Jan 15, 2026
fcff920
Add `inputMaybeValue` to allow changing Variables and Input nullable …
eddeee888 Jan 15, 2026
859833a
[typescript-operations] Handle printing "Maybe" types consistently wh…
eddeee888 Jan 18, 2026
cbbbc23
[typescript-operations] Fix Input generation when using `importSchema…
eddeee888 Jan 18, 2026
b43eb8b
Bugfix: enums from external fragments were not generated along with o…
ikusakov2 Jan 19, 2026
0d3cb0c
Various test, FIXMEs, config fixes (#10577)
eddeee888 Jan 20, 2026
55fcdab
[typescript-operations] Cut down `avoidOptionals` to only support `ob…
eddeee888 Jan 21, 2026
e9c5b9e
[typescript-operations] Rename `avoidOptionals.object` to `avoidOptio…
eddeee888 Jan 22, 2026
75fa4b4
[typescript-operations] Fix external custom scalars not getting impor…
eddeee888 Jan 25, 2026
5c4c042
Improve comments, remove unused prop (#10589)
ikusakov2 Feb 16, 2026
65b13be
Remove support for directiveArgumentAndInputFieldMappings (#10596)
eddeee888 Feb 18, 2026
34f6926
[CLI] Set `noSilentErrors: true` by default (#10597)
eddeee888 Feb 21, 2026
ea0bed5
Change generatesOperationTypes to generateOperationTypes for consiste…
eddeee888 Feb 24, 2026
a8b3176
[typescript-operations] Set `namespacedImportName` default value when…
eddeee888 Feb 24, 2026
34b67bd
[typescript-operations] Change default input ID scalar type (#10604)
eddeee888 Feb 24, 2026
551e53b
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Feb 25, 2026
521f474
Fix lint issue
eddeee888 Feb 25, 2026
a2f8791
Fix unit tests (#10606)
eddeee888 Feb 26, 2026
4d5e240
[client-preset] Update client preset doc and clean up deps (#10608)
eddeee888 Mar 3, 2026
1674416
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Mar 3, 2026
9a75add
[client-preset] Fix docs for upcoming major release (#10609)
eddeee888 Mar 3, 2026
3c81692
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Mar 8, 2026
9e8c8cc
Bring in latest near-operation-file preset (#10621)
eddeee888 Mar 8, 2026
55dbd8b
Master next fix native ast detection (#10637)
eddeee888 Mar 11, 2026
94cae7b
Rename function from collectUsedInputTypes to collectUsedSchemaTypesT…
eddeee888 Mar 12, 2026
81c5e9b
[typescript-operations] Add warning for internal utility types (#10643)
eddeee888 Mar 12, 2026
0519f48
[typescript-operations] Fix `@skip` and `@include` not applying condi…
eddeee888 Mar 16, 2026
f27de9e
[typescript-operations] Fix @skip and @include not applying condition…
eddeee888 Mar 18, 2026
3a834f2
Add test case (#10647)
eddeee888 Mar 19, 2026
393677f
[Major version release] Drop Node 20 tests for normal runs (#10648)
eddeee888 Mar 19, 2026
31bb773
Update package deps (#10650)
eddeee888 Mar 22, 2026
0e17bca
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Mar 22, 2026
90c8c2a
Bump inquirer and improve related tests (#10651)
eddeee888 Mar 22, 2026
184ac19
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Mar 22, 2026
57ca91e
Add ESM changeset
eddeee888 Mar 22, 2026
c896d84
[client-preset] Make persisted docs default hashing algorithm sha256,…
eddeee888 Mar 24, 2026
c564942
[typescript-operations] Add `declarationKind` support (#10654)
eddeee888 Mar 27, 2026
5894f30
[typesceript-operations] Refactor operations avoidOptionals and decla…
eddeee888 Mar 27, 2026
3f7c63e
[typescript-operations] Fix enumValues not considering namingConventi…
eddeee888 Mar 30, 2026
7aed107
[typescript][typescript-resolvers] Fix enumValues not considering nam…
eddeee888 Mar 31, 2026
6a2738b
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Apr 13, 2026
61e21f4
Cleanup after rebase
eddeee888 Apr 13, 2026
eb41159
feat(cli): use `ESM` by default (#10705)
ardatan Apr 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/@graphql-codegen_cli-10496-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@graphql-codegen/cli": patch
---
dependencies updates:
- Updated dependency [`@inquirer/prompts@^8.3.2` ↗︎](https://www.npmjs.com/package/@inquirer/prompts/v/8.3.2) (from `^7.8.2`, in `dependencies`)
- Updated dependency [`chalk@^5.6.0` ↗︎](https://www.npmjs.com/package/chalk/v/5.6.0) (from `^4.1.0`, in `dependencies`)
- Updated dependency [`debounce@^3.0.0` ↗︎](https://www.npmjs.com/package/debounce/v/3.0.0) (from `^2.0.0`, in `dependencies`)
- Updated dependency [`detect-indent@^7.0.0` ↗︎](https://www.npmjs.com/package/detect-indent/v/7.0.0) (from `^6.0.0`, in `dependencies`)
- Updated dependency [`listr2@^10.2.1` ↗︎](https://www.npmjs.com/package/listr2/v/10.2.1) (from `^9.0.0`, in `dependencies`)
- Updated dependency [`log-symbols@^7.0.0` ↗︎](https://www.npmjs.com/package/log-symbols/v/7.0.0) (from `^4.0.0`, in `dependencies`)
- Updated dependency [`ts-log@^3.0.0` ↗︎](https://www.npmjs.com/package/ts-log/v/3.0.0) (from `^2.2.3`, in `dependencies`)
- Updated dependency [`yargs@^18.0.0` ↗︎](https://www.npmjs.com/package/yargs/v/18.0.0) (from `^17.0.0`, in `dependencies`)
11 changes: 11 additions & 0 deletions .changeset/@graphql-codegen_cli-10650-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@graphql-codegen/cli": patch
---
dependencies updates:
- Updated dependency [`chalk@^5.6.0` ↗︎](https://www.npmjs.com/package/chalk/v/5.6.0) (from `^4.1.0`, in `dependencies`)
- Updated dependency [`debounce@^3.0.0` ↗︎](https://www.npmjs.com/package/debounce/v/3.0.0) (from `^2.0.0`, in `dependencies`)
- Updated dependency [`detect-indent@^7.0.0` ↗︎](https://www.npmjs.com/package/detect-indent/v/7.0.0) (from `^6.0.0`, in `dependencies`)
- Updated dependency [`listr2@^10.2.1` ↗︎](https://www.npmjs.com/package/listr2/v/10.2.1) (from `^9.0.0`, in `dependencies`)
- Updated dependency [`log-symbols@^7.0.0` ↗︎](https://www.npmjs.com/package/log-symbols/v/7.0.0) (from `^4.0.0`, in `dependencies`)
- Updated dependency [`ts-log@^3.0.0` ↗︎](https://www.npmjs.com/package/ts-log/v/3.0.0) (from `^2.2.3`, in `dependencies`)
- Updated dependency [`yargs@^18.0.0` ↗︎](https://www.npmjs.com/package/yargs/v/18.0.0) (from `^17.0.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphql-codegen_cli-10651-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/cli": patch
---
dependencies updates:
- Updated dependency [`@inquirer/prompts@^8.3.2` ↗︎](https://www.npmjs.com/package/@inquirer/prompts/v/8.3.2) (from `^7.8.2`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/client-preset": patch
---
dependencies updates:
- Removed dependency [`@graphql-codegen/typescript@^5.0.8` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript/v/5.0.8) (from `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/gql-tag-operations": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/gql-tag-operations": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/graphql-modules-preset": patch
---
dependencies updates:
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/graphql-modules-preset": patch
---
dependencies updates:
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/plugin-helpers": patch
---
dependencies updates:
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/plugin-helpers": patch
---
dependencies updates:
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-codegen/typed-document-node": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-codegen/typed-document-node": patch
---
dependencies updates:
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
6 changes: 6 additions & 0 deletions .changeset/@graphql-codegen_typescript-10496-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-codegen/typescript": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
- Updated dependency [`tslib@~2.6.0` ↗︎](https://www.npmjs.com/package/tslib/v/2.6.0) (from `^2.8.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphql-codegen_typescript-10650-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-document-nodes": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-document-nodes": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@graphql-codegen/typescript-operations": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
- Added dependency [`@graphql-codegen/schema-ast@^5.0.1` ↗︎](https://www.npmjs.com/package/@graphql-codegen/schema-ast/v/5.0.1) (to `dependencies`)
- Removed dependency [`@graphql-codegen/typescript@^5.0.10` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript/v/5.0.10) (from `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-operations": patch
---
dependencies updates:
- Added dependency [`@graphql-codegen/schema-ast@^5.0.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/schema-ast/v/5.0.0) (to `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-operations": patch
---
dependencies updates:
- Removed dependency [`@graphql-codegen/typescript@^5.0.7` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript/v/5.0.7) (from `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-operations": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-resolvers": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/typescript-resolvers": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-codegen/visitor-plugin-common": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-codegen/visitor-plugin-common": patch
---
dependencies updates:
- Updated dependency [`auto-bind@^5.0.0` ↗︎](https://www.npmjs.com/package/auto-bind/v/5.0.0) (from `~4.0.0`, in `dependencies`)
- Updated dependency [`change-case-all@^2.1.0` ↗︎](https://www.npmjs.com/package/change-case-all/v/2.1.0) (from `1.0.15`, in `dependencies`)
11 changes: 11 additions & 0 deletions .changeset/beige-pets-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@graphql-codegen/visitor-plugin-common': minor
'@graphql-codegen/typescript-operations': minor
---

Add support for declarationKind for typescript-operations

- Input: can only be `type` or `interface`
- Variables: no support. It must always be `type` because it's an alias e.g. `Variables = Exact<{ something: type }>`
- Result: can only be `type` or `interface`
- Note: when `extractAllFieldsToTypes:true` or `extractAllFieldsToTypesCompact:true`, Results are used as type alias, so they are forced to be `type`. There is a console warning for users.
6 changes: 6 additions & 0 deletions .changeset/big-taxes-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/visitor-plugin-common': patch
'@graphql-codegen/typescript-operations': patch
---

Improve `namespacedImportName` usability by setting a default when `importSchemaTypesFrom` is set
11 changes: 11 additions & 0 deletions .changeset/breezy-games-enter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/client-preset': major
---

Fix nullable field optionality in operations

Previously, a nullable Result field is generated as optional (marked by `?` TypeScript modifier) by default. This is not correct, because generally at runtime such field can only be `null`, and not `undefined` (both missing from the object OR `undefined`). The only exceptions are when fields are deferred (using `@defer` directive) or marked as conditional (using `@skip` or `@include`).

Now, a nullable Result field cannot be optional unless the exceptions are met. This also limits `avoidOptionals` to only target Variables input, since some users may want to force explicit `null` when providing operation variables.
27 changes: 27 additions & 0 deletions .changeset/brown-things-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript': major
'@graphql-codegen/typescript-resolvers': major
---

BREAKING CHANGE: visitors' config option are moved based on their use case

- addTypename/skipTypename: is only a types-visitor concern. This is moved to types-visitor from base-visitor
- nonOptionalTypename: is a documents-visitor and types-visitor concern. Moved from base-visitor there
- extractAllFieldsToTypes: is a documents-visitor concern. Moved from base-visitor there
- enumPrefix and enumSuffix: need to be in base-visitor as all 3 types of visitors need this to correctly sync the enum type names. This is moved to base visitor
- ignoreEnumValuesFromSchema: is a documents-visitor and types-visitor concern. Moved from base-visitor there.
- globalNamespace: is a documents-visitor concern. Moved from base-visitor there

Refactors

- documents-visitor no longer extends types-visitor _option types_ as they have two distinct usages now. The types now extend base-visitor types. This is now consistent with documents-visitor extending base-visitor
- Classes now handle config parsing and types at the same level e.g. if typescript-operations plugin parses configOne, then the types for configOne must be in that class, rather than in base-documents-visitor

Note: These visitors are rolled up into one type for simplicity

- base-visitor: includes `base-visitor`
- documents-visitor: includes `base-documents-visitor` and `typescript-operations` visitor
- types-visitor: includes `base-types-visitor` and `typescript` visitor
- resolvers-visitor: includes `base-resolvers-visitor` and `typescript-resolvers` visitor
6 changes: 6 additions & 0 deletions .changeset/clever-loops-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/visitor-plugin-common': minor
'@graphql-codegen/typescript-operations': minor
---

Add importSchemaTypesFrom support
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ignore": [
"website",
"example-*",
"dev-test*",
"@graphql-codegen/client-preset-swc-plugin",
"example-apollo-client-swc-plugin",
"example-react-nextjs-swr"
Expand Down
5 changes: 5 additions & 0 deletions .changeset/curly-trees-lead.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/typescript-operations': major
---

BREAKING CHANGE: typescript-operations plugin now generates enum if it is used in operation.
6 changes: 6 additions & 0 deletions .changeset/every-queens-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/client-preset': major
---

Conditionally generate input types and output enums into target file
9 changes: 9 additions & 0 deletions .changeset/every-rooms-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/client-preset': major
---

BREAKING CHANGE: make `unknown` instead of `any` the default custom scalar type
5 changes: 5 additions & 0 deletions .changeset/five-cases-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/visitor-plugin-common': minor
---

Adding config option extractAllFieldsToTypesCompact, which renders nested types names with field names only (without types)
5 changes: 5 additions & 0 deletions .changeset/flat-paths-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/typescript-operations': patch
---

Add internal utility type warning to deter usage
6 changes: 6 additions & 0 deletions .changeset/free-fans-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/visitor-plugin-common': patch
'@graphql-codegen/typescript-operations': patch
---

Add `printTypeScriptMaybeType` to handle printing TS types, as there are special cases like `any` and `unknown`
5 changes: 5 additions & 0 deletions .changeset/fuzzy-poets-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/typescript-operations': patch
---

Re-implement inputMaybeValue
21 changes: 21 additions & 0 deletions .changeset/hot-toys-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'@graphql-codegen/typed-document-node': major
'@graphql-codegen/gql-tag-operations': major
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-document-nodes': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/graphql-modules-preset': major
'@graphql-codegen/plugin-helpers': major
'@graphql-codegen/cli': major
'@graphql-codegen/client-preset': major
---

BREAKING CHANGE: Update deps to latest, some only support ESM

Node 20 support is dropped in this release.
Node 22 comes with `require()` support for ESM, which means it's easier to integrate ES modules into applications. Therefore, it is safe to start using ESM-only packages.

If you are a user, please upgrade to Node 22.
If you are a lib maintainer and see ESM vs CJS issues when running Jest tests, try using Vitest.
22 changes: 22 additions & 0 deletions .changeset/huge-hounds-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/cli': major
'@graphql-codegen/client-preset': major
'@graphql-codegen/core': major
'@graphql-codegen/add': major
'@graphql-codegen/fragment-matcher': major
'@graphql-codegen/introspection': major
'@graphql-codegen/schema-ast': major
'@graphql-codegen/time': major
'@graphql-codegen/typescript-document-nodes': major
'@graphql-codegen/gql-tag-operations': major
'@graphql-codegen/typed-document-node': major
'@graphql-codegen/graphql-modules-preset': major
'@graphql-codegen/testing': major
'@graphql-codegen/plugin-helpers': major
---

BREAKING CHANGE: Drop Node 20 support
9 changes: 9 additions & 0 deletions .changeset/khaki-clubs-say.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@graphql-codegen/typescript-operations': patch
---

Only generate `Exact` utility type at the top if it is used

`Exact` utility is only used to wrap variables types for operations (queries, mutations and subscriptions) if they exist in the document. `Exact` is never used when there are _only_ fragments.

This is important to conditionally generate as users may use very strict tsconfig that will fail compiling if there are unused types.
9 changes: 9 additions & 0 deletions .changeset/khaki-spies-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@graphql-codegen/typescript-operations': major
---

BREAKING CHANGE: Decouple `typescript-operations` plugin from `typescript` plugin

Previously, `TypeScriptOperationVariablesToObject` from `typescript-operations` was extending from `typescript` plugin. This made it (1) very hard to read, as we need to jump from base class <-> typescript class <-> typescript-operations class to understand the flow and (2) very hard to evolve the two independently (which is the point of this work).

Since there's not much shared logic anyways, it's simpler to extend the `typescript-operations` class from the base class directly.
6 changes: 6 additions & 0 deletions .changeset/khaki-turtles-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript': minor
---

The `typescript-operations` plugin no longer generates InputMaybe and Scalars types; it now uses native Typescript types instead.
7 changes: 7 additions & 0 deletions .changeset/lovely-sloths-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript': major
'@graphql-codegen/client-preset': major
---

BREAKING CHANGE: `typescript` plugin no longer generates `Exact` utility type. Instead, `typescript-operations` generates said utility type for every file it creates. This is because it is used _only_ for `Variables`, so we only need to generate it once for every generated operation file.
9 changes: 9 additions & 0 deletions .changeset/new-foxes-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@graphql-codegen/visitor-plugin-common': patch
---

Fix isNativeNamedType to handle types from remote schemas correctly

Previously, we assumed that if a name type does note have `astNode`, it is a native named type because it is not declared in user's schema.

However, this is a wrong assumption because remote schemas do not have `astNode`. This causes all user declared types are wrongly recognised as native types e.g. Input
5 changes: 5 additions & 0 deletions .changeset/proud-cougars-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/visitor-plugin-common': major
---

BREAKING CHANGE: `@graphql-codegen/visitor-plugin-common`'s `base-types-visitor` no longer has `getNodeComment` or `buildEnumValuesBlock` method.
5 changes: 5 additions & 0 deletions .changeset/proud-dingos-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/typescript-operations': patch
---

Fix external custom scalars not getting imported
6 changes: 6 additions & 0 deletions .changeset/proud-jobs-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/visitor-plugin-common': minor
'@graphql-codegen/typescript-operations': minor
---

Add generateOperationTypes to typescript-operations to allow omitting operation types such as Variables, Query/Mutation/Subscription selection set, and Fragment types
Loading
Loading