type

MutationOptions

Authorization, optimistic concurrency, response population, create status, and locale controls for one write.

Properties

PropertyTypeDescription
IDstringID supplies a caller-owned document ID for create operations when Config.AllowIDOnCreate is enabled. Other mutations ignore it.
Actor*store.DocumentActor used by access rules.
ActorCollectionschema.CollectionSlugExact auth collection owning Actor.
SystemboolSystem runs the call as trusted server code: collection, field, draft and reference access rules are skipped. Validation, hooks, versions and reference integrity still apply, and Actor, when set, still reaches hooks. Only Go code can set it; REST and GraphQL never do.
ExpectedRevisionintExpected current revision for optimistic concurrency.
Populate[]query.PopulationPopulate only the returned document inside the write transaction.
OutputFields[]query.PathLimit output-field resolution in the returned document.
Draft*boolSelect draft or published status for versioned creates.
Localeschema.LocaleCodeSelected content locale.
FallbackLocales[]schema.LocaleCodeOptional replacement fallback chain.
DisableFallbackboolDisable locale fallbacks.
AllLocalesboolRequest all localized values.

How it works

The root package re-exports this type as ridu.MutationOptions. Updates preserve status so publish and unpublish hooks cannot be bypassed. Populate affects only the response, never validation or stored values.

Full signature

type MutationOptions struct { // ID supplies a caller-owned document ID for create operations when // Config.AllowIDOnCreate is enabled. Other mutations ignore it. ID string Actor *store.Document ActorCollection schema.CollectionSlug // System runs the call as trusted server code: collection, field, draft // and reference access rules are skipped. Validation, hooks, versions and // reference integrity still apply, and Actor, when set, still reaches // hooks. Only Go code can set it; REST and GraphQL never do. System bool ExpectedRevision int Populate []query.Population // OutputFields limits computed and inverse-join resolution in the returned // document. Nil resolves all; a non-nil empty slice resolves none. OutputFields []query.Path // Draft selects draft (true) or published (false) status for versioned // creates. Draft:true on Update stages working changes beside live content. Draft *bool Locale schema.LocaleCode FallbackLocales []schema.LocaleCode DisableFallback bool AllLocales bool }

Source core/local.go:158