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
Intended outcome:
When we made consecutive calls (with different variables) with the executionFunction from useLazyQuery hook, we are expecting the previous calls still in pending are canceled.
We had this behavior with @apollo/client@3.4.17 by using the built-in HttpLink.
Actual outcome:
With @apollo/client@3.5.5, the previous calls in pending are not longer cancelled.
@Grmiade Thanks for reporting this, I was curious if you could confirm the following:
Have you tried upgrading to the current version of Apollo Client? We are currently at 3.6.5
Your sample code seems to use math.random to generate multiple codes, but that doesn't seem to be working in the sample, could you provide a better example of what you are using to generate different country code variables or provide a sample that has a set of codes you are attempting to query at the same time so we can further troubleshoot this issue?
We are happy to take a look at this issue again as it's been a while since it was reported.
Hi @jpvajda 👋
The math.random trick does not seem to work anymore indeed. I used a random API, maybe they changed their behaviour. But it's not a problem, the issue is still here when we make consecutive pending calls.
Good news, I made some tests and since the version 3.6.8, it seems the issue is fixed. Probably thanks to #9791
Intended outcome:
When we made consecutive calls (with different variables) with the executionFunction from useLazyQuery hook, we are expecting the previous calls still in pending are canceled.
We had this behavior with
@apollo/client@3.4.17
by using the built-in HttpLink.Actual outcome:
With
@apollo/client@3.5.5
, the previous calls in pending are not longer cancelled.How to reproduce the issue:
https://codesandbox.io/s/apollo-client-3-5-5-uselazyquery-cancellation-tp7ld?file=/package.json
Get Countries
buttonVersions
@apollo/client@3.5.5
The text was updated successfully, but these errors were encountered: