I want to prefice this by saying it might be a feature request, depending on how you look at it.
When using @graphql-codegen/cli with preset: ‘client’ and documentMode: ‘string’, the generated class TypedDocumentString is incompatible with the typescript options noImplicitOverride and exactOptionalPropertyChecks.
There is a workaround which is to disable those two rules, but since you cannot (as far as I can tell) create typescript rules specific to certain files, you have to disable the rules for the entire project.
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
I want to prefice this by saying it might be a feature request, depending on how you look at it.
When using
@graphql-codegen/cli
withpreset: ‘client’
anddocumentMode: ‘string’
, the generated classTypedDocumentString
is incompatible with the typescript optionsnoImplicitOverride
andexactOptionalPropertyChecks
.There is a workaround which is to disable those two rules, but since you cannot (as far as I can tell) create typescript rules specific to certain files, you have to disable the rules for the entire project.
Your Example Website or App
https://github.com/vruffer/graphql-strict-ts-error
Steps to Reproduce the Bug or Issue
yarn install
yarn codegen
yarn check
Expected behavior
I expected the generated typescript to be valid with the strictest settings possible
Screenshots or Videos
No response
Platform
graphql
version: 16.9.0@graphql-codegen/cli
version: 5.0.2Codegen Config File
Additional context
No response