Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5a3e362
[resolvers][federation] Fix mapper being incorrectly used as the base…
eddeee888 Dec 16, 2024
86fff01
[resolvers][federation] Add `__resolveReference` to applicable `Inter…
eddeee888 Jan 29, 2025
e4445a7
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Jan 29, 2025
e7bfc11
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Jan 29, 2025
ac81732
[resolvers] Ensure `__isTypeof` is only generated for implementing ty…
eddeee888 Feb 19, 2025
a769f82
[resolvers][federation] Bring Federation reference selection set to R…
eddeee888 Mar 5, 2025
a989c08
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Mar 5, 2025
bd19b81
Add missing changeset
eddeee888 Mar 5, 2025
b6fa058
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Mar 11, 2025
5f8014e
[resolvers][federation] Fix fields or types being wrong generated whe…
eddeee888 May 22, 2025
37bc1e5
Fix unit test
eddeee888 May 29, 2025
2a64a36
[resolvers][federation] Fix federation @requires type (#10366)
eddeee888 Aug 3, 2025
8efcbd7
[resolvers] Refactor to remove NameNode override and simplify federat…
eddeee888 Aug 3, 2025
4861cb3
CODEGEN-834 - [cli] Handle partial generation success (#10376)
eddeee888 Aug 3, 2025
6acf0df
Drop Node 18 support (#10392)
eddeee888 Aug 6, 2025
203062c
Drop graphql tools prisma loader (#10400)
eddeee888 Aug 12, 2025
0fd215d
Update yarn.lock
eddeee888 Aug 12, 2025
0fa3854
Update tsconfig for Node 20 (#10403)
eddeee888 Aug 13, 2025
edc2207
Bump packages (#10404)
eddeee888 Aug 14, 2025
dcba8de
[CLI] Bump deps for next major version (#10405)
eddeee888 Aug 16, 2025
4285bc4
Remove old resolutions & update lock file (#10407)
eddeee888 Aug 16, 2025
0222c55
Remove deprecated config options for next major version (#10408)
eddeee888 Aug 18, 2025
e8afa32
CODEGEN-840 - Handle empty object type better (#10409)
eddeee888 Aug 19, 2025
11d736e
Migrate to Vitest (#10410)
eddeee888 Aug 26, 2025
de5d40e
Bump ESM packages (#10415)
eddeee888 Aug 26, 2025
3706cd0
[typescript] Remove NameNode overrides (#10416)
eddeee888 Aug 27, 2025
2bb2a8f
Remove CI config used for dev
eddeee888 Aug 27, 2025
b2d6902
[resolvers] Report if an object can have `__isTypeOf` resolver to out…
eddeee888 Aug 28, 2025
85a76ab
Revert "Bump ESM packages (#10415)" (#10423)
eddeee888 Sep 4, 2025
45fad8e
Remove branch debug
eddeee888 Sep 5, 2025
3d1f9f7
Update test setup: test once by default, and add watch flag to watch
eddeee888 Sep 5, 2025
8874b85
Merge branch 'master' into federation-fixes
eddeee888 Sep 7, 2025
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
7 changes: 7 additions & 0 deletions .changeset/angry-lamps-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/plugin-helpers': major
---

BREAKING CHANGES: Do not generate \_\_isTypeOf for non-implementing types or non-union members
5 changes: 5 additions & 0 deletions .changeset/brave-days-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/plugin-helpers': major
---

Remove deprecated option `watchConfig`
5 changes: 5 additions & 0 deletions .changeset/brave-meals-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/cli': major
---

Drop @graphql-tools/prisma-loader
7 changes: 7 additions & 0 deletions .changeset/flat-ghosts-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/testing': major
---

Bump depdendencies major versions:

- nock v14
5 changes: 5 additions & 0 deletions .changeset/kind-donkeys-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/visitor-plugin-common': major
---

Remove deprecated config option `dedupeFragments`
6 changes: 6 additions & 0 deletions .changeset/large-glasses-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript': major
---

Remove NameNode override
8 changes: 8 additions & 0 deletions .changeset/long-dolphins-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/client-preset': major
---

BREAKING CHANGE: Use Record<PropertyKey, never> instead of {} for empty object type
10 changes: 10 additions & 0 deletions .changeset/loud-suits-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/plugin-helpers': major
---

Ensure Federation Interfaces have `__resolveReference` if they are resolvable entities

BREAKING CHANGES: Deprecate `onlyResolveTypeForInterfaces` because majority of use cases cannot implement resolvers in Interfaces.
BREAKING CHANGES: Deprecate `generateInternalResolversIfNeeded.__resolveReference` because types do not have `__resolveReference` if they are not Federation entities or are not resolvable. Users should not have to manually set this option. This option was put in to wait for this major version.
7 changes: 7 additions & 0 deletions .changeset/lovely-snails-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/plugin-helpers': major
---

BREAKING CHANGE: Improve Federation Entity's resolvers' parent param type: These types were using reference types inline. This makes it hard to handle mappers. The Parent type now all comes from ParentResolverTypes to make handling mappers and parent types simpler.
6 changes: 6 additions & 0 deletions .changeset/many-pets-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/plugin-helpers': minor
'@graphql-codegen/cli': major
---

Add `allowPartialOutputs` flag to partially write successful generation to files
7 changes: 7 additions & 0 deletions .changeset/small-fans-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/visitor-plugin-common': patch
'@graphql-codegen/typescript-resolvers': patch
'@graphql-codegen/plugin-helpers': patch
---

Update @requires type
5 changes: 5 additions & 0 deletions .changeset/smooth-pans-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/cli': major
---

Migrate inquirer to @inquirer/prompts
7 changes: 7 additions & 0 deletions .changeset/tall-wasps-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/visitor-plugin-common': major
---

Bump dependencies major versions:

- dependency-graph to v1
5 changes: 5 additions & 0 deletions .changeset/tame-lizards-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/client-preset': major
---

Stop passing through the deprecated config option `dedupeFragments`
9 changes: 9 additions & 0 deletions .changeset/tame-radios-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@graphql-codegen/cli': major
---

Bump dependencies major versions:

- cosmiconfig v9
- debounce v2
- jiti v2.3
11 changes: 11 additions & 0 deletions .changeset/thick-pianos-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/plugin-helpers': major
---

Fix `mappers` usage with Federation

`mappers` was previously used as `__resolveReference`'s first param (usually called "reference"). However, this is incorrect because `reference` interface comes directly from `@key` and `@requires` directives. This patch fixes the issue by creating a new `FederationTypes` type and use it as the base for federation entity types when being used to type entity references.

BREAKING CHANGES: No longer generate `UnwrappedObject` utility type, as this was used to support the wrong previously generated type.
6 changes: 6 additions & 0 deletions .changeset/tiny-avocados-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-codegen/visitor-plugin-common': minor
'@graphql-codegen/typescript-resolvers': minor
---

Report to meta user defined objects whether they have isTypeOf resolver
5 changes: 5 additions & 0 deletions .changeset/tough-apricots-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/cli': major
---

Bump listr2 to v9
7 changes: 7 additions & 0 deletions .changeset/twenty-planets-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-codegen/visitor-plugin-common': patch
'@graphql-codegen/typescript-resolvers': patch
'@graphql-codegen/plugin-helpers': patch
---

Fix fields or object types marked with @external being wrongly generated
22 changes: 22 additions & 0 deletions .changeset/wicked-timers-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@graphql-codegen/visitor-plugin-common': 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
'@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/typescript-operations': major
'@graphql-codegen/typed-document-node': major
'@graphql-codegen/typescript': major
'@graphql-codegen/testing': major
---

Drop Node 18 support
20 changes: 11 additions & 9 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-types': 'off',
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/*.test.ts', '**/*.spec.ts', '**/test/**/*.ts'] },
],
'import/no-extraneous-dependencies': 'error',

// todo: enable
'unicorn/filename-case': 'off',
Expand All @@ -36,12 +33,17 @@ module.exports = {
extends: '@theguild/eslint-config/react',
},
{
files: ['**/tests/**/*.{js,ts,tsx}', '**/graphql-codegen-testing/**/*.ts', '*.spec.ts'],
env: {
jest: true,
},
files: [
'*.spec.ts',
'**/tests/**/*.{js,ts,tsx,cjs}',
'**/graphql-codegen-testing/**/*.ts',
'**/vitest.config.ts',
'**/vitest.setup.ts',
'**/__mocks__/*',
],
rules: {
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
{
Expand All @@ -57,7 +59,7 @@ module.exports = {
},
},
{
files: ['scripts/*.{ts,js}', 'prettier.config.cjs', 'jest.config.js', 'jest.project.js'],
files: ['scripts/*.{ts,js}', 'prettier.config.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
- name: Prettier Check
run: yarn prettier:check
dev-tests-old:
Expand All @@ -45,8 +43,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
- name: Build
run: yarn build
env:
Expand All @@ -63,8 +59,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
- name: Build
run: yarn build
env:
Expand All @@ -87,8 +81,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
toolchain: 1.65.0
Expand Down Expand Up @@ -120,8 +112,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
- name: Build
run: yarn build
env:
Expand All @@ -138,10 +128,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # remove windows to speed up the tests
node_version: [16, 18, 20]
node_version: [20, 22, 24]
graphql_version: [15, 16]
include:
- node-version: 14
- node-version: 20
os: windows-latest
graphql_version: 16
steps:
Expand All @@ -155,13 +145,13 @@ jobs:
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
- name: Install Dependencies
run: yarn
- name: Cache Jest
- name: Cache Vitest
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
with:
path: .cache/jest
key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest-${{hashFiles('yarn.lock')}}
path: node_modules/.vite
key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest-${{hashFiles('yarn.lock')}}
restore-keys: |
${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest-
${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest-
- name: Build
run: yarn build
- name: Test
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
with:
npmTag: alpha
buildScript: build
nodeVersion: 18
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
Expand All @@ -29,7 +28,6 @@ jobs:
npmTag: rc
restoreDeletedChangesets: true
buildScript: build
nodeVersion: 18
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
releaseScript: release
nodeVersion: 18
secrets:
# githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/website-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:

- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18

- name: Build Packages
run: yarn build
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:

- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
nodeVersion: 18
packageManager: yarn

- uses: the-guild-org/shared-config/website-cf@main
name: build and deploy website
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Run open test file",
"type": "node",
"request": "launch",
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${relativeFile}"],
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/vitest", "--runInBand", "${relativeFile}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: process.versions.node.split('.')[0] } }],
'@babel/preset-typescript',
['@babel/preset-typescript', { allowDeclareFields: true }],
],
};
Loading
Loading