Joint session with Vercel: How to build intelligent storefronts (May 15th)

Sanity Schema: Should I Store All Product Variants in Array vs Default Fields?

18 repliesLast updated: Nov 29, 2025

Battling with the notion of product “variants”! Is there any reason it would be unhelpful to craft your schema as:

Title
Artists (reference to maker[s])
Variants Label (e.g. "Size")
Variants (array, if only one type of product, only one variant)
    Title
    Price
    Quantity
    SKU
    Tax Level
    Weight
Body
Details
Categories
Essentially – omit the “Default” variant fields you see in Shopify-type schema, and simply store ALL variants in an array? If there’s no variants, there would only be one item in “Variants” and no “Variant Label”

Its frustrating when you have a store where variations will be relevant for less than 2% of products…
AI Update

Your proposed schema approach is actually quite sensible and aligns well with how Sanity handles flexible content structures! There's no technical reason this wouldn't work, and it can be a much cleaner solution for your use case.

Why your approach works well:

Things to consider:

The Shopify-style schema with default fields exists because their data model has constraints that Sanity doesn't. With Sanity's flexible schema system, you can model your content to match your business logic rather than working around platform limitations.

If less than 2% of your products need variants, this approach will make your content editing experience much cleaner for the 98% of cases. Just make sure your Studio UI and validation rules guide editors appropriately for that single-item-array scenario.

Show original thread
18 replies

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.

Related contributions