Skip to content

Composition

When you find the same query or computed value showing up in block after block, lift it into a named expression template and instantiate it where you need it. That keeps one definition of “error rate” or “the active services query” instead of many copies drifting apart.

@expr/use

Instantiates a named expression template, optionally passing params. The ref points at a local (#/expr/<name>) or cross-file definition; params are validated against the template’s declared parameters. Combine it with the nested-from trick from Queries to build a query on top of a shared base.

{ "@expr/use": { "ref": "#/expr/error_rate", "params": { "service": "checkout" } } }