Skip to content
Discussion options

You must be logged in to vote

not sure what fetch is doing here but we can clearly see that the fetch call hangs, not the mutation itself:

mutationFn: async () => {
    console.log('mutation starts')
  const result = await fetch("https://192.178.26.5:8000/some-path-that-never-existed", {
    method: "PATCH",
  })
    console.log('mutation ends')
    return result
},

this will log mutation starts, but not mutation ends. So the problem lies within the fetch call itself, not react query.

My browser devtools also show a never ending pending request in the devtools

so, 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 fetch call without reac…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@HenrikZabel
Comment options

@TkDodo
Comment options

@HenrikZabel
Comment options

@TkDodo
Comment options

Answer selected by HenrikZabel
@TkDodo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants