writeOptimisticUpdates
Writes an operation to the optimistic store.
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
the operation to write
the operation data to write
a unique identifier for this optimistic update
whether to notify watchers of the changes
See also
Writes a fragment to the optimistic store.
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
the fragment to write
the root where to write the fragment data to
the fragment data to write
a unique identifier for this optimistic update
whether to notify watchers of the changes