Skip to main content
Version: 11.x

Interface: TRPCFetchQueryOptions<TOutput, TError>

Extends

  • DistributiveOmit<FetchQueryOptions<TOutput, TError>, "queryKey">.TRPCUseUtilsOptions

Type Parameters

Type Parameter
TOutput
TError

Properties

_defaulted?

optional _defaulted: boolean

Inherited from

DistributiveOmit._defaulted

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:593


behavior?

optional behavior: QueryBehavior<TOutput, TError, TOutput, QueryKey>

Inherited from

DistributiveOmit.behavior

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:586


gcTime?

optional gcTime: number

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

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:578


initialData?

optional initialData: TOutput | InitialDataFunction<TOutput>

Inherited from

DistributiveOmit.initialData

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:584


initialDataUpdatedAt?

optional initialDataUpdatedAt: number | () => undefined | number

Inherited from

DistributiveOmit.initialDataUpdatedAt

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:585


initialPageParam?

optional initialPageParam: undefined

Inherited from

DistributiveOmit.initialPageParam

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:719


maxPages?

optional maxPages: number

Maximum number of pages to store in the data of an infinite query.

Inherited from

DistributiveOmit.maxPages

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:602


meta?

optional meta: Record<string, unknown>

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

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:598


networkMode?

optional networkMode: NetworkMode

Inherited from

DistributiveOmit.networkMode

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:571


persister()?

optional persister: (queryFn, context, query) => NoInfer<TOutput> | Promise<NoInfer<TOutput>>

Parameters

ParameterTypeDescription
queryFnQueryFunction<NoInfer<TOutput>, QueryKey, never>-
contextobject-
context.direction?unknownDeprecated if you want access to the direction, you can add it to the pageParam
context.metaundefined | Record<string, unknown>-
context.pageParam?unknown-
context.queryKeyQueryKey-
context.signalAbortSignal-
queryQuery<unknown, Error, unknown, QueryKey>-

Returns

NoInfer<TOutput> | Promise<NoInfer<TOutput>>

Inherited from

DistributiveOmit.persister

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:580


queryFn?

optional queryFn: typeof skipToken | QueryFunction<TOutput, QueryKey, never>

Inherited from

DistributiveOmit.queryFn

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:579


queryHash?

optional queryHash: string

Inherited from

DistributiveOmit.queryHash

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:581


queryKeyHashFn?

optional queryKeyHashFn: QueryKeyHashFunction<QueryKey>

Inherited from

DistributiveOmit.queryKeyHashFn

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:583


retry?

optional retry: RetryValue<TError>

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

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:569


retryDelay?

optional retryDelay: RetryDelayValue<TError>

Inherited from

DistributiveOmit.retryDelay

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:570


staleTime?

optional staleTime: StaleTime<TOutput, TError, TOutput, QueryKey>

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

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:724


structuralSharing?

optional structuralSharing: boolean | (oldData, newData) => unknown

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

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:592


trpc?

optional trpc: TRPCRequestOptions

tRPC-related options

Inherited from

TRPCUseUtilsOptions.trpc

Defined in

packages/react-query/src/internals/context.tsx:47