Skip to content

API ReferenceSetup and configurationInterface

AnvilCollectionQueryDefinition\<Value\>

Framework-neutral definition of a cursor-paged SDK collection read.

Extends

Extended by

Type Parameters

Type Parameter
Value

Properties

initialCursor

readonly initialCursor: string | null;

Cursor used for the first page.


queryFn

readonly queryFn: (options?) => Promise<CollectionPage<Value>>;

Performs the collection read described by the definition. It may return one page or an all-pages aggregate when the query supports fetchAll. Collection execution controls remain separate from request parameters and never enter the key.

Parameters

ParameterType
options?ReadExecutionOptions

Returns

Promise<CollectionPage<Value>>

Overrides

AnvilQueryDefinition.queryFn


queryKey

readonly queryKey: readonly unknown[];

Stable, normalized identity of the read and its SDK environment.

Inherited from

AnvilQueryDefinition.queryKey


queryPage

readonly queryPage: (cursor, options?) => Promise<CollectionPage<Value>>;

Fetches one atomic page; execution options never enter the key.

Parameters

ParameterType
cursorstring | null
options?ReadExecutionOptions

Returns

Promise<CollectionPage<Value>>