Mutations making two parallel requests #1397
Replies: 1 comment 3 replies
-
Are those requests that you're seeing in the devtools, i.e. two
Typically, if you suspect that this may have to do with changing variables, all variables are converted into a hash which is combined with the query document to form a unique key for the operation. The hash is based ont he stringified variables, which is sorted and kept stable, so unless it's changing that's probably not the issue? Although it's interesting that you've noticed some varying behaviour here. Could it be that some options for |
Beta Was this translation helpful? Give feedback.
-
I've noticed that almost all my
useQuery
queries result in two requests. The requests are identical and one starts a few milliseconds after the other. Before I dig into the guts of the thing, is there anything obvious that would cause this? I'm usingcache-and-network
request policy, but I see the same behaviour withcache-first
. I'm not using Suspense.One thing I've noticed is the queries that don't result in two requests are those that don't accept variables, though that might be a coincidence. I'm seeing this in development and production builds.
Beta Was this translation helpful? Give feedback.
All reactions