Skip to content
IC Reactor

SuspenseInfiniteQueryConfig

Defined in: react/src/createSuspenseInfiniteQuery.ts:118

Configuration for createActorSuspenseInfiniteQuery. Extends InfiniteQueryObserverOptions to accept all React Query options at the create level.

Service = BaseActor

The actor interface type

Method extends FunctionName<Service> = FunctionName<Service>

The method name on the actor

Transform extends TransformKey = "candid"

The transformation key (identity, display, etc.)

TPageParam = unknown

The type of the page parameter

Selected = InfiniteData<SuspenseInfiniteQueryPageData<Service, Method, Transform>, TPageParam>

The type returned after select transformation

functionName: Method

Defined in: react/src/createSuspenseInfiniteQuery.ts:138

The method to call on the canister


optional callConfig?: CallConfig

Defined in: react/src/createSuspenseInfiniteQuery.ts:140

Call configuration for the actor method


optional queryKey?: readonly unknown[]

Defined in: react/src/createSuspenseInfiniteQuery.ts:142

Custom query key (optional, auto-generated if not provided)


getArgs: (pageParam) => ReactorArgs<Service, Method, Transform>

Defined in: react/src/createSuspenseInfiniteQuery.ts:144

Function to get args from page parameter

TPageParam

ReactorArgs<Service, Method, Transform>


optional getKeyArgs?: (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.

ReactorArgs<Service, Method, Transform>

unknown