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

Loading stuck when "cancelling" queries #4

Closed
maggo opened this issue Mar 23, 2018 · 1 comment
Closed

Loading stuck when "cancelling" queries #4

maggo opened this issue Mar 23, 2018 · 1 comment

Comments

@maggo
Copy link

maggo commented Mar 23, 2018

First thanks for this library! I encountered this bug where the loading prop is stuck to true when quickly clicking around my interface and cancelling/unmounting a query during the request.

I looked into the reducer logic and it seems that onSuccess is never called and therefor doesn't reset numPendingRequests to 0

I'll set up a test case later, but wanted to report already in case you have an idea :)

@amannn
Copy link
Member

amannn commented Mar 23, 2018

Ah, I had a similar story with apollo 1.0 which was based on redux back then. I noticed that queries don't necessarily have a result or error action that is following its init action. For mutations this was no problem however.

Since the architecture of apollo 2.0 is now based on observables, there should be solution for this. I just did a quick experiment and I think I know how this can be fixed. I'll keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants