removeFragment

suspend fun <D : Fragment.Data> ApolloStore.removeFragment(fragment: Fragment<D>, cacheKey: CacheKey, data: D, cacheHeaders: CacheHeaders = CacheHeaders.NONE, publish: Boolean = false): Set<String>

Removes a fragment from the store.

This is a synchronous operation that might block if the underlying cache is doing IO.

Pass publish = true or call ApolloStore.publish with the returned keys to notify any watchers.

Return

the set of field keys that have been removed.

Parameters

fragment

the fragment of the data to remove.

cacheKey

the root where to remove the fragment data from.

data

the data to remove.

publish

whether to notify watchers of the changes.