The typescript-urql-graphcache plugin causes a typescript error in the generated type file for the type GraphCacheOptimisticUpdaters if the schema has no mutations:
For typescript-urql-graphcache to generate a types file with no Typescript errors. If there are no mutations GraphCacheOptimisticUpdaters should be output as:
Issue workflow progress
Describe the bug
The
typescript-urql-graphcache
plugin causes a typescript error in the generated type file for the typeGraphCacheOptimisticUpdaters
if the schema has no mutations:To Reproduce Reproduction repo: https://github.com/matthew-petrie/graphql-code-generator-issue-sandbox-template
Steps to reproduce the behavior:
codegen.yml
config file:Expected behavior
For
typescript-urql-graphcache
to generate a types file with no Typescript errors. If there are no mutationsGraphCacheOptimisticUpdaters
should be output as:Environment:
@graphql-codegen/typescript-urql-graphcache
: ^2.2.13typescript
: ^4.7.2