dotansimha / graphql-typed-document-node

An improved version of `DocumentNode` for seamless TypeScript integration for GraphQL.
https://the-guild.dev/blog/typed-document-node
MIT License
381 stars 19 forks source link

Export TypedDocumentString #163

Open jyasskin opened 1 month ago

jyasskin commented 1 month ago

Right now, if we use documentMode: 'string' the graphql-codegen tool will generate a definition for a TypedDocumentString type into our project. That makes it hard to name the same type from a library like https://github.com/octokit/graphql.js that wants to pass a string through instead of parsing it to a DocumentNode first. It's not obvious that this is the right home for that type, but it seems like the closest existing library.

jasonkuhrt commented 2 weeks ago

Graffle also needs this:

https://github.com/jasonkuhrt/graffle/blob/ade5a3e61ad536484968880d9218bdcdf4a66ac1/src/layers/0_functions/types.ts#L62-L65