graphql/utilities/typed-documents

Types

TypedQueryDocumentNode

Interface. Wrapper type that contains DocumentNode and types that can be deduced from it.

Type Parameters

NameConstraintDefaultDescription
TResponseDataobjectThe result data shape produced by executing this document.
TRequestVariablesobjectThe variable values shape accepted by this document.
interface TypedQueryDocumentNode<TResponseData = object, TRequestVariables = object> extends DocumentNode

Members

NameTypeDescription
definitionsreadonly ExecutableDefinitionNode[]Top-level executable and type-system definitions in this document.
__ensureTypesOfVariablesAndResultMatching?(variables: TRequestVariables): TResponseDataThis type is used to ensure that the variables you pass in to the query are assignable to Variables
and that the Result is assignable to whatever you pass your result to. The method is never actually
implemented, but the type is valid because we list it as optional