I'm having a recurrent problem with react query. On some queries, the query says "fetching" (blue color), but the request to the server "doesn't go through". It's "suspended" or something. And I tried console.logging on my nodeJS controller (associated with the GET endpoint), but the function isn't even called.
This is quite annoying (and to be clear, this is with new queries which aren't stale or cached).
This is my query:
const postDetails = useQuery(
["post", postId],
async () =>
await fetch(
"http://localhost:5000/api/post/id/" + postId
).then((res) => res.json()),
{
onSuccess: (data) => {
console.log(data);
},
}
);
This is what React Query Devtools says:
This is what the network tab says:
Thanks in advance.

