-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix(query-core): fix combine not updating when queries change with stable reference #9954
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
🦋 Changeset detectedLatest commit: 291afec 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 |
📝 WalkthroughWalkthroughAdds tracking of query hashes in QueriesObserver to detect structural changes and force re-evaluation of a stable Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)packages/query-core/src/queriesObserver.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 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 |
|
View your CI Pipeline Execution ↗ for commit 291afec
☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9954 +/- ##
===========================================
+ Coverage 45.82% 59.83% +14.00%
===========================================
Files 200 129 -71
Lines 8525 5749 -2776
Branches 1977 1581 -396
===========================================
- Hits 3907 3440 -467
+ Misses 4158 1994 -2164
+ Partials 460 315 -145 🚀 New features to boost your workflow:
|
🎯 Changes
Fixes #8781
Problem
With stable
combine, results lag one step behind when queries change.This happens because
getOptimisticResultruns beforesetQueriesupdatesthis.#result.Solution
Pass
queryHashesto#combineResultto detect query changes beforethis.#resultis updated.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.