feat(querying): add options field to json queries, apply it to dynamic hydration
What does this MR do and why?
Problem
Dynamic hydration (PathFinding, Neighbors) always fetched default_columns for discovered entities. There was no way for a consumer to request all columns — which the frontend needs for display — without hardcoding columns: "*" into the hydration logic itself.
An earlier approach tried to infer this from whether the original query used columns: "*", but that conflates two separate concerns: what the user asked for on their declared nodes vs. what dynamically-discovered nodes should carry. A frontend might use explicit column lists on query nodes but still want full properties on intermediate path nodes. The decision axis is really about who is consuming the result, not about the query's column selection.
Solution
Add a top-level options object to the query JSON that captures consumer-level preferences, separate from query semantics. The first option is dynamic_columns, which controls what columns are fetched for entities discovered at runtime during hydration:
-
"default"(the default) — fetches onlydefault_columnsfrom the ontology. This keeps responses lean for agent/LLM consumers. -
"*"— fetches all columns. Frontend opts into this explicitly for rich display.
The JSON schema validates options structurally — invalid values are rejected at schema validation time. The options live on Input and flow naturally through the existing pipeline context — the hydration stage reads them via ctx.compiled().input, so HydrationPlan stays a simple enum with no data coupling.
{
"query_type": "path_finding",
"options": { "dynamic_columns": "*" },
"nodes": [...],
"path": {...}
}
Related Issues
Testing
All existing unit/integration tests pass.
Changes:
- 4 new unit tests for
DynamicColumnModedeserialization: omitted options default toDefault, explicit"*"and"default"parse correctly, emptyoptions: {}uses defaults.
Performance Analysis
- This merge request does not introduce any performance regression. If a performance regression is expected, explain why.