[← See all Blog posts](/resources/blog)

28 May 2026

# GROQ patterns we love

A handful of projection patterns that keep queries readable.

-   [Engineering](/resources/blog/categories/engineering)
-   [Tutorials](/resources/blog/categories/tutorials)

![Cover illustration for GROQ patterns we love](https://cdn.sanity.io/images/f9tyxuia/production/41525797fa588bcf2dc2edc99a6ce628bc09b4ed-1600x900.svg)

Good GROQ reads like a description of the shape you want back.

## Compose fragments

Split projections into named fragments and compose them per block type.

Extract sub-shapes from generated query results rather than restating them.

### Takeaways

-   Name and reuse fragments
-   Coalesce nullable arrays
-   Let typegen derive result types

> Projections are documentation you can run.