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

Remove unused queryId after fetchMore #4440

Merged
merged 2 commits into from
Apr 9, 2019

Conversation

doomsower
Copy link
Contributor

This PR addresses issue #2286 (and #3901)

Every call of fetchMore on ObservableQuery causes another query to be created my queryManager. After this query gets executed, its result is merged into parent query's result. But child query is not disposed, it just sticks around in queryManager.queries/ queryManager.queryStore and does nothing. As far as I understand, this is a leak, and this query should be disposed.

Please correct me if this is desired behavior, or if this change can produced any unexpected side-effects.

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@benjamn benjamn changed the title remove unused queryId after fetchMore Remove unused queryId after fetchMore Apr 8, 2019
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sowing that friendly doom, @doomsower!

@benjamn benjamn merged commit 14e0b96 into apollographql:master Apr 9, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants