GraphiQL API Documentation
    Preparing search index...

    Type Alias TransportResponse

    A single execution result plus the wire-level metadata around it.

    status, statusText and headers are optional because not every transport has an HTTP response envelope: a WebSocket subscription emits results over a socket, and a user-supplied fetcher only ever returns the parsed result. Absent fields mean "this transport can't observe it", which is honest, rather than a fabricated 200.

    type TransportResponse = {
        body: ExecutionResult | ExecutionResult[];
        headers?: Record<string, string>;
        method?: HttpMethod;
        ok: boolean;
        size: { request?: number; response?: number };
        status?: number;
        statusText?: string;
        timing: { totalMs: number };
    }
    Index
    body: ExecutionResult | ExecutionResult[]

    A single execution result, or an array of incremental payloads for one multipart/mixed chunk (@defer/@stream).

    headers?: Record<string, string>
    method?: HttpMethod

    HTTP method used for this execution. Absent for non-HTTP transports.

    ok: boolean

    For an HTTP response, response.ok && !hasGraphQLErrors — a 401, 500, etc. is ok: false even if the body happens to parse as JSON with no errors. For transports with no HTTP envelope (a subscription event over a socket), this is purely !hasGraphQLErrors, since there is no status to consult.

    size: { request?: number; response?: number }
    status?: number
    statusText?: string
    timing: { totalMs: number }