-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(vue-query): avoid use sync
for watch
that cause unnecessary requests
#8443
fix(vue-query): avoid use sync
for watch
that cause unnecessary requests
#8443
Conversation
queryKey
match the current value of ref used insidequeryKey
match the current value of ref used inside
View your CI Pipeline Execution ↗ for commit 0ec37c7.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8443 +/- ##
===========================================
+ Coverage 46.26% 71.01% +24.74%
===========================================
Files 199 19 -180
Lines 7532 483 -7049
Branches 1720 136 -1584
===========================================
- Hits 3485 343 -3142
+ Misses 3668 110 -3558
+ Partials 379 30 -349
|
queryKey
match the current value of ref used insidesync
for watch
that cause unnecessary requests
It seems this change might have broken I'll look into it further, but for now I've noticed that when a query is marked as stale and used in |
Never mind, the issue was on my side. Here's a "reproduction" that can be used later to ensure everything keeps working. 👍🏻 https://codesandbox.io/p/sandbox/issue-tanstack-query-queries-y6rlg6 |
Linked issue
enabled
#5996Description
In PR #7942, attempting to change
watch
's{ flush: 'sync' }
to{ flush: 'post' }
or removing it might lead to the same issues as #5910 and #5996.This PR removes
{ flush: 'sync' }
and ensures proper handling ofrefresh
to prevent the issue in #5910 wherequeryKey
retrieves stale data.If there are any considerations I may have missed, please kindly let me know. Thank you!