Skip to content
0

katanakit-js / QueryCacheConfig

Interface: QueryCacheConfig ​

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

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 ​

PropertyTypeDescriptionDefined in
onError?(error, query) => voidCalled when any query in the cache encounters an error.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:1076
onSettled?(data, error, query) => voidCalled when any query in the cache is settled, either successfully or with an error.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:1080
onSuccess?(data, query) => voidCalled when any query in the cache is successful.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:1078

Released under the MIT License.