Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 0 additions & 10 deletions .changeset/sixty-sheep-tease.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/persisted-documents-string-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"devDependencies": {
"@graphql-typed-document-node/core": "3.2.0",
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/cli": "6.1.0",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.3",
"@babel/preset-typescript": "7.27.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/persisted-documents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"devDependencies": {
"@graphql-typed-document-node/core": "3.2.0",
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/cli": "6.1.0",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.3",
"@babel/preset-typescript": "7.27.1"
Expand Down
10 changes: 5 additions & 5 deletions examples/programmatic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
},
"dependencies": {
"@graphql-codegen/core": "5.0.0",
"@graphql-codegen/plugin-helpers": "6.0.0",
"@graphql-codegen/typed-document-node": "6.1.2",
"@graphql-codegen/typescript": "5.0.4",
"@graphql-codegen/typescript-operations": "5.0.4",
"@graphql-codegen/typescript-resolvers": "5.1.2",
"@graphql-codegen/plugin-helpers": "6.1.0",
"@graphql-codegen/typed-document-node": "6.1.3",
"@graphql-codegen/typescript": "5.0.5",
"@graphql-codegen/typescript-operations": "5.0.5",
"@graphql-codegen/typescript-resolvers": "5.1.3",
"@graphql-tools/graphql-file-loader": "8.0.1",
"@graphql-tools/load": "8.1.0",
"@graphql-tools/schema": "10.0.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/apollo-client-defer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"graphql-yoga": "5.7.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@types/node": "^22.0.0",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.10",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/apollo-client-swc-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@graphql-codegen/client-preset-swc-plugin": "0.2.0",
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-react-swc": "^3.3.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/apollo-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-react": "^4.0.0",
"@types/node": "^22.0.0",
"@types/react": "^18.0.15",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/http-executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-react": "^4.0.0",
"@types/node": "^22.0.0",
"@types/react": "^18.0.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/nextjs-swr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"swr": "^2.0.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@graphql-codegen/schema-ast": "5.0.0",
"@graphql-codegen/client-preset-swc-plugin": "0.2.0",
"@types/node": "^22.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/tanstack-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-react": "^4.0.0",
"@types/node": "^22.0.0",
"@types/react": "^18.0.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.10",
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-react": "^4.0.0",
"typescript": "5.5.4",
"serve": "14.2.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@graphql-codegen/cli": "6.0.2"
"@graphql-codegen/cli": "6.1.0"
},
"dependencies": {
"@graphql-typed-document-node/core": "3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-graphql-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@graphql-codegen/cli": "6.0.2"
"@graphql-codegen/cli": "6.1.0"
},
"dependencies": {
"graphql": "16.9.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/typescript-resolvers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/typescript": "5.0.4",
"@graphql-codegen/typescript-resolvers": "5.1.2"
"@graphql-codegen/cli": "6.1.0",
"@graphql-codegen/typescript": "5.0.5",
"@graphql-codegen/typescript-resolvers": "5.1.3"
},
"dependencies": {
"graphql": "16.9.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/vite-react-cts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vite": "^6.0.0"
},
"devDependencies": {
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/cli": "6.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"cypress": "14.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/vite-react-mts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vite": "^6.0.0"
},
"devDependencies": {
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/cli": "6.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"cypress": "14.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/vite-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vite": "^6.0.0"
},
"devDependencies": {
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/cli": "6.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"cypress": "14.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/apollo-composable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"vue": "^3.2.37"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-vue": "^5.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"vue": "^3.2.45"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-vue": "^5.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/villus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"vue": "^3.2.37"
},
"devDependencies": {
"@graphql-codegen/cli": "^6.0.2",
"@graphql-codegen/cli": "^6.1.0",
"@vitejs/plugin-vue": "^5.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/yoga-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"devDependencies": {
"@graphql-typed-document-node/core": "3.2.0",
"@graphql-codegen/cli": "6.0.2",
"@graphql-codegen/cli": "6.1.0",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.3",
"@babel/preset-typescript": "7.27.1"
Expand Down
12 changes: 12 additions & 0 deletions packages/graphql-codegen-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @graphql-codegen/cli

## 6.1.0

### Minor Changes

- [#10510](https://github.com/dotansimha/graphql-code-generator/pull/10510) [`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670) Thanks [@nickmessing](https://github.com/nickmessing)! - add importExtension configuration option

### Patch Changes

- Updated dependencies [[`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670)]:
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]

## 6.0.2

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/graphql-codegen-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/cli",
"version": "6.0.2",
"version": "6.1.0",
"license": "MIT",
"bin": {
"gql-gen": "dist/cjs/bin.js",
Expand Down Expand Up @@ -43,9 +43,9 @@
"@babel/generator": "^7.18.13",
"@babel/template": "^7.18.10",
"@babel/types": "^7.18.13",
"@graphql-codegen/client-preset": "^5.1.2",
"@graphql-codegen/client-preset": "^5.2.0",
"@graphql-codegen/core": "^5.0.0",
"@graphql-codegen/plugin-helpers": "^6.0.0",
"@graphql-codegen/plugin-helpers": "^6.1.0",
"@graphql-tools/apollo-engine-loader": "^8.0.0",
"@graphql-tools/code-file-loader": "^8.0.0",
"@graphql-tools/git-loader": "^8.0.0",
Expand Down
15 changes: 15 additions & 0 deletions packages/plugins/other/visitor-plugin-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @graphql-codegen/visitor-plugin-common

## 6.2.0

### Minor Changes

- [#10510](https://github.com/dotansimha/graphql-code-generator/pull/10510) [`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670) Thanks [@nickmessing](https://github.com/nickmessing)! - add importExtension configuration option

### Patch Changes

- [#10512](https://github.com/dotansimha/graphql-code-generator/pull/10512) [`f821e8a`](https://github.com/dotansimha/graphql-code-generator/commit/f821e8ab9351f23a9f7e5d5e6fc69c8e8868cad8) Thanks [@realies](https://github.com/realies)! - fix: allow mappers to override root types (Query, Mutation, Subscription)

Previously, mappers configured for root types were ignored because root types were checked before mappers. This fix moves the mapper check before the root type check, allowing mappers to override `rootValueType` when configured.

- Updated dependencies [[`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670)]:
- @graphql-codegen/[email protected]

## 6.1.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/other/visitor-plugin-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/visitor-plugin-common",
"version": "6.1.2",
"version": "6.2.0",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"@graphql-tools/optimize": "^2.0.0",
"@graphql-codegen/plugin-helpers": "^6.0.0",
"@graphql-codegen/plugin-helpers": "^6.1.0",
"@graphql-tools/relay-operation-optimizer": "^7.0.0",
"@graphql-tools/utils": "^10.0.0",
"auto-bind": "~4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -971,15 +971,20 @@ export class BaseResolversVisitor<
const isScalar = this.config.scalars[typeName];
const hasDefaultMapper = !!this.config.defaultMapper?.type;

// Check for mappers first, even for root types, to allow overriding rootValueType
if (isMapped && this.config.mappers[typeName].type && !hasPlaceholder(this.config.mappers[typeName].type)) {
this.markMapperAsUsed(typeName);
prev[typeName] = applyWrapper(this.config.mappers[typeName].type);

return prev;
}

if (isRootType) {
prev[typeName] = applyWrapper(this.config.rootValueType.type);

return prev;
}
if (isMapped && this.config.mappers[typeName].type && !hasPlaceholder(this.config.mappers[typeName].type)) {
this.markMapperAsUsed(typeName);
prev[typeName] = applyWrapper(this.config.mappers[typeName].type);
} else if (isEnumType(schemaType) && this.config.enumValues[typeName]) {
if (isEnumType(schemaType) && this.config.enumValues[typeName]) {
const isExternalFile = !!this.config.enumValues[typeName].sourceFile;
prev[typeName] = isExternalFile
? this.convertName(this.config.enumValues[typeName].typeIdentifier, {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugins/typescript/document-nodes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @graphql-codegen/typescript-document-nodes

## 5.0.5

### Patch Changes

- Updated dependencies [[`f821e8a`](https://github.com/dotansimha/graphql-code-generator/commit/f821e8ab9351f23a9f7e5d5e6fc69c8e8868cad8), [`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670)]:
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]

## 5.0.4

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/typescript/document-nodes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/typescript-document-nodes",
"version": "5.0.4",
"version": "5.0.5",
"description": "GraphQL Code Generator plugin for generating TypeScript modules with embedded GraphQL document nodes",
"repository": {
"type": "git",
Expand All @@ -13,8 +13,8 @@
"test": "vitest --no-watch"
},
"dependencies": {
"@graphql-codegen/plugin-helpers": "^6.0.0",
"@graphql-codegen/visitor-plugin-common": "6.1.2",
"@graphql-codegen/plugin-helpers": "^6.1.0",
"@graphql-codegen/visitor-plugin-common": "6.2.0",
"auto-bind": "~4.0.0",
"tslib": "~2.6.0"
},
Expand Down
12 changes: 12 additions & 0 deletions packages/plugins/typescript/gql-tag-operations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @graphql-codegen/gql-tag-operations

## 5.1.0

### Minor Changes

- [#10510](https://github.com/dotansimha/graphql-code-generator/pull/10510) [`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670) Thanks [@nickmessing](https://github.com/nickmessing)! - add importExtension configuration option

### Patch Changes

- Updated dependencies [[`f821e8a`](https://github.com/dotansimha/graphql-code-generator/commit/f821e8ab9351f23a9f7e5d5e6fc69c8e8868cad8), [`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670)]:
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]

## 5.0.5

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/typescript/gql-tag-operations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/gql-tag-operations",
"version": "5.0.5",
"version": "5.1.0",
"description": "GraphQL Code Generator plugin for generating a typed gql tag function",
"repository": {
"type": "git",
Expand All @@ -17,8 +17,8 @@
},
"dependencies": {
"@graphql-tools/utils": "^10.0.0",
"@graphql-codegen/plugin-helpers": "^6.0.0",
"@graphql-codegen/visitor-plugin-common": "6.1.2",
"@graphql-codegen/plugin-helpers": "^6.1.0",
"@graphql-codegen/visitor-plugin-common": "6.2.0",
"auto-bind": "~4.0.0",
"tslib": "~2.6.0"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/plugins/typescript/operations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @graphql-codegen/typescript-operations

## 5.0.5

### Patch Changes

- Updated dependencies [[`f821e8a`](https://github.com/dotansimha/graphql-code-generator/commit/f821e8ab9351f23a9f7e5d5e6fc69c8e8868cad8), [`9e70bcb`](https://github.com/dotansimha/graphql-code-generator/commit/9e70bcbf5390e815a6844f1965b04056e5d8e670)]:
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]

## 5.0.4

### Patch Changes
Expand Down
Loading
Loading