Skip to content

API ReferenceSetup and configurationInterface

ReadExecutionOptions

Execution controls for a read operation.

These controls are deliberately separate from request parameters: they do not describe protocol data and must never become part of a query cache key. Each atomic collection page enforces a 30-second SDK deadline across its transport, retries, backoff, and page enrichment. A fetch-all helper can span multiple page deadlines; the caller’s signal is shared across the whole traversal and stops later pages promptly.

Remarks

Cancellation rejects the caller’s promise with the caller’s abort reason at once, and stops the read itself at the next stage boundary: no further subgraph page, contract batch, or per-item enrichment request is issued after an abort. HTTP requests the SDK owns — subgraph queries and token metadata probes — receive the signal and are aborted in flight. A blockchain RPC already in flight is not interrupted and completes in the background, because viem’s readContract/multicall accept no per-request signal; its result is discarded.

Scalar query definitions deliberately expose a zero-argument queryFn: transports such as viem do not support per-call physical cancellation, so the SDK does not advertise execution controls that a scalar definition cannot honor. Collection definitions expose these options separately because the SDK owns their retry, paging, and enrichment stages.

Properties

signal?

optional signal?: AbortSignal;

Cancels the read and preserves the caller’s abort reason.