Interface AppSyncClientOptions

Constructor options for AppSyncClient.

interface AppSyncClientOptions {
    url: string;
    auth: AuthConfig;
    headers?: Readonly<Record<string, string>>;
    timeoutMs?: number;
    retry?: RetryOptions;
    fetch?: FetchLike;
    signal?: AbortSignal;
}

Properties

url: string

AppSync GraphQL endpoint, e.g. https://abc.appsync-api.us-east-1.amazonaws.com/graphql.

Authentication strategy. See AuthConfig.

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

Extra HTTP headers attached to every request.

timeoutMs?: number

Default request timeout in ms. Defaults to 30_000. 0 disables.

retry?: RetryOptions

Default retry policy.

fetch?: FetchLike

Override the global fetch. Mostly useful for tests / edge runtimes.

signal?: AbortSignal

Abort all in-flight requests.