Skip to content

Commit

Permalink
Use graphql-codegen with legacy mode
Browse files Browse the repository at this point in the history
Because we are using an older version react-query before it changed to TanStack, graphql-codegen references the new react-query package path, which does not exist in this project. By setting `legacyMode: true` we can instruct codegen to use the old react-query path as documented here:
https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-react-query#legacymode
  • Loading branch information
JacobArrow committed Jan 9, 2025
1 parent 5966224 commit c7b8776
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dbc-gateway.codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ generates:
func: "../graphql-fetcher#fetcher"
namingConvention: "./scripts/dbc-gateway.codegen.naming"
defaultScalarType: unknown
legacyMode: true
plugins:
- "typescript"
- "typescript-operations"
Expand Down

0 comments on commit c7b8776

Please sign in to comment.