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

How to reference response type

Open Ionaru opened this issue 6 months ago • 2 comments

Using the output of the graphql-zeus --typedDocumentNode generator, how do I reference the response type of a query or mutation?

Using this query from the documentation:

const myMutation = typedGql('mutation')({
  cardById: [{ cardId: $('cardId', 'String!') }, { name: true }],
});

What helpers or types do I need to use to get the output {name: string} so I can use that in props, inputs and other parts of the code?

Pretty much a duplicate of https://github.com/graphql-editor/graphql-zeus/issues/204 but instead for the --typedDocumentNode output.

Ionaru avatar May 09 '25 17:05 Ionaru