Replies: 1 comment
-
OK, this is one way I've kinda achieved this:
Basically used the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use graphql-code-generator with both TypeScript GraphQL-Request and TypeScript Urql.
Both these plugiuns require types from the Typescript and TypeScript Operations plugins, but they seem to generate their own fragments.
This means that when I try to generate a single file like so:
I end up with two set of fragments that declared twice resulting in
Cannot redeclare block-scoped variable 'FooDocument'
.One solution might be to have the output from
typescript
andtypescript-operations
in one file (saygenerated/types.ts
) and have different separate files fortypescript-graphql-request
andtypescript-urql
that import what they need fromtypes.ts
, but I'm not sure how to achieve this.Has anyone done anything similar to the above?
Beta Was this translation helpful? Give feedback.
All reactions