Skip to content

API Documentation / @pinia/colada / UseQueryEntryExtensions

Interface: UseQueryEntryExtensions<TData, TError, TDataInitial>

Allows defining extensions to the query entry that are returned by useQuery().

Type Parameters

TData

TData

TError

TError

TDataInitial

TDataInitial extends TData | undefined = undefined

Properties

dataUpdatedAt?

ts
optional dataUpdatedAt: ShallowRef<number>;

Timestamp of when data was last successfully fetched. TanStack Query compatible property.


errorUpdatedAt?

ts
optional errorUpdatedAt: ShallowRef<number>;

Timestamp of when an error last occurred. TanStack Query compatible property.


fetchStatus?

ts
optional fetchStatus: ComputedRef<FetchStatus>;

TanStack Query compatible fetch status. Maps to: 'fetching' when loading, 'idle' otherwise. Note: 'paused' is not currently supported.


isDelaying

ts
isDelaying: ShallowRef<boolean>;

Returns whether the query is currently delaying its asyncStatus from becoming 'loading'. Requires the PiniaColadaDelay plugin.


isError?

ts
optional isError: ComputedRef<boolean>;

Whether the query status is 'error'. TanStack Query compatible property.


isFetched?

ts
optional isFetched: ShallowRef<boolean>;

Whether the query has fetched at least once. TanStack Query compatible property.


isFetchedAfterMount?

ts
optional isFetchedAfterMount: ShallowRef<boolean>;

Whether the query has fetched after component mount. TanStack Query compatible property.


isFetching?

ts
optional isFetching: ComputedRef<boolean>;

Whether the query is currently fetching (asyncStatus === 'loading'). TanStack Query compatible property.


isLoadingError?

ts
optional isLoadingError: ComputedRef<boolean>;

Whether the query errored on initial load (never had data). TanStack Query compatible property.


isRefetchError?

ts
optional isRefetchError: ComputedRef<boolean>;

Whether the query errored on refetch (had data before). TanStack Query compatible property.


isRefetching?

ts
optional isRefetching: ComputedRef<boolean>;

Whether the query is refetching (fetching but not initial load). TanStack Query compatible property.


isStale?

ts
optional isStale: ComputedRef<boolean>;

Whether the query data is stale. TanStack Query compatible property.


isSuccess?

ts
optional isSuccess: ComputedRef<boolean>;

Whether the query status is 'success'. TanStack Query compatible property.

Released under the MIT License.