rollbackOptimisticUpdates

suspend fun rollbackOptimisticUpdates(mutationId: Uuid, publish: Boolean = false): Set<String>

Rollbacks optimistic updates.

Optimistic updates must be enabled to use this method. To do so, pass enableOptimisticUpdates = true to the CacheManager constructor or normalizedCache extension.

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

Return

the changed field keys

Parameters

mutationId

the unique identifier of the optimistic update to rollback

publish

whether to notify watchers of the changes

See also