-
-
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(query-core): respect initialData for queryClient.ensureQueryData #8425
Conversation
we used to call `getQueryData` before queryCache.build(), but building is what creates the query and potentially adds initialData. I tried to make that more obvious by reading directly from `query.state.data`
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 28b6fcc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8425 +/- ##
===========================================
+ Coverage 46.21% 63.03% +16.81%
===========================================
Files 198 134 -64
Lines 7510 4804 -2706
Branches 1712 1344 -368
===========================================
- Hits 3471 3028 -443
+ Misses 3664 1536 -2128
+ Partials 375 240 -135 |
we used to call
getQueryData
before queryCache.build(), but building is what creates the query and potentially adds initialData. I tried to make that more obvious by reading directly fromquery.state.data
fixes #8418