Skip to content

docs(reference/QueryCache): correct the 'find' and 'findAll' options to match their filter types#10884

Merged
sukvvon merged 1 commit into
mainfrom
docs/query-cache-find-findall-options
Jun 4, 2026
Merged

docs(reference/QueryCache): correct the 'find' and 'findAll' options to match their filter types#10884
sukvvon merged 1 commit into
mainfrom
docs/query-cache-find-findall-options

Conversation

@sukvvon

@sukvvon sukvvon commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

🎯 Changes

Corrects the options listed for find and findAll in the QueryCache reference to match their actual filter types:

  • find(filters: WithRequired<QueryFilters, 'queryKey'>) — both filters and its queryKey are required, so filters is no longer marked optional and queryKey is documented as a required nested option.
  • findAll(filters: QueryFilters = {})filters is optional; queryKey is just one of its properties (covered by the linked Query Filters), so the misplaced top-level queryKey entry is removed.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Updated API documentation for queryCache.find method: filters parameter is now required.
    • Updated queryCache.findAll method's options section structure and parameter documentation for clarity.

@coderabbitai

coderabbitai Bot commented Jun 4, 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: f7dedb12-e452-42b0-9aae-31ada8f425d5

📥 Commits

Reviewing files that changed from the base of the PR and between 525e316 and d4e651d.

📒 Files selected for processing (1)
  • docs/reference/QueryCache.md

📝 Walkthrough

Walkthrough

This PR updates the reference documentation for QueryCache methods to reflect API signature changes. The find method's filters parameter is now documented as required, and findAll has its options structure reorganized to align queryKey and filters documentation.

Changes

QueryCache Method Signature Documentation

Layer / File(s) Summary
QueryCache method signatures documentation
docs/reference/QueryCache.md
queryCache.find options now document filters: QueryFilters as required instead of optional, and queryCache.findAll options are reorganized to remove the standalone queryKey?: QueryKey field and restructure the options block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • TanStack/query#10873: Both PRs update docs/reference/QueryCache.md to reflect the v5 QueryCache.find/findAll filters-object/options shape, with overlapping changes in the same documentation sections.

Poem

🐰 The QueryCache docs hop into place,
With filters now required—no more optional grace!
findAll reshapes its options with care,
queryKey and filters dance side-by-side there! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: correcting documentation for QueryCache's find and findAll methods to match their actual filter types.
Description check ✅ Passed The description follows the template structure, includes detailed explanations of changes with context about the actual function signatures, and completes all required checklist items including the release impact determination.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/query-cache-find-findall-options

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

@nx-cloud

nx-cloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit d4e651d

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

☁️ Nx Cloud last updated this comment at 2026-06-04 11:29:10 UTC

@sukvvon sukvvon self-assigned this Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 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 Jun 4, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: d4e651d

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.11 KB (0%)
react minimal 9.08 KB (0%)

@sukvvon sukvvon merged commit 3270e09 into main Jun 4, 2026
9 checks passed
@sukvvon sukvvon deleted the docs/query-cache-find-findall-options branch June 4, 2026 11:35
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