From c61ab17daa793f37f30512cfee0abd443b3c61c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 8 Mar 2026 21:30:23 +0000 Subject: [PATCH 1/4] chore(deps): update actions/checkout digest to 34e1148 (#10628) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 12 ++++++------ .github/workflows/rust.yml | 2 +- .github/workflows/website-integrity.yml | 2 +- .github/workflows/website.yml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1584793fa41..b3e5894c3a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Master - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - name: Prettier Check @@ -40,7 +40,7 @@ jobs: - 'esm' steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - name: Build @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - name: Build @@ -112,7 +112,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - name: Build @@ -139,7 +139,7 @@ jobs: graphql_version: 16 steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main with: @@ -174,7 +174,7 @@ jobs: graphql_version: 16 steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4ee5745b0f5..81d2db25f6d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,7 +6,7 @@ jobs: publish-rust-swc-plugin: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 # Setup .npmrc file to publish to npm - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4 with: diff --git a/.github/workflows/website-integrity.yml b/.github/workflows/website-integrity.yml index fa3bf8a304b..10d22a9ab9a 100644 --- a/.github/workflows/website-integrity.yml +++ b/.github/workflows/website-integrity.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Fetch run: git fetch origin master diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 1d5400f2c2c..67cfc3d05c0 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -14,7 +14,7 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' steps: - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: fetch-depth: 0 From f5b38f92c7b8173ab3af1c996496b780aa3f910a Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Mon, 9 Mar 2026 10:20:26 +1100 Subject: [PATCH 2/4] Update migration guide with near-operation file (#10630) --- .../operations-and-client-preset-from-5-0.mdx | 69 +++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/website/src/pages/docs/migration/operations-and-client-preset-from-5-0.mdx b/website/src/pages/docs/migration/operations-and-client-preset-from-5-0.mdx index 96c9efbe7fb..44cfbba48a2 100644 --- a/website/src/pages/docs/migration/operations-and-client-preset-from-5-0.mdx +++ b/website/src/pages/docs/migration/operations-and-client-preset-from-5-0.mdx @@ -92,7 +92,7 @@ Some repos may have multiple Codegen projects, each generating types for operati const config: CodegenConfig = { // ... generates: { - 'src/shared/base-types.generated.ts': { + 'src/graphql/base-types.generated.ts': { plugins: ['typescript'] }, 'src/project-1/types.generated.ts': { @@ -100,7 +100,7 @@ const config: CodegenConfig = { preset: 'import-types', plugins: ['typescript-operations'], presetConfig: { - typesPath: '../shared/base-types.generated.ts' + typesPath: '../graphql/base-types.generated.ts' } }, 'src/project-2/types.generated.ts': { @@ -108,7 +108,7 @@ const config: CodegenConfig = { preset: 'import-types', plugins: ['typescript-operations'], presetConfig: { - typesPath: '../shared/base-types.generated.ts' + typesPath: '../graphql/base-types.generated.ts' } } } @@ -121,7 +121,7 @@ Now, it is possible to do this with just `typescript-operations`, as it supports const config: CodegenConfig = { // ... generates: { - 'src/shared/base-types.generated.ts': { + 'src/graphql/base-types.generated.ts': { documents: 'src/**/*.graphql.ts' // Parses all files with GraphQL documents to generate Enum and Input types that are used by every project plugins: ['typescript-operations'], config: { @@ -146,6 +146,67 @@ const config: CodegenConfig = { } ``` +#### near-operation-file-preset setups + +[near-operation-file-preset](https://the-guild.dev/graphql/codegen/plugins/presets/near-operation-file-preset) is commonly used to generate a file next to operation document a.k.a. near-operation file. + +Previously, shared types were always generated into a shared file using the `typescript` plugin, and reused in every near-operation file: + +```typescript filename="codegen.ts" +const config: CodegenConfig = { + // ... + generates: { + 'src/graphql/base-types.generated.ts': { + plugins: ['typescript'] + }, + 'src/': { + preset: 'near-operation-file', + presetConfig: { + baseTypesPath: './graphql/base-types.generated.ts' + }, + plugins: ['typescript-operations'] + } + } +} +``` + +Now, it is still possible to reuse shared types, but with the decoupling from the `typescript` plugin, we can just use `typescript-operations` for both base type and operation type generation. + +```typescript filename="codegen.ts" +const config: CodegenConfig = { + // ... + generates: { + 'src/graphql/base-types.generated.ts': { + plugins: ['typescript-operations'], + config: { + generateOperationTypes: false + } + }, + 'src/': { + preset: 'near-operation-file', + plugins: ['typescript-operations'], + config: { + importSchemaTypesFrom: 'src/graphql/base-types.generated.ts' + } + } + } +} +``` + +Alternatively, base types and operation types can all be generated into every near-operation file: + +```typescript filename="codegen.ts" +const config: CodegenConfig = { + // ... + generates: { + 'src/': { + preset: 'near-operation-file', + plugins: ['typescript-operations'] + } + } +} +``` + ## Breaking changes 1. Object types are no longer generated From 58812a9b7b7bc55ec68f29037a52eb48deae6e09 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 8 Mar 2026 23:22:51 +0000 Subject: [PATCH 3/4] chore(deps): update actions/setup-node digest to 49933ea (#10629) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 81d2db25f6d..7b47a537fd6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 # Setup .npmrc file to publish to npm - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: '18.x' registry-url: 'https://registry.npmjs.org' From 5eb3fb24e806d52f4d296eae7a7c8c3cabdf9875 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 01:05:16 +0000 Subject: [PATCH 4/4] chore(deps): update marocchino/sticky-pull-request-comment digest to 7737449 (#10631) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/website-integrity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website-integrity.yml b/.github/workflows/website-integrity.yml index 10d22a9ab9a..9cb9c1be49c 100644 --- a/.github/workflows/website-integrity.yml +++ b/.github/workflows/website-integrity.yml @@ -37,7 +37,7 @@ jobs: - name: Publish a message if: always() && contains(steps.diff_result.outputs.result, 'diff') - uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2 + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 with: message: | ```diff