type
MutationOptions
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
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. Updates preserve status so publish and unpublish hooks cannot be bypassed.
Draft *bool
Locale schema.LocaleCode
FallbackLocales []schema.LocaleCode
DisableFallback bool
AllLocales bool
}Authorization, optimistic concurrency, response population, create status, and locale controls for one write.
IDstring- ID supplies a caller-owned document ID for create operations when Config.AllowIDOnCreate is enabled. Other mutations ignore it.
Actor*store.Document- Actor used by access rules.
ActorCollectionschema.CollectionSlug- Exact auth collection owning Actor.
ExpectedRevisionint- Expected current revision for optimistic concurrency.
Populate[]query.Population- Populate only the returned document inside the write transaction.
OutputFields[]query.Path- Limit output-field resolution in the returned document.
Draft*bool- Select draft or published status for versioned creates.
Localeschema.LocaleCode- Selected content locale.
FallbackLocales[]schema.LocaleCode- Optional replacement fallback chain.
DisableFallbackbool- Disable locale fallbacks.
AllLocalesbool- Request all localized values.
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.