graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

Feedback for “Configure GraphQL Code Generator”

Open jasonseminara opened this issue 1 year ago • 2 comments

I'm having a hard time generating TypedDocumentNodes in mesh. I have had lots of success with the graphql-codegen and the typed DocNodes are generated properly. I can see the document files being ingested at build time, but I dont know where they're going or what mesh is doing with them.

A string search reveals that my client query name is within a getter called rawSDL() but I have no idea how to use it.

jasonseminara avatar May 30 '24 17:05 jasonseminara

SDK -> https://the-guild.dev/graphql/mesh/docs/guides/mesh-sdk#generating-fully-type-safe-sdk Persisted Operations -> https://the-guild.dev/graphql/mesh/docs/guides/persisted-operations

These are two places Mesh uses documents provided by the user.

ardatan avatar May 30 '24 18:05 ardatan

Thank you for the quick response!

In the SDK example, my only option is to execute. This doesn't help me generate TypedDocumentNodes to feed to an Apollo Client query hook in React. I'm trying to replace/replicate (or even trigger) the client-preset we've been using in codegen (https://the-guild.dev/graphql/codegen/plugins/presets/preset-client)

Is this possible or do I need to manually trigger it in some custom extension?

jasonseminara avatar May 30 '24 18:05 jasonseminara