You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thank you for your work on Villus. I made the switch recently and I'm delighted!
I just noticed that if I have a paused query, with a reactive pause depending on a reactive variable, like
constcount=ref(0);constGetTodos=` GetTodos ($count: Int!) { todos { id title } }`;const{ data }=useQuery({query: GetTodos,variables: ref({ count }),paused: ()=>count.value===0,});
then when the value of the variable is update so that paused.value becomes false, the query is fired twice (I guess the update of variables and of paused both trigger a refetch, or there might be some race condition). This also happens using paused: ({ count }) => count === 0.
Hi! Thank you for your work on Villus. I made the switch recently and I'm delighted!
I just noticed that if I have a paused query, with a reactive pause depending on a reactive variable, like
then when the value of the variable is update so that
paused.value
becomesfalse
, the query is fired twice (I guess the update ofvariables
and ofpaused
both trigger a refetch, or there might be some race condition). This also happens usingpaused: ({ count }) => count === 0
.Here is a MWE (click on the button and check the console logs): https://stackblitz.com/edit/vitejs-vite-xejziegs?file=src%2Fcomponents%2FHelloWorld.vue
I do not know if this behavior is expected (it is not a big deal in my case, because the second fetch uses the cache).
The text was updated successfully, but these errors were encountered: