Shopify Glossary Terms

GROQ

GROQ (Graph-Relational Object Queries) is Sanity's query language for fetching content. It's purpose-built for querying structured content and is significantly more flexible than the REST APIs most CMSs offer.

The key advantage for developers is precision. You can request exactly the data you need for each page - specific fields, resolved references, computed values, filtered results - in a single query. No over-fetching (getting data you don't need) and no under-fetching (needing multiple requests to assemble what you need). This translates directly to faster page loads because you're only pulling the content that matters for each render.

GROQ syntax looks like this: *[_type == "product" && category == "shoes"]{title, price, "image": mainImage.asset->url}. It queries all products of type "shoes" and returns just the title, price, and image URL. If you're familiar with GraphQL, GROQ solves similar problems but with a different syntax that many developers find more intuitive for content queries.


Think: the query language that fetches only the content each page actually needs.

MEL • LA • LON
Now Accepting Q3 Projects