SuspenseInfiniteQueryConfig
Defined in: react/src/createSuspenseInfiniteQuery.ts:118
Configuration for createActorSuspenseInfiniteQuery. Extends InfiniteQueryObserverOptions to accept all React Query options at the create level.
Extends
Section titled “Extends”Omit<InfiniteQueryObserverOptions<SuspenseInfiniteQueryPageData<Service,Method,Transform>,SuspenseInfiniteQueryError<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<SuspenseInfiniteQueryPageData<Service, Method, Transform>, TPageParam>
The type returned after select transformation
Properties
Section titled “Properties”functionName
Section titled “functionName”functionName:
Method
Defined in: react/src/createSuspenseInfiniteQuery.ts:138
The method to call on the canister
callConfig?
Section titled “callConfig?”
optionalcallConfig?:CallConfig
Defined in: react/src/createSuspenseInfiniteQuery.ts:140
Call configuration for the actor method
queryKey?
Section titled “queryKey?”
optionalqueryKey?: readonlyunknown[]
Defined in: react/src/createSuspenseInfiniteQuery.ts:142
Custom query key (optional, auto-generated if not provided)
getArgs
Section titled “getArgs”getArgs: (
pageParam) =>ReactorArgs<Service,Method,Transform>
Defined in: react/src/createSuspenseInfiniteQuery.ts:144
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/createSuspenseInfiniteQuery.ts:153
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.
Parameters
Section titled “Parameters”ReactorArgs<Service, Method, Transform>
Returns
Section titled “Returns”unknown