Mutating too long #8045
Mutating too long
#8045
-
|
I am currently testing what happens when the server is not online (so there is no connection to the server). The mutation is loading not only super long but the status is also pending. How can I abort the request when tanstack query notices that there is no connection after x seconds? |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Sep 14, 2024
Replies: 1 comment 9 replies
-
|
if there is no network connection, we pause requests until connection has been established. We return an |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


not sure what
fetchis doing here but we can clearly see that thefetchcall hangs, not the mutation itself:this will log
mutation starts, but notmutation ends. So the problem lies within thefetchcall itself, not react query.My browser devtools also show a never ending
pendingrequest in the devtoolsso, you have to find out why that is, but it has nothing to do with react-query. You would have the same problem if you just make this
fetchcall without reac…