Apollo-client: Apollo Client keeps the list of all executed mutations in mutationStore and never cleans it

Created on 26 Jan 2021  路  2Comments  路  Source: apollographql/apollo-client

Each executed mutation stays in the mutationStore forever, it might cause memory leaks.
Apollo needs to clean the mutationStore records when mutations is done.

Most helpful comment

Thank you @benjamn, we use it in our custom DevTools and realized this problem. Great to hear it doesn't cause any issue in production code. You can close the issue, we can manage this in our DevTools by ourselves.

All 2 comments

@smykhailov Starting in @apollo/[email protected], thanks to commit ad4be6e31b24daa14d7cfa55221707af30bb0e54 in https://github.com/apollographql/apollo-client/pull/7161, we no longer create the queryManager.mutationStore unless it's being used by devtools, so I think this may not be a problem any longer, if you update?

Thank you @benjamn, we use it in our custom DevTools and realized this problem. Great to hear it doesn't cause any issue in production code. You can close the issue, we can manage this in our DevTools by ourselves.

Was this page helpful?
0 / 5 - 0 ratings