Whats the best way to remove a list from ApolloStore on Kotlin?
This is the cached list:
"newTab({"cursor":0})" : [
CacheKey(Post:217)
CacheKey(Post:216)
CacheKey(Post:215)
CacheKey(Post:214)
CacheKey(Post:213)
CacheKey(Post:212)
CacheKey(Post:211)
CacheKey(Post:210)
CacheKey(Post:209)]
is there a better way then calling
apolloStore.remove(List)
Can I maybe search for “newTab” list in the cache and just simply remove all the items that are in this list?
Because I want a CacheFirst behaviour most of the time except when I do the Swip to Refresh pull.
Doing it like this didn’t work:
var fetchPolicy = FetchPolicy.CacheFirst
if(isRefresh){
fetchPolicy = FetchPolicy.NetworkOnly
}