How to Query a Document based on an Unset Type

2 replies
Last updated: Nov 4, 2021
Hey Team,! Sorry for all the sanity help questions.
We have an api generate documents and when it creates documents we have a boolean value that we purposely do not set. Thus its UI component is always in the middle, not right or left (true or false).

the problem, when its not set we aren’t able to query it.
Is there a way to query a document based on an unset type?
Nov 4, 2021, 7:30 PM
No need to apologize for asking questions! You could try
!defined(<field>)
.
Nov 4, 2021, 7:31 PM
tank you!
Nov 4, 2021, 7:50 PM

Sanity.io – build remarkable experiences at scale

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

Categorized in