Skip to content

docs(react-query/useQuery): document 'throwOnError' default and its absence in suspense hooks - #11156

Open
sukvvon wants to merge 1 commit into
mainfrom
docs/document-throwonerror-default
Open

docs(react-query/useQuery): document 'throwOnError' default and its absence in suspense hooks#11156
sukvvon wants to merge 1 commit into
mainfrom
docs/document-throwonerror-default

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Optional / Defaults to false`` to the throwOnError option, matching the documentation pattern used by other options (`subscribed`, `refetchOnMount`, `refetchOnWindowFocus`)
  • Note that useSuspenseQuery and other suspense hooks do not accept this option, linking to the existing default behavior documented in the Suspense guide

Summary by CodeRabbit

  • Documentation
    • Clarified that throwOnError is optional and defaults to false.
    • Documented that suspense hooks do not support this option and linked to the relevant Suspense behavior guidance.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2beb25a9-9a24-46d7-9694-9c6eeaaf447a

📥 Commits

Reviewing files that changed from the base of the PR and between 46d7f02 and 14e17a0.

📒 Files selected for processing (1)
  • docs/framework/react/reference/useQuery.md

📝 Walkthrough

Walkthrough

The useQuery reference now documents that throwOnError is optional, defaults to false, and is not accepted by suspense hooks.

Changes

React query documentation

Layer / File(s) Summary
Clarify throwOnError options
docs/framework/react/reference/useQuery.md
Documents the optional false default and notes that suspense hooks do not accept throwOnError.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the changes but omits the required Changes, Checklist, and Release Impact sections from the template. Use the repository template and add the required Changes, Checklist, and Release Impact sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation changes to throwOnError and suspense hooks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/document-throwonerror-default

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 14e17a0

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 2m 14s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-09 05:19:51 UTC

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Aug 9, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@11156

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@11156

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11156

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11156

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@11156

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11156

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@11156

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@11156

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@11156

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@11156

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@11156

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11156

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@11156

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@11156

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@11156

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@11156

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@11156

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@11156

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@11156

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@11156

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@11156

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@11156

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@11156

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@11156

commit: 14e17a0

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.15 KB (0%)
react minimal 9.1 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant