method

BoundTypedCollection.DiscardDraft

DiscardDraft resets pending working values to the published document.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
idstringThe id value.
optionsTypedMutationOptionsThe options value.

Returns

The declared result.

(Document, error)

Full signature

func (collection BoundTypedCollection[Document, Create, Update, Draft]) DiscardDraft( ctx context.Context, id string, options TypedMutationOptions, ) (Document, error)

Source core/typed_local.go:119

Related types

  • BoundTypedCollection

    Typed collection methods for strict writes, incomplete working drafts, publication, reads, and deletion.

  • TypedMutationOptions

    Actor, draft intent, expected revision, locale, and response controls for a generated Go mutation.