Skip to content

Commit 5b0c269

Browse files
committed
better document throwOnError's default
1 parent 12d4542 commit 5b0c269

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/framework/react/reference/useMutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ mutate(variables, {
9494
- Defaults to a unique id (so that all mutations run in parallel)
9595
- Mutations with the same scope id will run in serial
9696
- `throwOnError: undefined | boolean | (error: TError) => boolean`
97-
- Defaults to the global query config's `throwOnError` value, which is `undefined`
97+
- Defaults to the global `QueryClient`'s `defaultOptions.queries.throwOnError`.
9898
- Set this to `true` if you want mutation errors to be thrown in the render phase and propagate to the nearest error boundary
9999
- Set this to `false` to disable the behavior of throwing errors to the error boundary.
100100
- If set to a function, it will be passed the error and should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`)

docs/framework/react/reference/useQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const {
167167
- Defaults to `true`
168168
- If set to `false`, this instance of `useQuery` will not be subscribed to the cache. This means it won't trigger the `queryFn` on its own, and it won't receive updates if data gets into cache by other means.
169169
- `throwOnError: undefined | boolean | (error: TError, query: Query) => boolean`
170-
- Defaults to the global query config's `throwOnError` value, which is `undefined`
170+
- Defaults to the global `QueryClient`'s `defaultOptions.queries.throwOnError`.
171171
- Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary
172172
- Set this to `false` to disable `suspense`'s default behavior of throwing errors to the error boundary.
173173
- If set to a function, it will be passed the error and the query, and it should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`)

docs/framework/solid/reference/createQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function App() {
290290
- The time in milliseconds after data is considered stale. This value only applies to the hook it is defined on.
291291
- If set to `Infinity`, the data will never be considered stale
292292
- ##### `throwOnError: undefined | boolean | (error: TError, query: Query) => boolean`
293-
- Defaults to the global query config's `throwOnError` value, which is `undefined`
293+
- Defaults to the global `QueryClient`'s `defaultOptions.queries.throwOnError`.
294294
- Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary
295295
- Set this to `false` to disable `suspense`'s default behavior of throwing errors to the error boundary.
296296
- If set to a function, it will be passed the error and the query, and it should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`)

0 commit comments

Comments
 (0)