I am puzzled by this.
Suppose I currently have a the following query:
export const getPokemon = gql`
query getPokemon($filters: AssetFilters) {
pokemon(filters: $filters) {
name,
generation,
exp
}
}`;
By default no filters are passed in so everything is returned.
Now, I would like to refetch with a filter as such:
this.props.refetch({
filters: {
generation: '3rd'
}
});
The above seems to override the local cache of the original query!
I am writing an offline-first app and I would like these different filtering permutations to be cached separately rather than override the original cache.
How can I overcome this caching difficulty and have Apollo cache these queries with different arguments separately?