A GraphQL DocumentNode with attached generics for its result data and variables.
Remarks
A GraphQL DocumentNode defines both the variables it accepts on request and the data
shape it delivers on a response in the GraphQL query language.
To bridge the gap to TypeScript, tools may be used to generate TypeScript types that define the shape
of data and variables ahead of time. These types are then attached to GraphQL documents using this
TypedDocumentNode type.
Using a DocumentNode that is typed like this will cause any urql API to type its input variables
and resulting data using the types provided.
A GraphQL
DocumentNode
with attached generics for its result data and variables.Remarks
A GraphQL DocumentNode defines both the variables it accepts on request and the
data
shape it delivers on a response in the GraphQL query language.To bridge the gap to TypeScript, tools may be used to generate TypeScript types that define the shape of
data
andvariables
ahead of time. These types are then attached to GraphQL documents using thisTypedDocumentNode
type.Using a
DocumentNode
that is typed like this will cause anyurql
API to type its inputvariables
and resultingdata
using the types provided.See
https://github.com/dotansimha/graphql-typed-document-node for more information.