---
title: "Comment by Schalk on \"Fix: Cache data may be lost when replacing the getAllPosts field of a Query object in Apollo client.\" | Hashnode"
description: "Thanks, was looking for this solution for 2 days now. Works like a charm."
url: "https://hashnode.com/posts/fix-cache-data-may-be-lost-when-replacing-the-getallposts-field-of-a-query-object-in-apollo-client/5f8d81b7d58df13bb29172fe/comment/60e2c5c703707d644a5047b6"
---

[Discussion](https://hashnode.com/posts/fix-cache-data-may-be-lost-when-replacing-the-getallposts-field-of-a-query-object-in-apollo-client/5f8d81b7d58df13bb29172fe)

Comment [Fix: Cache data may be lost when replacing the getAllPosts field of a Query object in Apollo client.](https://hashnode.com/posts/fix-cache-data-may-be-lost-when-replacing-the-getallposts-field-of-a-query-object-in-apollo-client/5f8d81b7d58df13bb29172fe)

[Schalk](https://hashnode.com/@Heizen)

[Jul 5, 2021](https://hashnode.com/posts/fix-cache-data-may-be-lost-when-replacing-the-getallposts-field-of-a-query-object-in-apollo-client/5f8d81b7d58df13bb29172fe/comment/60e2c5c703707d644a5047b6)

Thanks, was looking for this solution for 2 days now. Works like a charm.

[Chidera Paul Ugwuanyi](https://hashnode.com/@chidera)

[Jul 7, 2021](https://hashnode.com/posts/fix-cache-data-may-be-lost-when-replacing-the-getallposts-field-of-a-query-object-in-apollo-client/5f8d81b7d58df13bb29172fe/comment/60e2c5c703707d644a5047b6#reply-60e5a8dee9aeb8301a6a9ca7)

Glad it helped
