graphql-flutter
graphql-flutter copied to clipboard
Ability to cancel a query
Is your feature request related to a problem? Please describe.
We are using the latest Beta ...
We have a "costly" query that, alas, the user is calling over and over before the first one is even completed causing resources etc. to be used (and a huge slowdown on the system). If the user submits a 2nd (or 3rd) query we'd like to cancel the prior one and submit the new one ..
Describe the solution you'd like
I believe Apollo has a .cancel() method on the Query object. That seems like a good solution :)
Describe alternatives you've considered We already have a keyboard debounce in place (300ms) but that isn't helping enough, the user is still able to submit a ton of queries and tie up the system.
Additional context Can't think of anything.
You might be able to use the socket client, as it implements cancel.
As for GQL_STOP
in the http client, support could take a while.
But if you can get it working with the socket subscription, an example would help our docs a lot 😄
Hello there, is this already implemented?
@normancarcamo no, if it was implemented this issue would be closed.
We are looking something like dio's cancel token, right?
same issue any update for this stuff? How is possible to cancel the previous request before I create a new one to reduce the workload to the backend side?
@micimize any updates ?
any updates ?
No, this is hide for all the issue of the repository, so we don't start to work on it. at list we can start to look into it now
any updates ?
No, this is hide for all the issue of the repository, so we don't start to work on it. at list we can start to look into it now
@vincenzopalazzo We are also very interested in this feature. Currently, implementing product search with GraphQL we have to ignore responses from all previous pending requests. It doesn't seem good due to performance reasons.
@vincenzopalazzo We also need this feature for our app. Please consider this in future releases.
Hey any updates on that one here?
We didi not discuss about it yet, but PR are always welcome
Any update guys?