Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polling not working #8762

Open
UmangThapliyal opened this issue Sep 8, 2021 · 3 comments
Open

Polling not working #8762

UmangThapliyal opened this issue Sep 8, 2021 · 3 comments

Comments

@UmangThapliyal
Copy link

UmangThapliyal commented Sep 8, 2021

Intended outcome:
I am using apollo-client : 3.4.10 and when user perform some action say clicking on button I want to start polling and stop it after certain period of time, I expect it to work as expected

Actual outcome:
Polling not getting triggered when I manually perform using startPolling

How to reproduce the issue:
I have added codesnabox which replicate the behaviour in our application for checking it

https://codesandbox.io/s/apollo-react-hooks-usequery-bug-forked-edr6e?file=/src/index.js

Versions
3.4.10

@brainkim
Copy link
Contributor

@UmangThapliyal I think this is as designed. When the results are the same, as would be the case with the artsy API you’re using, the component and onCompleted will not be called. You can confirm that polling is actually occurring in the network tab.

I do think it’s mildly confusing that nothing is logged when you poll and get the same results.

@UmangThapliyal
Copy link
Author

@UmangThapliyal I think this is as designed. When the results are the same, as would be the case with the artsy API you’re using, the component and onCompleted will not be called. You can confirm that polling is actually occurring in the network tab.

I do think it’s mildly confusing that nothing is logged when you poll and get the same results.

@brainkim thanks will check and update in issue

@jp928
Copy link

jp928 commented Oct 3, 2021

@UmangThapliyal I think this is as designed. When the results are the same, as would be the case with the artsy API you’re using, the component and onCompleted will not be called. You can confirm that polling is actually occurring in the network tab.

I do think it’s mildly confusing that nothing is logged when you poll and get the same results.

I am using 3.3.x and I have logic in onCompleted, any workaround to trigger it in 3.4.x?

@hwillson hwillson added the 🔍 investigate Investigate further label May 31, 2022
@bignimbus bignimbus removed the 🏓 awaiting-contributor-response requires input from a contributor label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants