Optional
operations: Mutation[]Optional
client: ObservableSanityClientOptional
transactionId: stringProtected
_addCommit the transaction, returning an observable that produces the first mutated document
Options for the mutation operation
Commit the transaction, returning an observable that produces an array of the mutated documents
Options for the mutation operation
Commit the transaction, returning an observable that produces a mutation result object
Options for the mutation operation
Commit the transaction, returning an observable that produces a mutation result object
Options for the mutation operation
Commit the transaction, returning an observable that produces a mutation result object
Optional
options: BaseMutationOptionsOptions for the mutation operation
Creates a new Sanity document. If _id
is provided and already exists, the mutation will fail. If no _id
is given, one will automatically be generated by the database.
The operation is added to the current transaction, ready to be commited by commit()
Document to create. Requires a _type
property.
Creates a new Sanity document. If a document with the same _id
already exists, the create operation will be ignored.
The operation is added to the current transaction, ready to be commited by commit()
Document to create if it does not already exist. Requires _id
and _type
properties.
Creates a new Sanity document, or replaces an existing one if the same _id
is already used.
The operation is added to the current transaction, ready to be commited by commit()
Document to create or replace. Requires _id
and _type
properties.
Deletes the document with the given document ID
The operation is added to the current transaction, ready to be commited by commit()
Document ID to delete
Performs a patch on the given document ID. Can either be a builder function or an object of patch operations.
The operation is added to the current transaction, ready to be commited by commit()
Document ID to perform the patch operation on
Optional
patchOps: PatchOperations | ObservablePatchBuilderOperations to perform, or a builder function
Adds the given patch instance to the transaction.
The operation is added to the current transaction, ready to be commited by commit()
ObservablePatch to execute
Clears the transaction of all operations
Return a plain JSON representation of the transaction
Return a plain JSON representation of the transaction
Gets the current transaction ID, if any
Set the ID of this transaction.
Transaction ID
Clones the transaction