type

TypedMutationOptions

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

Options

PropertyTypeDescription
IDstringThe ID value.
Actor*store.DocumentAuthenticated document used by access rules, paired with ActorCollection.
ActorCollectionschema.CollectionSlugThe ActorCollection value.
SystemboolTrusted server-side bypass of access rules; never infer this from an absent actor.
ExpectedRevisionintFence an existing working revision so a concurrent save or lifecycle operation returns a conflict instead of overwriting it.
Populate[]query.PopulationThe Populate value.
OutputFields[]query.PathThe OutputFields value.
Draft*boolTrue stages working content; false requests a complete published create. SaveDraft and CreateDraft force true regardless of this option.
Localeschema.LocaleCodeThe Locale value.
FallbackLocales[]schema.LocaleCodeThe FallbackLocales value.
DisableFallbackboolThe DisableFallback value.

How it works

Other fields support caller-owned create IDs, returned population and output fields, and exact locale selection. The generated methods forward these options to the same LocalAPI operation engine. Draft writes defer editorial completeness only; supplied structure, access, references, and custom validators still run.

Full signature

type TypedMutationOptions struct { ID string Actor *store.Document ActorCollection schema.CollectionSlug // System skips access rules for trusted server code; see MutationOptions.System. System bool ExpectedRevision int Populate []query.Population OutputFields []query.Path Draft *bool Locale schema.LocaleCode FallbackLocales []schema.LocaleCode DisableFallback bool }

Source core/typed_local.go:204