Skip to main content

Type Alias: QueryOptions<TData>

QueryOptions<TData>: Omit<UseQueryOptions<TData>, "queryKey" | "queryFn">

See Tanstack Query - useQuery options.

Type Parameters

Type ParameterDefault typeDescription
TDataunknownThe data returned.

See

Tanstack Query - useQuery

Example

useQueryHook({
query: {
enabled: isReady,
staleTime: 1000,
placeHolderData: { foo: 'bar' },
}
})

Options

queryKey and queryFn are used internally and therefore not included as an options.

query: {
gcTime,
enabled,
networkMode,
initialData,
initialDataUpdatedAt,
meta,
notifyOnChangeProps,
placeholderData,
queryKeyHashFn,
refetchInterval,
refetchIntervalInBackground,
refetchOnMount,
refetchOnReconnect,
refetchOnWindowFocus,
retry,
retryOnMount,
retryDelay,
select,
staleTime,
structuralSharing,
throwOnError
}

Defined in

sdk-react-provider/src/lib/types.ts:83