You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{request}from'graphql-request'import{gql}from'./gql'// This is a TypedDocumentStringconsthelloQuery=gql(` query hello { hello }`)awaitrequest(endpoint,helloQuery)// typescript error 🚨
Perceived Problem
The most popular codegen for GraphQL (graphql-codegen) has two output modes:
TypedDocumentNode
where the output are JSON representation of the graphql queries.TypedDocumentString
where the output is a string representation of the graphql queries.When using string representation the output is usually smaller and easy to compare than it's object representation.
See: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#documentmode
Currently graphql-request doesn't support
TypedDocumentString
Example:
Ideas / Proposed Solution(s)
Support
TypedDocumentString
The text was updated successfully, but these errors were encountered: