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"
Source
Package
Preview
type GraphqlDocumentTypes<Document> = {
payload: ExtractEndpointPayloadType<Document>;
response: ExtractEndpointResponseType<Document>;
}
Structure
GraphqlDocumentTypes
| Name | Type | Description |
|---|---|---|
| payload | | |
| response | |

