Type Alias: QueryOptions<TData>
QueryOptions<
TData
>:Omit
<UseQueryOptions
<TData
>,"queryKey"
|"queryFn"
>
See Tanstack Query - useQuery options.
Type Parameters
Type Parameter | Default type | Description |
---|---|---|
TData | unknown | The data returned. |
See
Tanstack Query - useQuery
Example
useQueryHook({
query: {
enabled: isReady,
staleTime: 1000,
placeHolderData: { foo: 'bar' },
}
})
Options
queryKey
andqueryFn
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
}