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