
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI think there might be some confusion here about what GROQ queries can access. GROQ queries operate on your content (the actual documents in your dataset), not on your schema definitions. This means you can't use GROQ to return schema-level metadata like a field's title property from your schema definition.
Here's what I mean:
Query the actual content values in your documents. For example, if you have a document with a title field:
*[_type == "post"] {
title,
description
}This returns the content of those fields (like "My Blog Post"), not the schema metadata (like the field's title property you defined as "Post Title").
Access schema definitions, field configurations, or metadata like:
title propertiesdescription textGROQ is designed as a query language for your Content Lake - the actual documents and their values. Your schema exists separately as configuration code that defines the structure of your content, but it's not stored as queryable data in the Content Lake.
If you need to access schema metadata in your application, you could:
The key distinction is: GROQ queries your data (document content), not your schema (field configuration). The schema defines what fields can exist and how they're structured, while GROQ retrieves what values actually exist in your documents.
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