-
Notifications
You must be signed in to change notification settings - Fork 170
Active Queries never go away #815
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
Comments
Queries made via apolloClient.query() are not shown in the devtool. But request made via watchQuery are. Also the extension GraphQL Network correctly show the requests made via query(). |
@dc-p8 unfortunately this is a known limitation of the current extension implementation (#588). I've got some ideas on how to approach this to provide one-off queries in the devtools in an intuitive way, but we've not prioritized it quite yet. I'm hoping we can look at this soon 🙂. If you have any additional comments, I'd suggest putting it in #588 since that is more geared toward the issue you're talking about. @kaysond thanks for your patience on this issue. I'm curious, do you still see this issue in recent versions of the devtools? I believe this issue may have been fixed, but would love to make sure before I close this. |
It's been a long time since I've looked at this sorry. |
Its ok! I haven't seen this surface in quite some time so I'm going to assume its been solved at this point. I'd be happy to reopen if we get more reports of this happening. Have a great day! |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
Intended outcome:
Active Queries should not multiply when the component is re-rendered
Actual outcome:

Every time a component that uses
useQuery()
is unmounted and re-rendered, the query is appended to the list of "Active Queries"How to reproduce the issue:
I posted some more context/questions on the forums here: https://community.apollographql.com/t/im-new-to-apollo-ive-built-a-functional-app-server-client-and-now-i-have-a-few-questions-about-queries-caching-and-dev-tools/2793/2
It's entirely possible that this is user error, but as I've not received any responses on the forums, I'm creating an issue here as well in case it is in fact an extension issue.
If it's not an obvious bug or obvious user error, I can try to create a minimal repro.
The gist of it is that I have conditionally rendered components (like modals) using
useQuery()
. If I render that component, it adds a query to "Active Queries". If I destroy the component, the Active Query stays there. The same thing happens if I change the props to the component (which changes the variable passed to the query).I don't have a massive memory leak, so I don't expect that the queries are all actually sitting there, active, but it makes the extension very difficult to use.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: