-
So I encountered something problematic. It seems that there might be some kind of race condition. So useLazyQuery is defined as extending useQuery with load to make it manually executable as far as I understood. https://v4.apollo.vuejs.org/api/use-lazy-query.html So what I did is, onSubmit I fired the But when I navigate away from the page and back again via history, another click does fire the load, but the refetch does nothing. After some investigation I discovered that the changes load does to the query object in the client where fired after refetch, and so refetch had an empty query so it did nothing. load is not async so I was wondering what could have caused that kind of behavior. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think I went into the |
Beta Was this translation helpful? Give feedback.
I think I went into the
onResult
trap.refetch
is actually not necessary since load will get a new result, but onResult only fires for the first network-only result so it stops after that.