Query Docs
API Reference
- Svelte Reference
- Functions / createInfiniteQuery
- Functions / createMutation
- Functions / createQueries
- Functions / createQuery
- Functions / defaultShouldDehydrateMutation
- Functions / defaultShouldDehydrateQuery
- Functions / dehydrate
- Functions / dehydrateQuery
- Functions / experimental_streamedQuery
- Functions / getIsRestoringContext
- Functions / getQueryClientContext
- Functions / hashKey
- Functions / hydrate
- Functions / infiniteQueryOptions
- Functions / isCancelledError
- Functions / keepPreviousData
- Functions / matchMutation
- Functions / matchQuery
- Functions / mutationOptions
- Functions / noop
- Functions / partialMatchKey
- Functions / queryOptions
- Functions / replaceEqualDeep
- Functions / setIsRestoringContext
- Functions / setQueryClientContext
- Functions / shouldThrowError
- Functions / useHydrate
- Functions / useIsFetching
- Functions / useIsMutating
- Functions / useIsRestoring
- Functions / useMutationState
- Functions / useQueryClient
- Classes / CancelledError
- Classes / InfiniteQueryObserver
- Classes / Mutation
- Classes / MutationCache
- Classes / MutationObserver
- Classes / QueriesObserver
- Classes / Query
- Classes / QueryCache
- Classes / QueryClient
- Classes / QueryObserver
- Interfaces / CancelOptions
- Interfaces / DefaultOptions
- Interfaces / DehydrateOptions
- Interfaces / DehydratedState
- Interfaces / EnsureQueryDataOptions
- Interfaces / FetchNextPageOptions
- Interfaces / FetchPreviousPageOptions
- Interfaces / FetchQueryOptions
- Interfaces / FocusManager
- Interfaces / HydrateOptions
- Interfaces / InfiniteData
- Interfaces / InfiniteQueryObserverBaseResult
- Interfaces / InfiniteQueryObserverLoadingErrorResult
- Interfaces / InfiniteQueryObserverLoadingResult
- Interfaces / InfiniteQueryObserverOptions
- Interfaces / InfiniteQueryObserverPendingResult
- Interfaces / InfiniteQueryObserverPlaceholderResult
- Interfaces / InfiniteQueryObserverRefetchErrorResult
- Interfaces / InfiniteQueryObserverSuccessResult
- Interfaces / InfiniteQueryPageParamsOptions
- Interfaces / InitialPageParam
- Interfaces / InvalidateOptions
- Interfaces / InvalidateQueryFilters
- Interfaces / MutateOptions
- Interfaces / MutationCacheConfig
- Interfaces / MutationFilters
- Interfaces / MutationObserverBaseResult
- Interfaces / MutationObserverErrorResult
- Interfaces / MutationObserverIdleResult
- Interfaces / MutationObserverLoadingResult
- Interfaces / MutationObserverOptions
- Interfaces / MutationObserverSuccessResult
- Interfaces / MutationOptions
- Interfaces / MutationState
- Interfaces / NotifyEvent
- Interfaces / OnlineManager
- Interfaces / QueriesObserverOptions
- Interfaces / QueryCacheConfig
- Interfaces / QueryClientConfig
- Interfaces / QueryExecuteOptions
- Interfaces / QueryFilters
- Interfaces / QueryObserverBaseResult
- Interfaces / QueryObserverLoadingErrorResult
- Interfaces / QueryObserverLoadingResult
- Interfaces / QueryObserverOptions
- Interfaces / QueryObserverPendingResult
- Interfaces / QueryObserverPlaceholderResult
- Interfaces / QueryObserverRefetchErrorResult
- Interfaces / QueryObserverSuccessResult
- Interfaces / QueryOptions
- Interfaces / QueryState
- Interfaces / RefetchOptions
- Interfaces / RefetchQueryFilters
- Interfaces / Register
- Interfaces / ResetOptions
- Interfaces / ResultOptions
- Interfaces / SetDataOptions
- Interfaces / TimeoutManager
- Types / Accessor
- Types / AnyDataTag
- Types / CreateBaseMutationResult
- Types / CreateBaseQueryOptions
- Types / CreateBaseQueryResult
- Types / CreateInfiniteQueryOptions
- Types / CreateInfiniteQueryResult
- Types / CreateMutateAsyncFunction
- Types / CreateMutateFunction
- Types / CreateMutationOptions
- Types / CreateMutationResult
- Types / CreateQueryOptions
- Types / CreateQueryResult
- Types / DataTag
- Types / DefaultError
- Types / DefaultedInfiniteQueryObserverOptions
- Types / DefaultedQueryObserverOptions
- Types / DefinedCreateBaseQueryResult
- Types / DefinedCreateQueryResult
- Types / DefinedInfiniteQueryObserverResult
- Types / DefinedInitialDataOptions
- Types / DefinedQueryObserverResult
- Types / DistributiveOmit
- Types / EnsureInfiniteQueryDataOptions
- Types / FetchInfiniteQueryOptions
- Types / FetchStatus
- Types / GetNextPageParamFunction
- Types / GetPreviousPageParamFunction
- Types / HydrationBoundary
- Types / InferDataFromTag
- Types / InferErrorFromTag
- Types / InfiniteQueryExecuteOptions
- Types / InfiniteQueryObserverResult
- Types / InitialDataFunction
- Types / ManagedTimerId
- Types / MutateFunction
- Types / MutateFunctionRest
- Types / MutationCacheNotifyEvent
- Types / MutationFunction
- Types / MutationFunctionContext
- Types / MutationKey
- Types / MutationMeta
- Types / MutationObserverResult
- Types / MutationScope
- Types / MutationStateOptions
- Types / MutationStatus
- Types / MutationTypeFromResult
- Types / NetworkMode
- Types / NonUndefinedGuard
- Types / NotifyEventType
- Types / NotifyOnChangeProps
- Types / OmitKeyof
- Types / Override
- Types / PlaceholderDataFunction
- Types / QueriesOptions
- Types / QueriesPlaceholderDataFunction
- Types / QueriesResults
- Types / QueryBooleanOption
- Types / QueryCacheNotifyEvent
- Types / QueryClientProviderProps
- Types / QueryFunction
- Types / QueryFunctionContext
- Types / QueryKey
- Types / QueryKeyHashFunction
- Types / QueryKeyWithDataTag
- Types / QueryMeta
- Types / QueryObserverResult
- Types / QueryPersister
- Types / QueryStatus
- Types / SkipToken
- Types / StaleTime
- Types / StaleTimeFunction
- Types / ThrowOnError
- Types / TimeoutCallback
- Types / TimeoutProvider
- Types / UndefinedInitialDataOptions
- Types / UnsetMarker
- Types / Updater
- Types / WithRequired
- Types / dataTagErrorSymbol
- Types / dataTagSymbol
- Variables / HydrationBoundary
- Variables / dataTagErrorSymbol
- Variables / dataTagSymbol
- Variables / defaultScheduler
- Variables / environmentManager
- Variables / focusManager
- Variables / isServer
- Variables / notifyManager
- Variables / onlineManager
- Variables / skipToken
- Variables / timeoutManager
- Variables / unsetMarker
AI/LLM: This documentation page is available in plain markdown format at/query/latest/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md
API Reference
QueryObserverSuccessResult
Defined in: packages/query-core/src/types.ts:1285
A query result in the success state with data from the cache.
Extends#
- QueryObserverBaseResult<TData, TError>
Type Parameters#
TData#
TData = unknown
TError#
TError = DefaultError
Properties#
| Property | Type | Description | Overrides |
|---|---|---|---|
| data | TData | The last successfully resolved data for the query. | QueryObserverBaseResult.data |
| dataUpdatedAt | number | The timestamp for when the query most recently returned the status as "success". | - |
| error | null | null, since the query isn't in the error state. | QueryObserverBaseResult.error |
| errorUpdateCount | number | The sum of all errors. | - |
| errorUpdatedAt | number | The timestamp for when the query most recently returned the status as "error". | - |
| failureCount | number | The failure count for the query. - Incremented every time the query fails. - Reset to 0 when the query succeeds. | - |
| failureReason | TError | null | The failure reason for the query retry. - Reset to null when the query succeeds. | - |
| fetchStatus | "fetching" | "paused" | "idle" | The fetch status of the query. - fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch. - paused: The query wanted to fetch, but has been paused. - idle: The query is not fetching. - See Network Mode for more information. | - |
| isEnabled | boolean | true if this observer is enabled, false otherwise. | - |
| isError | false | false, since the query isn't in the error state. | QueryObserverBaseResult.isError |
| isFetched | boolean | Will be true if the query has been fetched. | - |
| isFetchedAfterMount | boolean | Will be true if the query has been fetched after the component mounted. - This property can be used to not show any previously cached data. | - |
| isFetching | boolean | A derived boolean from the fetchStatus variable, provided for convenience. - true whenever the queryFn is executing, which includes initial pending as well as background refetch. | - |
| | boolean | Deprecated isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version. | - |
| isLoading | false | false, since the first fetch isn't in flight. | QueryObserverBaseResult.isLoading |
| isLoadingError | false | false, since the query didn't fail while fetching for the first time. | QueryObserverBaseResult.isLoadingError |
| isPaused | boolean | A derived boolean from the fetchStatus variable, provided for convenience. - The query wanted to fetch, but has been paused. | - |
| isPending | false | false, since the query has data or a query attempt has finished. | QueryObserverBaseResult.isPending |
| isPlaceholderData | false | false, since the data shown isn't the placeholderData. | QueryObserverBaseResult.isPlaceholderData |
| isRefetchError | false | false, since the query didn't fail while refetching. | QueryObserverBaseResult.isRefetchError |
| isRefetching | boolean | Is true whenever a background refetch is in-flight, which does not include initial pending. - Is the same as isFetching && !isPending. | - |
| isStale | boolean | Will be true if the data in the cache is invalidated or if the data is older than the given staleTime. | - |
| isSuccess | true | true, since the query is in the success state. | QueryObserverBaseResult.isSuccess |
| refetch | (options?: RefetchOptions) => Promise<QueryObserverResult<TData, TError>> | A function to manually refetch the query. | - |
| status | "success" | 'success', since the query has received a response with no errors and is ready to display its data. | QueryObserverBaseResult.status |