Skip to content

Lifecycle helpers ​

ExportNotes
partial(doc)deepPartial for documents: every field but _type becomes optional, recursively. Returns DeepPartial<typeof doc>
committed(doc)_id, _rev, _createdAt, _updatedAt become required
Committed<typeof doc>The schema type committed() returns; Infer<Committed<typeof doc>> is a document as the API returns it
COMMITTED_KEYS, CommittedKeysThe fields committed() requires, as a constant and as a union of their names
verifyUniqueTypeNames(schema), DuplicateTypeNameErrorSee GraphQL compatibility

See Document lifecycles for examples.