ExtractEndpointResponseType
Response type an endpoint is decorated with through
__apiType
, like a
TypedDocumentNode
.
createRequest
uses it when its generics do not declare the
response
.
undefined
without the decoration.
The decoration is meant for document endpoints. On a string endpoint it hides the url params from the types.
Import
import { ExtractEndpointResponseType } from "@hyper-fetch/core"
Source
Package
Preview
type ExtractEndpointResponseType<Endpoint> = ExtractEndpointApiType<Endpoint> extends (payload: any) => infer Response ? Response : undefined;

