pages property
How many pages to fetch up front — used to warm a cache with several pages, or to refetch a fixed number of them. Default: unset, which fetches one page into an empty query and refetches as many pages as the query already holds.
Read only on the options handed to QueryClient.infiniteQuery (or
query). On an InfiniteQueryObserverOptionsBase it is always null:
an observer refetches as many pages as the query already holds, and a
fixed count there would throw away the pages the user had paged to on
the next refetch.
A count handed to QueryClient.infiniteQuery is kept on the shared
query's options, so it also shapes every later refetch that brings no
options of its own — invalidateQueries, refetchQueries — until an
observer's fetch installs its own options, which have no count.
TanStack Query keeps it the same way.
Implementation
final int? pages;