What Data Type Can I Use For a Boolean Value Or Null?
nullpart might be complicated. If the field has never been set, it just won't exist in the data. It won't be explicitly set to
null.
{
name: 'compoundObject',
type: 'object',
fields: [
{
name: 'section',
type: 'section',//section is another object with a string field
},
{
name: 'addedField',
type: 'string',
},
],
}, {
title: "Cart Items",
name: "cartItems",
type: "array",
of: [
{
title: "Product Variants Cart",
type: "productVariant",
},
{
name: "name",
type: "string",
},
{
name: "amount",
type: "number",
},
],
},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.