Polling does not stop after unmounting query
dylanwulf opened this issue · 3 comments
dylanwulf commented
Issue Description
When I mount a polling query and then later unmount it, I would expect the polling to stop. But instead the polling seems to continue.
Link to Reproduction
https://github.com/dylanwulf/react-apollo-error-template/tree/polling-doesnt-stop
Reproduction Steps
- Start my reproduction on branch
polling-doesnt-stop
- Open the console
- Click the "Toggle Polling" button to start polling
- See the polling query log to the console
- Click the "Toggle Polling" button again to stop polling
- See that the polling query continues being logged to the console
@apollo/client
version
tried 3.7.12 & 3.9.9, problem exists in both
jerelmiller commented
Thanks for the report @dylanwulf! We've got 3.10 in rc that we'll be releasing next week. We'll see if we can take a look at this sometime after that goes out 🙂