-
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
fetchMore leaks watched queries #2286
Comments
Same issue here with
|
I have open issue with the same problem. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Apollo Client! |
I haven't yet upgraded to Apollo Client 2.0. Can anybody confirm whether this is still a problem there? AFAIK it has not been fixed. |
@bgentry same problem with apollo client 2.0. Any suggestion how to solve this. I tried to look into the apollo code, but don‘t really understand it. This is kind of a blocking issue for us. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Apollo Client! |
Still an issue afaik. Is there a label that can be put on this so it's acknowledged as a real issue and the bot doesn't try to auto-close it every 3 weeks? |
The issue is still the same. We went through the hassle of installing 2.0 and the problem continues. We have build some workaround now but it is not a real solution. |
Is there any update on this? It's a pretty yucky leak. |
Can someone confirm whether this behaviour is expected or not? |
Hi! Could someone send a PR with a failing test for this? That would be a great start to a fix! |
We haven't heard back regarding a reproduction, so closing for now. Thanks! |
@hwillson do you have reason to believe this is actually fixed? The Unless that’s been fixed the function is just not safe to use in a production app. |
@bgentry I'm not sure if this has been fixed (or if this is an issue). I'm just triaging the issue backlog, and anything with a That being said, is there any chance you can demonstrate this happening in the form of a small runnable reproduction? Attempting to re-create this by using Apollo Dev Tools and watching the inspector doesn't necessarily point to this being an Apollo Client problem. E.g., this could be an Apollo Dev Tools issue. If you're able to put together a reproduction using |
Last time I tried to put a reproduction together I wasn’t actually sure where to look for similar tests or how to figure out the list of active queries. If there are existing tests for Maybe one of the others can chime in on this. I don’t actively use that function anymore because it was (is?) fundamentally broken for so long. In either case I don’t know the Apollo internals at all these days so it wouldn’t be that easy for me to dig into this. |
I'm using
fetchMore
on anObservableQuery
that I'm already subscribed to. I'm not starting any new watchQueries. However, the Apollo Chrome inspector shows that each time I usefetchMore
to fetch another page of results, a new "watched query" appears in the list. These remain even after I unsubscribe from my original subscription. Is this expected? Is there something else I need to do to clean up old watchQueries when usingfetchMore
?This is all happening in ember-apollo-client, so it's entirely possible there's a bug or behavior in that integration specific to
fetchMore
because this is the first time I'm trying to use it. Digging through react-apollo though I couldn't find anything specific to deal with this sort of thing. And there doesn't appear to be any documentation describing the behavior I'm seeing.Side note: I am the maintainer of ember-apollo-client, so I'm quite interested in understanding and fixing this issue.
Intended outcome:
Use
fetchMore
to load the next page of results. Expected that the "watched queries" list does not grow because I'm not actually starting a new query or making a new subscription to anObservableQuery
.Actual outcome:
The Apollo Chrome inspector shows that each time I use
fetchMore
to fetch another page of results, a new "watched query" appears in the list. These remain even after I unsubscribe from my original subscription (i.e. when I change routes, all of them stick around except one).Is this expected? Is there something else I need to do to clean up old watchQueries when using
fetchMore
?How to reproduce the issue:
Watch the Apollo Chrome inspector's "watched queries" list while you use
fetchMore
in any app that does so.Version
The text was updated successfully, but these errors were encountered: