Skip to content
0

katanakit-js / QueryState

Interface: QueryState<TData, TError> ​

Defined in: node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:159

The raw state stored on a Query instance. This is the underlying state that observer results (e.g. QueryObserverResult) are derived from.

Type Parameters ​

Type ParameterDefault type
TDataunknown
TErrorDefaultError

Properties ​

PropertyTypeDescriptionDefined in
dataTData | undefinedThe last successfully resolved data for the query.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:163
dataUpdateCountnumberThe number of times the query has successfully resolved.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:167
dataUpdatedAtnumberThe timestamp for when the query most recently returned the status as "success".node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:171
errorTError | nullThe error object for the query, if the last attempt resulted in an error. - Defaults to null.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:176
errorUpdateCountnumberThe sum of all errors, incremented every time the query resolves with an error.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:180
errorUpdatedAtnumberThe timestamp for when the query most recently returned the status as "error".node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:184
fetchFailureCountnumberThe failure count for the current fetch. - Incremented every time the fetch fails. - Reset to 0 when the fetch succeeds.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:190
fetchFailureReasonTError | nullThe reason the current fetch failed, as reported by the retryer. - Reset to null when the fetch succeeds.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:195
fetchMetaFetchMeta | nullMetadata passed to the currently in-flight (or most recent) fetch, e.g. the fetchMore direction for infinite queries.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:200
fetchStatus"fetching" | "paused" | "idle"The fetch status of the query. - fetching: the queryFn is currently executing. - paused: a fetch wanted to run but has been paused (see network mode). - idle: the query is not fetching.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:219
isInvalidatedbooleanWhether the query has been marked as invalidated via invalidate(). - Reset to false whenever the query resolves successfully.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:205
status"error" | "success" | "pending"The status of the query. - pending if there's no cached data and no attempt was finished yet. - error if the last attempt resulted in an error. - success if the query has data.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:212

Released under the MIT License.