Sanity · Arazzo Workflow
Sanity Query Then Patch Document
Version 1.0.0
Find a document with GROQ, then patch it when a match is found.
View Spec
View on GitHub
Headless CMSContent ManagementGROQReal-TimeStructured ContentDeveloper PlatformArazzoWorkflows
Provider
Workflows
query-then-patch-document
Locate a document by a GROQ filter and patch it if it exists.
Issues a GROQ query that returns the first document matching the filter, then conditionally applies a set patch to that document's id when a match is present.
1
findDocument
queryDocumentsPost
Run a GROQ query that returns the id of the first document matching the supplied filter expression.
2
patchDocument
mutateDocuments
Apply a patch mutation that sets the supplied fields on the matched document id.