Interface RequestOptions

Per-request options. All optional.

interface RequestOptions {
    signal?: AbortSignal;
    timeoutMs?: number;
    headers?: Readonly<Record<string, string>>;
    throwOnGraphQLError?: boolean;
    operationName?: string;
}

Properties

signal?: AbortSignal

Cancel the request. Composes with the client-wide signal if one is set.

timeoutMs?: number

Per-request timeout (ms). Overrides the client default. 0 disables.

headers?: Readonly<Record<string, string>>

Extra HTTP headers, merged on top of the auth/default headers.

throwOnGraphQLError?: boolean

If true (default), throw AppSyncGraphQLError when the server returns a non-empty errors array. Set to false to receive the raw { data, errors } response instead.

operationName?: string

Override the operation name sent to AppSync. Useful when a single document contains multiple operations.