Skip to content
Source
Sign inSign up
TanStack/query

Docs: QueryCache - incorrect statements about `defaultOptions` callbacks #6824

Send to my agent
Closedswingthrough(GitHub profile, opens in a new tab) opened this issue 1 comment

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

  1. you're right. please file a PR that removes this section

  2. TkDodo added labelsdocumentation

  3. TkDodo closed this

Sign in to join this conversation.