Is There a Way to Clean Up Deleted Content Types?

5 replies
Last updated: Oct 28, 2020
Another question: I deleted a content type named “Category” but it seems the data that was created with it is still there somewhere. I get a graphql warning that documents exists with this type that I cannot access anymore. Is there a way to clean up this “lost data”?
you can try to fetch documentIds and remove it through API
I have the documentIds. How can you remove them through the API?
client.delete('bike-123')
  .then(res => {
    console.log('Bike deleted')
  })
  .catch(err => {
    console.error('Delete failed: ', err.message)
  })
Thx again!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?