Use named queries for Orbit map filter search
What does this MR do and why?
Filtering the Orbit map by an entity type and a property (for example, Project → full_path contains "gitlab") failed with a schema violation: the query DSL was assembled in the frontend and had drifted from the engine's grammar (the engine now takes a nodes array and operator-keyed filters; the frontend still sent a singular node and { op, value }).
Rather than patch the shape, the frontend no longer builds query DSL for this path. It calls two server-defined named queries and passes only what the user picked:
search_nodeswith{ entity, field, text }when there is a search term (filter bar)list_nodeswith{ entity }when there is none ("Show in map" from the Schema tab)
The engine owns the filter operator, the id > 0 selectivity workaround, and the result limit (still 50), so this cannot drift again. This is the same approach already used for node expansion (expand_neighbors). One knock-on: the query editor is no longer pre-filled with the raw DSL after a filter search, because none is built client side.
Depends on knowledge-graph!2366, which adds the two named queries. Do not merge until a GKG release containing it is deployed to production, otherwise filter searches return "unknown named query".
References
- Engine MR: gitlab-org/orbit/knowledge-graph!2366 (merged)
- DSL changes that broke the inline query: knowledge-graph
7007a2b41(nodesarray),cf0cae1b0(operator-keyed filters)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
"Show in map" (no search term) via list_nodes:
How to set up and validate locally
- Run GKG from the knowledge-graph!2366 branch against your GDK (
mise run devin the knowledge-graph checkout) sosearch_nodesandlist_nodesexist. - Visit
http://127.0.0.1:3000/dashboard/orbit/exploreas a member of an indexed group. - Click Filter, pick Project, type
gitlab(3+ characters) and press Enter. The map should re-render with only matching projects and the network tab showsPOST /api/v4/orbit/query/search_nodes. - Open the Schema tab, pick an entity and click Show in map. The map should show up to 50 nodes of that type via
POST /api/v4/orbit/query/list_nodes.
Verified on GDK for all 14 entity types in the filter dropdown. Two pre-existing limitations, unchanged here: search terms shorter than 3 characters are rejected by the engine, and for File / Directory / Definition the field selector defaults to traversal_path, which does not support substring matching, so pick another field first.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.


