Skip to content

API ReferenceSetup and configurationFunction

fetchAllCollectionPages()

function fetchAllCollectionPages<T, Params>(
fetchPage,
params,
options?
): Promise<CollectionPage<T>>;

Fetches a complete collection atomically.

If any page fails, this promise rejects and exposes no partial aggregate.

Type Parameters

Type Parameter
T
Params extends CollectionRequest

Parameters

ParameterTypeDescription
fetchPageCollectionPageFetcher<T, Params>Page reader that accepts execution controls separately.
paramsParamsCollection filters and initial cursor.
optionsReadExecutionOptionsCancellation controls shared by every page.

Returns

Promise<CollectionPage<T>>