OptionalconcurrencyMaximum number of page requests kept in flight at once while collecting
results. Pages are always returned in order regardless of completion
order, scheduling stops as soon as a fetched page reports
hasNextPage: false, and every existing guard (maxPages, perPage
clamping) still applies. Defaults to 3
(a small look-ahead window); pass 1 for strictly sequential fetches.
Values above 8 are clamped down to 8.
OptionaldiagnosticsControls how a throwing onPage callback with no onHookError observer
is reported: "warn" (default) emits a structured console.warn
record, "hook" requires the observer and never touches the console,
and "silent" suppresses the report entirely.
OptionalmaxHard cap on pages fetched, guarding against unbounded loops. Defaults
to 100, which means up to 100 round-trips (up to 5,000 items at the
default perPage); set an explicit value for cost-sensitive workloads.
OptionalonOptional observer for failures thrown by the PaginateOptions.onPage
callback. When provided, a throwing onPage callback is reported to
this handler with the hook name ("onPage") and the thrown error
instead of falling back to console.warn. Failures thrown by the
observer itself are swallowed so a broken logger cannot fail the
traversal.
OptionalonOptional per-page callback invoked once per page after all responses
have been collected, as the results are gathered into the returned
PaginateResult. This is a post-collection notification, not a
streaming hook: because the eager helpers collect every response before
returning, this callback does not reduce peak memory or release
collected items incrementally. For true streaming, early-exit, or
memory-bounded workflows, use paginatePages instead. It yields
each page as it arrives and lets the consumer break or return to
stop the traversal. The callback receives the page's pageInfo and
items array; the full PaginateResult is still returned for callers
that need the collected items. Errors thrown by the callback are
caught, reported through PaginateOptions.onHookError when
configured (falling back to console.warn), and swallowed, so a
failing observer cannot fail paginate or stop the traversal.
OptionalperItems requested per page. AniList caps this at 50; values above 50 are clamped down to 50. Defaults to 50.
OptionalsignalOptional AbortSignal to cancel the traversal. When aborted, all
in-flight look-ahead page requests are cancelled immediately so they
stop consuming rate-limit budget and bandwidth for payloads that will
be discarded. The signal is also forwarded to fetchPage calls so the
transport layer can abort the underlying HTTP request.
Optionalstart1-based page number to start from. Defaults to 1.
OptionaltransportPer-request transport settings (timeout, retry policy, lifecycle
hooks, pacing) merged over the instance-level options for each page
request of this traversal only. The traversal's bridged
AbortSignal always wins over any signal set here.
Options accepted by CustomRequest.customPage: the shared pagination traversal controls plus per-request transport settings for the page fetches.
This named type keeps the method, facade property, and generated operation reference on one shared signature instead of repeating an intersection.
See
https://docs.anilist.co/reference/object/page