How to get all the Type Names in a Dataset

1 replies
Last updated: Nov 19, 2021
How could I get all the type names used in my dataset? Something like "select distinct"...
Nov 19, 2021, 9:33 AM
in vision you can select vX as api version and then you can get all types like so:

distinct(*{ _type }._type)
Nov 19, 2021, 10:06 AM

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.

Was this answer helpful?