Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Migrates the GraphQL code generation from the deprecated gql-tag-operations-preset to the modern client-preset.

Changes Made

  • Package Update: Replaced @graphql-codegen/gql-tag-operations-preset with @graphql-codegen/client-preset
  • Configuration: Updated graphql.config.json to use preset: "client" with gqlTagName: "gql" for backward compatibility
  • Vite Configuration: Added alias in nuxt.config.ts to resolve @graphql-typed-document-node/core package

The client-preset is the recommended modern approach for GraphQL Code Generator and provides better TypeScript support and tree-shaking capabilities.

Testing

  • ✅ Build completes successfully
  • ✅ All unit tests pass (19 tests)
  • ✅ All integration tests pass (8 tests)
  • ✅ Linter passes with no errors
  • ✅ No security vulnerabilities detected by CodeQL

The migration maintains full backward compatibility with the existing codebase, with all GraphQL queries and mutations continuing to work without any code changes required.

Original prompt

Migrate to the client-preset for the graphql code gen. See for details: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@tobiasdiez
Copy link
Member

@copilot try again

@tobiasdiez
Copy link
Member

@copilot Try again

Copy link
Contributor Author

Copilot AI commented Nov 13, 2025

@copilot try again

Completed the migration to client-preset. The changes include:

  • Replaced gql-tag-operations-preset with @graphql-codegen/client-preset
  • Updated graphql.config.json with proper configuration
  • Added Vite alias to resolve @graphql-typed-document-node/core
  • All tests pass successfully

Commit: b8ba343

@copilot Try again

Migration to client-preset is complete and working. The build and all tests pass successfully.

Commit: b8ba343

Copilot AI changed the title [WIP] Migrate to client-preset for GraphQL code generation Migrate to client-preset for GraphQL code generation Nov 13, 2025
Copilot finished work on behalf of tobiasdiez November 13, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants