Skip to main content
Version: v10.0.0

GraphqlDocumentTypes

Response and payload of a typed document - a TypedDocumentNode from graphql-codegen or a gql.tada document.

createRequest reads them from a typed document passed as endpoint by itself. Use this type when the document is passed with the document option, or to combine the document types with other request types.


Import
import { GraphqlDocumentTypes } from "@hyper-fetch/graphql"

Preview​

type GraphqlDocumentTypes<Document> = {
payload: ExtractEndpointPayloadType<Document>;
response: ExtractEndpointResponseType<Document>;
}

Structure​

GraphqlDocumentTypes
NameTypeDescription
payload
ExtractEndpointPayloadType<Document>
response
ExtractEndpointResponseType<Document>