Skip to content

docs(react-query): add missing errorUpdateCount to useQuery return signature#11041

Open
KangaZero wants to merge 2 commits into
TanStack:mainfrom
KangaZero:docs/add-error-update-count-to-use-query-signature
Open

docs(react-query): add missing errorUpdateCount to useQuery return signature#11041
KangaZero wants to merge 2 commits into
TanStack:mainfrom
KangaZero:docs/add-error-update-count-to-use-query-signature

Conversation

@KangaZero

@KangaZero KangaZero commented Jul 10, 2026

Copy link
Copy Markdown

Summary

errorUpdateCount is fully documented in the Returns section of the useQuery reference pages but is missing from the destructuring block at the top of the page — the first thing a reader sees when scanning the API.

Affected files:

  • docs/framework/react/reference/useQuery.md
  • docs/framework/solid/reference/useQuery.md

The source of truth in packages/query-core/src/types.ts (line 655) places errorUpdateCount between failureReason and the fetchStatus block, which is what this fix reflects.

  failureReason,
+ errorUpdateCount,
  fetchStatus,

How did you test this change?

Documentation-only change — no runtime behavior affected, no tests needed. Verified by:

  1. Cross-referencing packages/query-core/src/types.ts line 655, which defines errorUpdateCount: number between failureReason and the fetchStatus-related fields.
  2. Confirming errorUpdateCount is already present and correctly documented in the Returns section of both files (lines 249 and 366 respectively) — it was only absent from the top-of-page destructuring example.

Summary by CodeRabbit

  • Documentation
    • Updated the React and Solid useQuery documentation examples to destructure and display errorUpdateCount from the hook’s return value.

@coderabbitai

coderabbitai Bot commented Jul 10, 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

Run ID: b57fb2ff-df60-4cf3-bcd6-d1daacbee348

📥 Commits

Reviewing files that changed from the base of the PR and between 533050c and 819d450.

📒 Files selected for processing (2)
  • docs/framework/react/reference/useQuery.md
  • docs/framework/solid/reference/useQuery.md
✅ Files skipped from review due to trivial changes (2)
  • docs/framework/react/reference/useQuery.md
  • docs/framework/solid/reference/useQuery.md

📝 Walkthrough

Walkthrough

The React and Solid useQuery reference examples now include errorUpdateCount among the destructured return values.

Changes

useQuery documentation

Layer / File(s) Summary
Document returned query state
docs/framework/react/reference/useQuery.md, docs/framework/solid/reference/useQuery.md
The React and Solid useQuery examples now destructure errorUpdateCount from the hook result.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR’s main change: adding errorUpdateCount to the useQuery return signature docs.
Description check ✅ Passed The description covers the docs change, affected files, and testing notes, though it doesn’t use the template’s exact headings.
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

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.

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