piglovesyou/graphql-let

Not compatible with typescript-urql-graphcache

villesau opened this issue · 0 comments

typescript-urql-graphcache is a bit similar to typescript plugin: It cannot be generated on per-file basis as it generates single type from the schema it self. This means that if I want full type safety for my graph-cache, I cannot rely on graphql-let only and I still need to manually invoke graphql-codegen. It might be related to this: https://github.com/piglovesyou/graphql-let#no-generates but all the links are broken.

Is there a way to inject more plugins that generates types to __types__.tsx ?

Source of the typescript-urql-graphcache: https://github.com/dotansimha/graphql-code-generator/tree/master/packages/plugins/typescript/urql-graphcache

An example config with graphql-codegen would be something like this:

schema: schema.graphql
documents:
  - '**/*.graphql'
generates:
  src/graphql/types.generated.ts:
    plugins:
      - typescript
      - typescript-urql-graphcache