Skip to content

docs(query-core): document cache subscription events - #11266

Open
spaansba wants to merge 3 commits into
TanStack:mainfrom
spaansba:docs/cache-subscription-events
Open

docs(query-core): document cache subscription events#11266
spaansba wants to merge 3 commits into
TanStack:mainfrom
spaansba:docs/cache-subscription-events

Conversation

@spaansba

@spaansba spaansba commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

Motivation

I wanted to detect when a paused mutation resumed. While looking into it (thanks opus), I found that this is possible through an updated event with a continue action.

The cache subscription docs currently show very little about the available event types, actions, and their payloads. I am not sure whether tables are the best way to present this information, or whether these action details are intended to be part of the documented public API in the first place. But I could really have used them when looking into this.

✅ 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
    • Expanded mutationCache.subscribe documentation with event types, event-specific properties, mutation action types, and paused-mutation resume examples.
    • Updated the callback example to require a mutation cache event.
    • Expanded queryCache.subscribe documentation with cache and observer events, action types, and paused-query resume examples.

@coderabbitai

coderabbitai Bot commented Aug 23, 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: 255f3276-700e-4f63-8960-a6bf1941dbd1

📥 Commits

Reviewing files that changed from the base of the PR and between 388bbaf and 511c8ea.

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

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The cache reference documentation now describes subscription event unions, event-specific properties, action types, paused-operation resume examples, and the required MutationCache callback event parameter.

Changes

Cache subscription references

Layer / File(s) Summary
MutationCache subscription reference
docs/reference/MutationCache.md
Documents mutation subscription events, event-specific properties, update action types, paused-mutation resume detection, and the required callback event parameter.
QueryCache subscription reference
docs/reference/QueryCache.md
Documents query subscription events, event payloads, update action types, and paused-query resume detection.

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

Merge Risk: ⚪ Minimal · up to 511c8

This change only documents cache subscription events and does not alter published code or runtime behavior; no actionable merge-blocking risk remains.

Suggested reviewers: antoliny0919

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
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.
Description check ✅ Passed The description explains the documentation changes, includes the required checklist, and correctly identifies the change as docs-only.
Title check ✅ Passed The title clearly and concisely describes the documentation changes to cache subscription events.
✨ 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