I am using apollo graphql in my processed application. Let's say I have the following query:
query ListQuery($filter: String!) {
items(filter: $filter) {
id
name
}
}
This query allows me to query a list of items using a filter. Let's say I used filter string A, and then used filter string B. The cache will now contain two entries: ListQuery (A) and ListQuery (B).
Now let's say I use a mutation to add a new element. How to remove all cached requests from the cache? Therefore, in this case, I want to remove both ListQuery (A) and ListQuery (B) from the cache.
How can i do this?
source
share