BaseQueryConfig
Defined in: react/src/types.ts:67
Base configuration for query wrappers (shared between regular and suspense).
Extends
Section titled “Extends”Omit<QueryObserverOptions<QueryFnData<Service,Method,Transform>,ReactorReturnErr<Service,Method,Transform>,Selected,QueryFnData<Service,Method,Transform>,QueryKey>,"queryFn"|"queryKey">
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.)
Selected
Section titled “Selected”Selected = QueryFnData<Service, Method, Transform>
The type returned after select transformation
Properties
Section titled “Properties”functionName
Section titled “functionName”functionName:
Method
Defined in: react/src/types.ts:83
The method to call on the canister
optionalargs?:ReactorArgs<Service,Method,Transform>
Defined in: react/src/types.ts:85
Arguments to pass to the method (if any)
queryKey?
Section titled “queryKey?”
optionalqueryKey?: readonlyunknown[]
Defined in: react/src/types.ts:87
The query key to use for this query
staleTime?
Section titled “staleTime?”
optionalstaleTime?:number
Defined in: react/src/types.ts:89
How long data stays fresh before refetching (default: 5 min)
Overrides
Section titled “Overrides”Omit.staleTime
select?
Section titled “select?”
optionalselect?: (data) =>Selected
Defined in: react/src/types.ts:91
Transform the raw result before returning
Parameters
Section titled “Parameters”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>
Returns
Section titled “Returns”Selected
Overrides
Section titled “Overrides”Omit.select