From 14e17a0029dbf1841b54e02bf4f25c2ed0f27420 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sun, 9 Aug 2026 14:14:51 +0900 Subject: [PATCH 1/3] docs(react-query/useQuery): document 'throwOnError' default and its absence in suspense hooks --- docs/framework/react/reference/useQuery.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/framework/react/reference/useQuery.md b/docs/framework/react/reference/useQuery.md index 569e19cb8f4..398b3f4369b 100644 --- a/docs/framework/react/reference/useQuery.md +++ b/docs/framework/react/reference/useQuery.md @@ -172,9 +172,12 @@ const { - Defaults to `true` - 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. - `throwOnError: undefined | boolean | (error: TError, query: Query) => boolean` + - Optional + - Defaults to `false` - Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary - Set this to `false` to disable `suspense`'s default behavior of throwing errors to the error boundary. - 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`) + - `useSuspenseQuery` and other suspense hooks do not accept this option; see [Suspense](../guides/suspense.md#throwonerror-default) for their default behavior - `meta: Record` - Optional - If set, stores additional information on the query cache entry that can be used as needed. It will be accessible wherever the `query` is available, and is also part of the `QueryFunctionContext` provided to the `queryFn`. From 4005b636e94f2d9fa776dd094929262e0b27918b Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Wed, 12 Aug 2026 09:51:05 +0900 Subject: [PATCH 2/3] docs(react-query/useQuery): use framework-agnostic wording for suspense throwOnError note --- docs/framework/react/reference/useQuery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/react/reference/useQuery.md b/docs/framework/react/reference/useQuery.md index 398b3f4369b..9de665727f3 100644 --- a/docs/framework/react/reference/useQuery.md +++ b/docs/framework/react/reference/useQuery.md @@ -177,7 +177,7 @@ const { - Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary - Set this to `false` to disable `suspense`'s default behavior of throwing errors to the error boundary. - 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`) - - `useSuspenseQuery` and other suspense hooks do not accept this option; see [Suspense](../guides/suspense.md#throwonerror-default) for their default behavior + - When using suspense mode, this option is not user-configurable and a different default is used internally - `meta: Record` - Optional - If set, stores additional information on the query cache entry that can be used as needed. It will be accessible wherever the `query` is available, and is also part of the `QueryFunctionContext` provided to the `queryFn`. From f1a40938b2d54c5ec723327d2f3cac928d83e5ba Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Wed, 12 Aug 2026 09:53:23 +0900 Subject: [PATCH 3/3] docs(react-query/useQuery): remove inaccurate suspense-mode throwOnError note --- docs/framework/react/reference/useQuery.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/framework/react/reference/useQuery.md b/docs/framework/react/reference/useQuery.md index 9de665727f3..df9f12596a5 100644 --- a/docs/framework/react/reference/useQuery.md +++ b/docs/framework/react/reference/useQuery.md @@ -177,7 +177,6 @@ const { - Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary - Set this to `false` to disable `suspense`'s default behavior of throwing errors to the error boundary. - 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`) - - When using suspense mode, this option is not user-configurable and a different default is used internally - `meta: Record` - Optional - If set, stores additional information on the query cache entry that can be used as needed. It will be accessible wherever the `query` is available, and is also part of the `QueryFunctionContext` provided to the `queryFn`.