Describe the bug#
The docs for the latest version state the following:
Global callbacks
The onError, onSuccess and onSettled callbacks on the QueryCache can be used to handle these events on a global level. They are different to defaultOptions provided to the QueryClient because:
- defaultOptions can be overridden by each Query - the global callbacks will always be called.
- defaultOptions callbacks will be called once for each Observer, while the global callbacks will only be called once per Query.
Statements about defaultOptions are incorrect since in v5 (currently latest) there is no longer the possibility to define those callbacks there.
Your minimal, reproducible example#
--
Steps to reproduce#
--
Expected behavior#
--
How often does this bug happen?#
None
Screenshots or Videos#
No response
Platform#
--
Tanstack Query adapter#
None
TanStack Query version#
v5
TypeScript version#
No response
Additional context#
No response
you're right. please file a PR that removes this section