-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
better document throwOnError's default
#8581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View your CI Pipeline Execution ↗ for commit d71e24d.
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 5b0c269. ☁️ Nx Cloud last updated this comment at |
| - Mutations with the same scope id will run in serial | ||
| - `throwOnError: undefined | boolean | (error: TError) => boolean` | ||
| - Defaults to the global query config's `throwOnError` value, which is `undefined` | ||
| - Defaults to the global `QueryClient`'s `defaultOptions.queries.throwOnError`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this true for mutations? Ref: #8569
|
The throwOnError part might be a residue from before #1130? I am really new to this library so please don't take my word for it. |
TkDodo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaults to the global
QueryClient'sdefaultOptions.queries.throwOnError.
I would rather just remove that sentence. All config options can be defined as default on the queryClient, or they can be set with queryClient.setDefaultOptions for a specific key, too.
This mechanism should not be documented in the reference docs, because we would need to state that for all options.
As a new user, I had no idea what "global query config" meant, and searching for "config" wasn't helpful. This PR updates the wording.