Expand description
Stored-query registry.
A server-side registry of named, parameter-typed .gq queries that
operators declare in omnigraph.yaml (per-graph, or top-level in
single mode) and the server loads at startup. Each entry is parsed
and its identity asserted here (load); type-checking against the
live schema happens separately (a check pass) so the loader stays
callable without an open engine (the CLI’s offline queries check).
Identity is the query name: the manifest key must equal the
query <name> symbol declared in the referenced .gq file. The two
are asserted equal at load — one name, two places that must agree.
Renaming either is a breaking change to callers, by design.
Structs§
- Breakage
- A stored query that fails to type-check against the live schema — e.g. it references a node/edge type or property that was renamed or removed by a migration. Breakages block server boot (same posture as bad policy YAML), surfacing schema drift at the deploy boundary rather than silently at invocation time.
- Check
Report - Outcome of validating a registry against a schema. Breakages are fatal (boot refuses); warnings are advisory.
- Load
Error - A single registry load failure. Collected (not fail-fast) so a bad
omnigraph.yamlsurfaces every broken entry at once, matching the bad-policy-YAML posture. - Query
Registry - A loaded, identity-checked stored-query registry for one graph.
- Registry
Spec - In-memory registry spec: a query’s name + already-read
.gqsource. The input toQueryRegistry::from_specs— built by the server’s cluster boot and by the CLI’squeriestooling from a cluster serving snapshot. - Stored
Query - One loaded stored query.
sourceis the full.gqfile text — the invocation handler hands it torun_query/run_mutateverbatim, which reuse the same parse/IR/exec path as the inline routes (no parallel implementation). - Warning
- A non-blocking advisory found during validation. Logged at boot; never blocks startup. Currently: an MCP-exposed query that declares a parameter an agent cannot realistically supply.
Functions§
- check
- Validate a loaded registry against the live schema.
- format_
check_ breakages - Format every breakage in a registry check report into a multi-line operator-facing message, naming each offending query.