0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/vue/reference/interfaces/QueryCacheConfig.md
Wonsuk Choi 1d2cf91305
chore(*): update '@tanstack/typedoc-config' to v0.3.4 (#11817)
* chore(*): update '@tanstack/typedoc-config' to v0.3.4 and load its custom settings plugin by package export

* docs(framework/*/reference): regenerate reference docs with '@tanstack/typedoc-config' v0.3.4

* docs(framework/*/reference): regenerate reference docs

* docs(framework/*/reference): regenerate reference docs
2026-10-05 12:41:28 +09:00

1.3 KiB

id title
QueryCacheConfig QueryCacheConfig

Defined in: packages/query-core/src/queryCache.ts:25

Global callbacks that fire for every query handled by a QueryCache, regardless of which component or observer triggered it. Unlike QueryClient's defaultOptions, which a query can override, these callbacks are always called. Unlike MutationCacheConfig's callbacks, these are fire-and-forget: their return value is not awaited before the query settles.

Properties

Property Type Description
onError? (error: Error, query: Query<unknown, unknown, unknown>) => void Called when any query in the cache encounters an error.
onSettled? (data: unknown, error: Error | null, query: Query<unknown, unknown, unknown>) => void Called when any query in the cache is settled, either successfully or with an error.
onSuccess? (data: unknown, query: Query<unknown, unknown, unknown>) => void Called when any query in the cache is successful.