Internal
Optional
transactionId: stringProtected
_addDocument 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
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
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 bycommit()