GraphiQL API Documentation
    Preparing search index...

    Type Alias CreateTransportOptions

    type CreateTransportOptions = {
        enableIncrementalDelivery?: boolean;
        fetch?: typeof __type;
        headers?: Record<string, string>;
        method?: HttpMethod;
        subscriptionClient?: SubscriptionClient;
        supportedMethods?: HttpMethod[];
        url: string;
    }
    Index
    enableIncrementalDelivery?: boolean

    Use multipart/mixed incremental delivery for @defer/@stream. Defaults to true.

    fetch?: typeof __type

    Custom fetch implementation. Defaults to the global fetch.

    headers?: Record<string, string>

    Static request headers, merged with (and overridable by) per-request headers.

    method?: HttpMethod

    Override the HTTP method for queries. When omitted, choose the first available method in QUERY → POST → GET order. An unsupported override rejects execution instead of silently choosing another method. GET encodes queries and variables in the URL without a request body; QUERY and POST use a JSON body. Mutations always require POST. If OPTIONS discovery is unavailable, this method (or POST) is the fallback.

    subscriptionClient?: SubscriptionClient

    A pre-built subscription client satisfying the SubscriptionClient contract — a single iterate(request) method. graphql-ws's and graphql-sse's createClient() both satisfy it directly, as does any custom client exposing the same method.

    Construct the client yourself and pass it in; the toolkit does not build one for you. If a subscription is sent without this option configured, send() throws. See create-transport/README.md for recipes.

    supportedMethods?: HttpMethod[]

    Explicit supported methods. A nonempty list bypasses automatic discovery. When omitted, the first HTTP execution discovers methods using OPTIONS and Allow, repeating when effective request headers change. If discovery is unavailable, the initial method (normally POST) remains available.

    url: string

    URL for HTTP(S) requests. Required.