method
LocalAPI.DiscardDraft
DiscardDraft atomically resets a pending working version to the live head. It requires Update access and an expected working revision when provided.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | The ctx value. |
collection | string | The collection value. |
id | string | The id value. |
options | MutationOptions | The options value. |
Returns
The declared result.
(store.Document, error)Full signature
func (local *LocalAPI) DiscardDraft(
ctx context.Context,
collection,
id string,
options MutationOptions,
) (store.Document, error)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
MutationOptionsAuthorization, optimistic concurrency, response population, create status, and locale controls for one write.
DocumentA stored document with status and version metadata.