apollographql / apollo-kotlin

:rocket:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.75k stars 652 forks source link

ApolloStore#clearAll method does not trigger changes to ApolloStore.RecordChangeSubscriber #2532

Open piotr-pawlowski opened 4 years ago

piotr-pawlowski commented 4 years ago

Summary It is the same problem with remove method - it does not trigger event as well. #2505

Version All versions.

martinbonnin commented 4 years ago

Similarly to https://github.com/apollographql/apollo-android/issues/2505, I guess we need a clearAllAndPublish?

piotr-pawlowski commented 4 years ago

Yes, it seems to be the best solution.

Hospes commented 3 months ago

any updates here ? seems like still apolloStore.clearAll() doesn't trigger publish and observers don't show empty results

BoD commented 3 months ago

@Hospes At the moment clearAll() still doesn't publish to observers, so you'll need to handle that with your own mechanism. I've added this issue to the backlog of issues we want to tackle as part a cache improvement effort.