Closed
Description
Describe the bug
Resuming a mutation from the cache does not set isPaused
to true.
I suspect that it could come from the this.#retryer?.continue() not being set yet ->
https://github.com/TanStack/query/blob/main/packages/query-core/src/mutation.ts#L156
Your minimal, reproducible example
https://stackblitz.com/github/RaphaelGimenez/tanstackquery-ispaused-issue?file=README.md
Steps to reproduce
The example is running a json server and timeout all !GET request.
- Open Stackblitz project, start script is set to
preview
- Go to Stackblitz port
4173
- Toggle online by clicking the following button and delete post
- Mutation is paused
- Refresh the preview -> mutation is resumed but
isPaused = true
- Toggle offline / online -> mutation is correctly unpaused
Expected behavior
Resumed mutations from the persister should correctly set isPaused
to false
.
How often does this bug happen?
Every time
Screenshots or Videos
Screencast.From.2025-04-11.17-18-41.webm
Platform
- OS: Fedora
- Browser: Firefox, Chromium
Tanstack Query adapter
react-query
TanStack Query version
5.72.2
TypeScript version
No response
Additional context
No response