Beta
Creates an EditDocumentAction
object with patches for modifying a document.
Accepts patches in either the standard PatchOperations
format or as a SanityMutatePatchMutation
from @sanity/mutate
.
A handle uniquely identifying the document to be edited.
A patch mutation object from @sanity/mutate
.
An EditDocumentAction
object ready for dispatch.
Beta
Creates an EditDocumentAction
object with patches for modifying a document.
A handle uniquely identifying the document to be edited.
Optional
patches: PatchOperations | PatchOperations[]A single patch operation or an array of patch operations.
An EditDocumentAction
object ready for dispatch.
Creates an
EditDocumentAction
object with patches for modifying a document. This is the implementation signature and handles the different patch input types.Param: doc
A handle uniquely identifying the document to be edited.
Param: patches
Patches in various formats (
PatchOperations
,PatchOperations[]
, orSanityMutatePatchMutation
).Returns
An
EditDocumentAction
object ready for dispatch.