-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
clearStore() and apollo-link-dedup prevent further queries #3792
Comments
Sounds like a dupe of #3766 |
Has this perhaps been fixed somewhere else? Having some trouble reproducing this It's hooked up to an endpoint that's set to delay a response by 1.5seconds |
Thanks for reporting this. There hasn't been any activity here in quite some time, so we'll close this issue for now. If this is still a problem (using a modern version of Apollo Client), please let us know. Thanks! |
Hallo,
I found the following bug that I would consider severe:
when you use clearStore() and apollo-link-dedup, queries may be stuck forever and never be sent anymore.
How to reproduce the issue:
Create a GraphQL backend that delays a query by several seconds. Then, immediately after sending the query, call clearStore(). In the browser console you should see the warning that there are still in-flight requests. Then try send the query again - it won't be sent to the server anymore! The previous result is also never received and this query is stuck forever until you reload the browser tab.
Analysis so far
The cleanup()-method of the dedup-link is never called and therefore the request observable is stored forever in the inFlightRequestObservables-variable. clearStore() cancels all requests and I think that's the reason why the dedup-link isn't subscribed to it anymore.
Versions
apollo-client 2.3.2
apollo-link-dedup 1.0.9
Does anybody have an idea what I could do to prevent this?
The text was updated successfully, but these errors were encountered: