writeOperation

abstract suspend fun <D : Operation.Data> writeOperation(operation: Operation<D>, data: D, errors: List<Error>? = null, customScalarAdapters: CustomScalarAdapters = CustomScalarAdapters.Empty, cacheHeaders: CacheHeaders = CacheHeaders.NONE, publish: Boolean = false): Set<String>

Writes an operation to the store.

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

Return

the changed field keys

Parameters

operation

the operation to write

data

the operation data to write

errors

the operation errors to write

publish

whether to notify watchers of the changes

See also


abstract suspend fun <D : Operation.Data> writeOperation(operation: Operation<D>, dataWithErrors: DataWithErrors, customScalarAdapters: CustomScalarAdapters = CustomScalarAdapters.Empty, cacheHeaders: CacheHeaders = CacheHeaders.NONE, publish: Boolean = false): Set<String>

Writes an operation to the store.

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

Return

the changed field keys

Parameters

operation

the operation to write

dataWithErrors

the operation data to write as a DataWithErrors object

publish

whether to notify watchers of the changes

See also