MCPcopy Create free account
hub / github.com/TanStack/query / hasNextPage

Function hasNextPage

packages/query-core/src/infiniteQueryBehavior.ts:159–165  ·  view source on GitHub ↗
(
  options: InfiniteQueryPageParamsOptions<any, any>,
  data?: InfiniteData<unknown>,
)

Source from the content-addressed store, hash-verified

157 * Checks if there is a next page.
158 */
159export function hasNextPage(
160 options: InfiniteQueryPageParamsOptions<any, any>,
161 data?: InfiniteData<unknown>,
162): boolean {
163 if (!data) return false
164 return getNextPageParam(options, data) != null
165}
166
167/**
168 * Checks if there is a previous page.

Callers 1

createResultMethod · 0.90

Calls 1

getNextPageParamFunction · 0.85

Tested by

no test coverage detected