-
-
Couldn't load subscription status.
- Fork 3.5k
Expose queryHash on QueryFunctionContext
#9812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* Initial plan * Add queryHash to QueryFunctionContext implementation and update tests Co-authored-by: ElliotChong-MS <[email protected]> * Add queryHash to QueryFunctionContext documentation and test Co-authored-by: ElliotChong-MS <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: ElliotChong-MS <[email protected]>
🦋 Changeset detectedLatest commit: 29723ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughIntroduces Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (10)
🧰 Additional context used🧬 Code graph analysis (3)packages/query-core/src/__tests__/query.test.tsx (1)
packages/query-persist-client-core/src/__tests__/createPersister.test.ts (1)
packages/query-core/src/__tests__/infiniteQueryBehavior.test.tsx (1)
🔇 Additional comments (4)
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. Comment |
🎯 Changes
This PR exposes
queryHashonQueryFunctionContextso query functions have first-class access to the canonical identifier of the query without recomputing the hash or performing an expensive lookup in theQueryCache. This is an additive, backward-compatible enhancement.Discussion Item: #9811
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
New Features
queryHashin their context, eliminating the need to compute or import the query hash externally.Documentation
queryHashproperty.Tests
queryHashis properly included in QueryFunctionContext across all query operations.