v2021-03-25

Custom GROQ functions

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.