InfiniteQueryConfig
Defined in: react/src/createInfiniteQuery.ts:105
Configuration for createActorInfiniteQuery. Extends InfiniteQueryObserverOptions to accept standard TanStack Query infinite-query options at the create level (e.g. refetchInterval, refetchOnMount, refetchOnWindowFocus, retry, gcTime, networkMode).
Extends
Section titled “Extends”Omit<InfiniteQueryObserverOptions<InfiniteQueryPageData<Service,Method,Transform>,InfiniteQueryError<Service,Method,Transform>,Selected,QueryKey,TPageParam>,"queryKey"|"queryFn">
Type Parameters
Section titled “Type Parameters”Service
Section titled “Service”Service = BaseActor
The actor interface type
Method
Section titled “Method”Method extends FunctionName<Service> = FunctionName<Service>
The method name on the actor
Transform
Section titled “Transform”Transform extends TransformKey = "candid"
The transformation key (identity, display, etc.)
TPageParam
Section titled “TPageParam”TPageParam = unknown
The type of the page parameter
Selected
Section titled “Selected”Selected = InfiniteData<InfiniteQueryPageData<Service, Method, Transform>, TPageParam>
The type returned after select transformation
Properties
Section titled “Properties”functionName
Section titled “functionName”functionName:
Method
Defined in: react/src/createInfiniteQuery.ts:125
The method to call on the canister
callConfig?
Section titled “callConfig?”
optionalcallConfig?:CallConfig
Defined in: react/src/createInfiniteQuery.ts:127
Call configuration for the actor method
queryKey?
Section titled “queryKey?”
optionalqueryKey?: readonlyunknown[]
Defined in: react/src/createInfiniteQuery.ts:129
Custom query key (optional, auto-generated if not provided)
initialPageParam
Section titled “initialPageParam”initialPageParam:
TPageParam
Defined in: react/src/createInfiniteQuery.ts:131
Initial page parameter
Overrides
Section titled “Overrides”Omit.initialPageParam
getArgs
Section titled “getArgs”getArgs: (
pageParam) =>ReactorArgs<Service,Method,Transform>
Defined in: react/src/createInfiniteQuery.ts:133
Function to get args from page parameter
Parameters
Section titled “Parameters”pageParam
Section titled “pageParam”TPageParam
Returns
Section titled “Returns”ReactorArgs<Service, Method, Transform>
getKeyArgs?
Section titled “getKeyArgs?”
optionalgetKeyArgs?: (args) =>unknown
Defined in: react/src/createInfiniteQuery.ts:143
Narrows what the cache key derives from the call arguments.
By default the key is scoped by getArgs(initialPageParam), so two
infinite queries on the same method with different arguments stay in
separate cache entries. Supply this when those args embed the cursor and
only part of them identifies the query — return the stable, serializable
portion (typically everything except the pagination field).
Parameters
Section titled “Parameters”ReactorArgs<Service, Method, Transform>
Returns
Section titled “Returns”unknown
getNextPageParam
Section titled “getNextPageParam”getNextPageParam: (
lastPage,allPages,lastPageParam,allPageParams) =>TPageParam|null|undefined
Defined in: react/src/createInfiniteQuery.ts:145
Function to determine next page parameter
Parameters
Section titled “Parameters”lastPage
Section titled “lastPage”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>
allPages
Section titled “allPages”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>[]
lastPageParam
Section titled “lastPageParam”TPageParam
allPageParams
Section titled “allPageParams”TPageParam[]
Returns
Section titled “Returns”TPageParam | null | undefined
Overrides
Section titled “Overrides”Omit.getNextPageParam
getPreviousPageParam?
Section titled “getPreviousPageParam?”
optionalgetPreviousPageParam?: (firstPage,allPages,firstPageParam,allPageParams) =>TPageParam|null|undefined
Defined in: react/src/createInfiniteQuery.ts:152
Function to determine previous page parameter (for bi-directional)
Parameters
Section titled “Parameters”firstPage
Section titled “firstPage”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>
allPages
Section titled “allPages”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>[]
firstPageParam
Section titled “firstPageParam”TPageParam
allPageParams
Section titled “allPageParams”TPageParam[]
Returns
Section titled “Returns”TPageParam | null | undefined
Overrides
Section titled “Overrides”Omit.getPreviousPageParam