Interface: TRPCFetchQueryOptions<TOutput, TError>
Defined in: packages/react-query/src/internals/context.tsx:49
Extends​
DistributiveOmit<FetchQueryOptions<TOutput,TError>,"queryKey">.TRPCUseUtilsOptions
Type Parameters​
| Type Parameter |
|---|
TOutput |
TError |
Properties​
_defaulted?​
optional_defaulted:boolean
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:620
Inherited from​
DistributiveOmit._defaulted
behavior?​
optionalbehavior:QueryBehavior<TOutput,TError,TOutput, readonlyunknown[]>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:613
Inherited from​
DistributiveOmit.behavior
gcTime?​
optionalgcTime:number
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:605
The time in milliseconds that unused/inactive cache data remains in memory.
When a query's cache becomes unused or inactive, that cache data will be garbage collected after this duration.
When different garbage collection times are specified, the longest one will be used.
Setting it to Infinity will disable garbage collection.
Inherited from​
DistributiveOmit.gcTime
initialData?​
optionalinitialData:TOutput|InitialDataFunction<TOutput>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:611
Inherited from​
DistributiveOmit.initialData
initialDataUpdatedAt?​
optionalinitialDataUpdatedAt:number| () =>undefined|number
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:612
Inherited from​
DistributiveOmit.initialDataUpdatedAt
initialPageParam?​
optionalinitialPageParam:undefined
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:746
Inherited from​
DistributiveOmit.initialPageParam
maxPages?​
optionalmaxPages:number
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:629
Maximum number of pages to store in the data of an infinite query.
Inherited from​
DistributiveOmit.maxPages
meta?​
optionalmeta:Record<string,unknown>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:625
Additional payload to be stored on each query. Use this property to pass information that can be used in other places.
Inherited from​
DistributiveOmit.meta
networkMode?​
optionalnetworkMode:NetworkMode
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:598
Inherited from​
DistributiveOmit.networkMode
persister()?​
optionalpersister: (queryFn,context,query) =>NoInfer<TOutput> |Promise<NoInfer<TOutput>>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:607
Parameters​
| Parameter | Type | Description |
|---|---|---|
queryFn | QueryFunction<NoInfer<TOutput>, readonly unknown[], never> | - |
context | { client: QueryClient; direction: unknown; meta: undefined | Record<string, unknown>; pageParam: unknown; queryKey: readonly unknown[]; signal: AbortSignal; } | - |
context.client | QueryClient | - |
context.direction? | unknown | Deprecated if you want access to the direction, you can add it to the pageParam |
context.meta | undefined | Record<string, unknown> | - |
context.pageParam? | unknown | - |
context.queryKey | readonly unknown[] | - |
context.signal | AbortSignal | - |
query | Query | - |
Returns​
NoInfer<TOutput> | Promise<NoInfer<TOutput>>
Inherited from​
DistributiveOmit.persister
queryFn?​
optionalqueryFn: typeofskipToken|QueryFunction<TOutput, readonlyunknown[],never>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:606
Inherited from​
DistributiveOmit.queryFn
queryHash?​
optionalqueryHash:string
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:608
Inherited from​
DistributiveOmit.queryHash
queryKeyHashFn?​
optionalqueryKeyHashFn:QueryKeyHashFunction<readonlyunknown[]>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:610
Inherited from​
DistributiveOmit.queryKeyHashFn
retry?​
optionalretry:RetryValue<TError>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:596
If false, failed queries will not retry by default.
If true, failed queries will retry infinitely., failureCount: num
If set to an integer number, e.g. 3, failed queries will retry until the failed query count meets that number.
If set to a function (failureCount, error) => boolean failed queries will retry until the function returns false.
Inherited from​
DistributiveOmit.retry
retryDelay?​
optionalretryDelay:RetryDelayValue<TError>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:597
Inherited from​
DistributiveOmit.retryDelay
staleTime?​
optionalstaleTime:StaleTimeFunction<TOutput,TError,TOutput, readonlyunknown[]>
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:751
The time in milliseconds after data is considered stale. If the data is fresh it will be returned from the cache.
Inherited from​
DistributiveOmit.staleTime
structuralSharing?​
optionalstructuralSharing:boolean| (oldData,newData) =>unknown
Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:619
Set this to false to disable structural sharing between query results.
Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom structural sharing logic.
Defaults to true.
Inherited from​
DistributiveOmit.structuralSharing
trpc?​
optionaltrpc:TRPCRequestOptions
Defined in: packages/react-query/src/internals/context.tsx:47
tRPC-related options
Inherited from​
TRPCUseUtilsOptions.trpc