Describe the bug
https://github.com/dotansimha/graphql-code-generator/releases/tag/%40graphql-codegen%2Ftypescript-react-apollo%402.0.0 says withComponent: false is the default behavior, but that forces the generated file to be tsx instead of ts.
Adding an explicit withComponent: false fixes the issue
To Reproduce
Steps to reproduce the behavior:
N/A
N/A
codegen.yml config file:config:
reactApolloVersion: 2
generates:
src/:
schema:
- schema.graphql
documents: src/**/*.graphql
preset: near-operation-file
presetConfig:
baseTypesPath: gqltypes.ts
plugins:
- typescript-operations
- typescript-react-apollo
Expected behavior
Environment:
@graphql-codegen/...: 1.17.7 plus v2 of react apollo Additional context
Thanks @SimenB ! I guess we need to validate extensions based on configuration provided. I will look into it :)
Flipping to only enforcing tsx if withComponent: true should fix it, I believe 馃檪
@SimenB can you please try @graphql-codegen/[email protected]?
Yeah, that alpha works great!
Fixed in @graphql-codegen/[email protected]