Is there a way to set the default state of a boolean to (false)?
Make sure your front-end code treats a missing boolean value as false.
In GROQ you can handle missing booleans and false values equally like thiswhich would match stories where featured is false or missing (or to be fair, any other value that is not*[_type == 'story' && featured != true]true).
Was this answer helpful?
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.