is there a way to cancel a query in done through apollo client, a graphql query

Viewed 217

I made this autocomplete field that can be filtered by another dropdown field.

On initial load the autocomplete field loads a bunch of data through graphQl. The problem is the data on initial load is huge and takes a while for this to finish. On the meantime users can opt to filter this autocomplete list and thus making another request . The filtered request finishes faster and the data from the initial request overwrites the filtered results.

I am already using debounce for this one.

Is there a possible way to cancel the a request done through apollo-client? thanks

0 Answers
Related