Skip to main content

Type Alias: QueryResult<TVarName, TData>

QueryResult<TVarName, TData>: Omit<UseQueryResult<TData>, "data"> & { [P in TVarName]: UseQueryResult<TData>["data"] }

See Tanstack Query - useQuery returns.

Type Parameters

Type ParameterDefault typeDescription
TVarName extends string-The name of the variable that returns the data.
TDataunknownThe data returned.

See

Tanstack Query - useQuery

Example

data is renamed according to the TVarName and therefore not included in the result.

{
- data,
dataUpdatedAt,
error,
errorUpdatedAt,
failureCount,
failureReason,
fetchStatus,
isError,
isFetched,
isFetchedAfterMount,
isFetching,
isInitialLoading,
isLoading,
isLoadingError,
isPaused,
isPending,
isPlaceholderData,
isRefetchError,
isRefetching,
isStale,
isSuccess,
refetch,
status,
}

Defined in

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