method

BoundTypedCollection.PublishChanges

PublishChanges applies input and publishes the result in one operation. A published document in a versioned collection changes this way; Update refuses it with publish_required.

Arguments

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

Returns

The declared result.

(Document, error)

Full signature

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

Source core/typed_local.go:134

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.