GraphiQL API Documentation
    Preparing search index...

    Interface CreateFetcherOptions

    Options for creating a simple, spec-compliant GraphiQL fetcher

    interface CreateFetcherOptions {
        enableIncrementalDelivery?: boolean;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        headers?: Record<string, string>;
        legacyClient?: any;
        legacyWsClient?: any;
        schemaFetcher?: Fetcher;
        subscriptionUrl?: string;
        url: string;
        wsClient?: Client;
        wsConnectionParams?:
            | Record<string, unknown>
            | (
                () => | Record<string, unknown>
                | Promise<Record<string, unknown> | undefined>
                | undefined
            );
    }
    Index

    Properties

    enableIncrementalDelivery?: boolean

    You can disable the usage of the fetch-multipart-graphql library entirely, defaulting to a simple fetch POST implementation.

    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    The fetch implementation, in case the user needs to override this for SSR or other purposes. this does not override the fetch-multipart-graphql default fetch behavior yet.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    headers?: Record<string, string>

    Request headers you can provide statically.

    If you enable the request headers editor and the user provides A header you set statically here, it will be overridden by their value.

    legacyClient?: any

    alias for legacyWsClient

    legacyWsClient?: any

    legacyWsClient implementation that matches subscriptions-transport-ws signature, whether via new SubscriptionsClient() itself or another client with a similar signature.

    schemaFetcher?: Fetcher

    An optional custom fetcher specifically for your schema. For most cases the url and headers property should have you covered.

    subscriptionUrl?: string

    url for websocket subscription requests

    url: string

    url for HTTP(S) requests. required!

    wsClient?: Client

    wsClient implementation that matches ws-graphql signature, whether via createClient() itself or another client.

    wsConnectionParams?:
        | Record<string, unknown>
        | (
            () => | Record<string, unknown>
            | Promise<Record<string, unknown> | undefined>
            | undefined
        )

    Websockets connection params used when you provide subscriptionUrl. graphql-ws ClientOptions.connectionParams