Closed AlexMoutonNoble closed 3 years ago
Poll interval is an option
only because it is an optional argument. From the official docs, it looks like you should be passing 0 if you don't want it to poll: https://www.apollographql.com/docs/react/data/queries/#polling
Also, it looks like there's a stopPolling
method you can call on the queryResult
?
Gonna close this as I think the suggested solution will work.
Hi folks I have been using react state to gate pollInterval on some queries, as some tasks progress on the back end. It took me a while to figure that None does not cancel a set interval. Should it? It seems like it should?
Seems likely a one liner. I can take a look if youre interested in a PR.
Thanks Alex