Skip to content

Conversation

@TkDodo
Copy link
Collaborator

@TkDodo TkDodo commented Aug 12, 2025

previously, revertState was always set back to undefined when new data comes in. However, when the update is done with a manual setQueryData (like it can happen from streamedQuery), we don’t actually want to go back to undefined, but capture the “previous state” for later reverts.

The intention of setting revertState to undefined was to cleanup “after the fetch was successful”, but a manual setQueryData does not mean we’re no longer fetching

@TkDodo TkDodo changed the title fix: have revertState capture manual updates fix(core): have revertState capture manual updates Aug 12, 2025
@nx-cloud
Copy link

nx-cloud bot commented Aug 12, 2025

View your CI Pipeline Execution ↗ for commit eed7784

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 2m 42s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 34s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-14 07:54:38 UTC

@codecov
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.30%. Comparing base (9ae770b) to head (eed7784).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #9558       +/-   ##
===========================================
+ Coverage   45.18%   59.30%   +14.11%     
===========================================
  Files         208      137       -71     
  Lines        8319     5558     -2761     
  Branches     1879     1495      -384     
===========================================
- Hits         3759     3296      -463     
+ Misses       4113     1958     -2155     
+ Partials      447      304      -143     
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental 87.00% <ø> (ø)
@tanstack/eslint-plugin-query ∅ <ø> (∅)
@tanstack/query-async-storage-persister 43.85% <ø> (ø)
@tanstack/query-broadcast-client-experimental 24.39% <ø> (ø)
@tanstack/query-codemods ∅ <ø> (∅)
@tanstack/query-core 97.69% <100.00%> (+<0.01%) ⬆️
@tanstack/query-devtools 3.48% <ø> (ø)
@tanstack/query-persist-client-core 79.47% <ø> (ø)
@tanstack/query-sync-storage-persister 84.61% <ø> (ø)
@tanstack/query-test-utils ∅ <ø> (∅)
@tanstack/react-query 95.95% <ø> (ø)
@tanstack/react-query-devtools 10.00% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query 78.13% <ø> (ø)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query 87.58% <ø> (ø)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <ø> (ø)
@tanstack/vue-query 71.10% <ø> (ø)
@tanstack/vue-query-devtools ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 14, 2025

More templates

@tanstack/angular-query-devtools-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@9558

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@9558

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@9558

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@9558

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@9558

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@9558

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@9558

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@9558

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@9558

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@9558

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@9558

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@9558

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@9558

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@9558

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@9558

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@9558

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@9558

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@9558

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@9558

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@9558

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@9558

commit: eed7784

@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2025

Sizes for commit eed7784:

Branch Bundle Size
Main
This PR

@TkDodo TkDodo merged commit 4806dfa into main Aug 14, 2025
7 checks passed
@TkDodo TkDodo deleted the feature/revertState-with-manual-updates branch August 14, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants