feat(gkg-server): add GraphFormatter with unified response schema
What does this MR do and why?
Adds GraphFormatter that produces the unified { query_type, nodes, edges } response defined in ADR 004 (!490 (merged)). All five query types return the same shape. Aggregation computed values are inlined directly on nodes.
-
GraphFormatter(~400 lines) with per-query-type extraction: search, traversal, aggregation, path finding, neighbors - JSON schema at
schemas/query_response.json - Node deduplication by
(type, id)composite key - Edge deduplication via hash set
- Traversal path column extraction for multi-hop edge reconstruction
No columns or row_count in the JSON payload per ADR 004. row_count lives in the proto envelope (QueryMetadata). Display metadata comes from the cached ontology.
Related Issues
Related MRs
- !490 (merged) (ADR 004 — defines the response contract)
- !479 (closed) (original unified response schema implementation)
Testing
131 unit tests pass. Integration tests land in the next MR.