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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Setting up a pollInterval on a component in one page should stop that interval when going to another page (or unmounting that component) and start a pollInterval on that new page (mounted component) for the same query.
Actual outcome:
I have a page /a with ComponentA with a useQuery for QUERY. It has a pollInterval 7000. I go to page /b with ComponentB which also has a useQuery for the same QUERY. It has also a pollInterval. I then see in Network Tab that the polling frequency increases. When I navigate even further between the pages the polling frequency can increase even more, firing every second or faster.
How to reproduce the issue:
Version
I'm using react-apollo 3.1.3 so #3485 should work
Actually I have just observed that even if I turned off polling on other components (pages) and left only one this issue is still there. Meaning I go to a page which doesn't have polling (but has the given query) and polling continues and starts to fire more frequently.
Closing as the issue is related to when a GraphQL error exists then polling starts to increase and also continues when the component umounts (polling continues on pages where it doesn't even exist). After upgrading to Apollo CLient 3.0@beta everything works fine for now.
Intended outcome:
Setting up a pollInterval on a component in one page should stop that interval when going to another page (or unmounting that component) and start a pollInterval on that new page (mounted component) for the same query.
Actual outcome:
I have a page /a with ComponentA with a useQuery for QUERY. It has a pollInterval 7000. I go to page /b with ComponentB which also has a useQuery for the same QUERY. It has also a pollInterval. I then see in Network Tab that the polling frequency increases. When I navigate even further between the pages the polling frequency can increase even more, firing every second or faster.
How to reproduce the issue:
Version
I'm using react-apollo 3.1.3 so #3485 should work
System:
OS: Linux 5.0 Ubuntu 18.04.3 LTS (Bionic Beaver)
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
Browsers:
Chrome: 79.0.3945.117
Firefox: 72.0.1
npmPackages:
apollo-boost: ^0.4.7 => 0.4.7
apollo-cache-inmemory: ^1.6.5 => 1.6.5
apollo-client: ^2.6.8 => 2.6.8
apollo-link: ^1.2.13 => 1.2.13
apollo-link-error: ^1.1.12 => 1.1.12
apollo-link-http: ^1.5.16 => 1.5.16
next-with-apollo: ^4.3.0 => 4.3.0
react-apollo: ^3.1.3 => 3.1.3
The text was updated successfully, but these errors were encountered: