Sanity
GROQ Query Language
A powerful, intuitive query language for fetching exactly the content you need — no over-fetching, no under-fetching.
GROQ (Graph-Relational Object Queries) is Sanity's query language, designed specifically for content retrieval. It lets you fetch exactly the data you need — specific fields, filtered by conditions, with related content joined in — in a single, readable query. Unlike REST APIs where you often get too much or too little data, GROQ returns precisely what you ask for.
For Okanagan businesses with content-rich websites, efficient data fetching directly impacts performance. A winery's wine listing page needs names, thumbnail images, and prices — not full tasting notes and vineyard history. A tourism operator's activity directory needs titles, locations, and pricing — not the full description text. GROQ lets you request exactly these fields, reducing data transfer and speeding up page loads.
The query language is also expressive enough to handle complex content relationships. Fetching all wines from a specific vineyard, sorted by vintage, with their paired menu items from the restaurant — that's a single GROQ query. Listing all upcoming events in the Okanagan that are tagged with specific categories, along with the venue details — another single query. This efficiency means faster development, fewer API calls, and a snappier website for your visitors.