
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGreat question! There's no specific hard limit on the number of types you can include in the of attribute of an array field. You can technically add as many different types as you need.
However, there are some important practical considerations to keep in mind:
While you can have many types in your of array, each type contributes to your dataset's overall attribute limit of 2000 unique paths. Here's how it works:
When you have an array with multiple types, the path counting works like this:
content.list - array content.list[] - object (counts as one path regardless of how many types) content.list[].eachField - (this is where multiple types increase path count)
So having 5 different types in your of array doesn't directly multiply your paths by 5, but each unique field across those types does add to your total count.
You can check your current attribute count by visiting:
https://<projectId>.api.sanity.io/v1/data/stats/<datasetName>
Look for the fields.count.value (it will show next to limit: 2000). Currently, you won't get warnings as you approach the limit—you'll only see errors if you exceed it—so it's good to monitor this periodically.
While there's no hard limit on types in of, having dozens of different types might make the Studio UI a bit cumbersome for editors. Consider the user experience when deciding how many types to include.
For more details on technical limits, check out the technical limits documentation.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store