🎤 Builder Talk: The Story Behind Lady Gaga’s Digital Experience – Register now

Removing a Property from a Document in Vision

1 replies
Last updated: Jan 6, 2022
Hej help!
I’m trying to remove a property from a document in vision.


{
  "mutations": [
    {
      "patch": {
        "id": "<_id>",
        "unset": ["property"]
      }
    }
  ]
}
but running
*[_id == "<_id>"]
shows me that the property remains unchanged. What am I missing?
Do I maybe not have editing rights in vision?
Jan 6, 2022, 11:09 AM
Solved, I tried the mutation again using
curl
and it worked
Jan 6, 2022, 1:17 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
In the tutorial, there is samples of what the API returns as JSON. Is there a way to view these ?Jan 11, 2021
I’m experiencing an error when trying to deploy `sanity graphql deploy` and getting this error point towards a node_module ```import...Jan 16, 2021
Creating a new document inside an array in Sanity.ioSep 4, 2020
Document References - No Results for Document Type, Changed from ObjectMar 15, 2021
Discussion about resolving an error in setting up a custom desk structure in Sanity.ioMar 26, 2021
Help with GROQ query to select blog posts with specific category in SanityAug 11, 2021
Troubleshooting a schema issue with reference fields in Slack threadSep 8, 2021
Making GROQ params optional in Next.js frontend API endpoint queryJan 19, 2022
Error when trying to create a dynamic query using Gatsby + SanityFeb 4, 2022
Struggling to delete a document in Sanity due to references, but issue was resolved.Mar 7, 2022

Related contributions

Turbo Start Sanity
- Template

The battle-tested Sanity template that powers Roboto Studio's websites

Go to Turbo Start Sanity

Schema UI - Next.js Sanity Starter
- Template

A Next.js starter template with Next.js 15, Tailwind CSS, shadcn/ui, and Sanity CMS with Live Editing. Get production-ready React components with matching Sanity schemas and queries. Build dynamic pages faster while keeping full control over customization.

Serge Ovcharenko
Go to Schema UI - Next.js Sanity Starter

The Swaddle
- Made with Sanity

A new brand identity to represent a more mature company, to signify The Swaddle’s evolution from publisher to production house, combined with an easier to navigate platform that can surface multiple content types - drawing readers through The Swaddle’s content offering.

Nightjar
Go to The Swaddle