Custom GROQ functions
Published: May 23, 2025
v2021-03-25
GROQ
All GROQ APIs above v1 now support custom defined GROQ functions.
// Query
fn ex::info($person) = $person{name, age};
*[_type == "person"] { "info": ex::info(@) }
This allows you to create modular, reusable parts of queries.
- Get started with custom functions.
- View the reference documentation.
- See the updated GROQ language spec.