type

VersionConfig

Drafts, snapshot retention, and autosave policy.

Properties

PropertyTypeDescription
DraftsboolAllows unpublished document states.
MaxPerDocumentintLimits retained revisions; zero uses the framework default.
AutosaveIntervaltime.DurationControls draft autosave frequency; zero resolves to the 30-second framework default.

How it works

Versions must be enabled on the collection/global. MaxPerDocument zero resolves to 100. AutosaveInterval zero currently resolves to 30 seconds, and a configured interval must be at least one second; it drives admin update calls rather than a server-side mutation timer. Optimistic revision checks are available through MutationOptions.

Full signature