Understanding object types and schemas in Sanity.io
2. add it to the schema file
An object won’t appear in the left-most sidebar in Sanity. Only documents.
By default, object types can not be represented as standalone documents in the data store. If you want to define an object type that you’d like to be represented as a document with an id, revision and created and updated timestamps, you should define it using thedocumenttype instead. Apart from these additional fields, there’s no semantic difference between a document and an object.
I have found it valuable to set up some of Sanity’s starters and inspect their schemas. It definitely gives some insight into what’s possible and how things work.
Kidding. I’ll report those to the Sanity team. Thanks so much!
https://www.sanity.io/docs/naming-things
Here are the correct links in the meantime.
In case anybody else is asking:
This series from User is genius when it comes to explaining the whole process of schema creation and organization. All the way from mapping out the schema in Figma, to explaining the documents, objects, plugs folder pattern used in the kitchen sink starter.
Invidious Link:
https://invidious.tube/playlist?list=PL46OzlGGU84RZw0R73RhMeqBZWlgBMHsg Youtube Link:
https://www.youtube.com/playlist?list=PL46OzlGGU84RZw0R73RhMeqBZWlgBMHsg
https://youtu.be/-B_Fxd6TMwA?t=112
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.