Send only GQL to Orbit and remove the orbit_gql_queries flag
What does this MR do and why?
Orbit is removing its JSON query language and keeping GQL as the only one. This MR makes Rails and the Orbit dashboard default to GQL, so every user gets what the orbit_gql_queries flag turned on. The flag is removed. The query language stays a parameter, so adding a language later takes one new entry instead of new plumbing.
POST /api/v4/orbit/queryand the MCPquery_graphcommand accept only GQL text. A JSON object query gets400 Bad Requestor a tool error.GET /api/v4/orbit/schema/dslis removed.- The gRPC client maps language names through
GrpcClient::QUERY_LANGUAGESand defaults every request to GQL, including the query runner. - The dashboard query editor loses its JSON mode and JSON examples. The Schema tab always shows an entity's starter query.
- The Orbit tools on the main MCP server stop decoding JSON query objects, and their command cache stays keyed by query language.
- Running a query right after picking an example now runs that example. Before, Monaco reported the edit a tick late, so the previous example ran.
- The GQL syntax reference no longer lists NOT as unsupported.
- The Orbit API docs use GQL examples.
This MR builds on !263077 (merged) (merged), which moved Orbit queries from Workhorse to the Rails query runner. Merge this MR before the GKG MR. Once GKG drops JSON, a GitLab that still sends JSON can't query Orbit. The GQL security review is done: https://gitlab.com/gitlab-com/gl-security/product-security/appsec/threat-models/-/merge_requests/109.
References
- Part of gitlab-org/orbit/knowledge-graph#263, the step that removes REST
schema/dsland theorbit_gql_queriesflag. - GKG MR that removes the JSON Query DSL: gitlab-org/orbit/knowledge-graph!2818
- MR that added GQL behind the flag: !256465 (merged)
- Adopt an openCypher subset: https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1258
Screenshots or screen recordings
Users who had the flag on see the same editor. Users who had it off now get the GQL editor instead of the JSON editor. Taken on Caproni against the GKG MR branch.
| Empty editor with the ghost query and examples | Example run right after picking it |
|---|---|
![]() |
![]() |
| JSON text gets a GQL syntax error | GQL syntax reference |
![]() |
![]() |
| Schema tab starter query for User | |
![]() |
How to set up and validate locally
-
Run GKG and point GDK at it.
-
As a user with Orbit access, run a GQL query. It returns the matched user:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \ --header "Content-Type: application/json" \ --data '{"query": "MATCH (u:User {id: 1}) RETURN u"}' \ --url "http://127.0.0.1:3000/api/v4/orbit/query" -
Send
{"query": {"nodes": ["User"]}}instead. It returns400withquery is invalid. -
Visit
http://127.0.0.1:3000/dashboard/orbit/query. Pick an example and select Run query right away. It runs the example you picked. -
Open a Schema tab entity, then select Open in Query editor and run the starter query.
I ran this end to end on Caproni, with this branch in edit mode and the GKG MR branch as the webserver:
- All five named queries ran over REST and MCP.
- REST GQL queries returned traversal, aggregation, and LLM output. JSON object queries got
400, andschema/dslreturned404. /api/v4/orbit/mcpand the main/api/v4/mcpserver ranquery_graphwith GQL. JSON queries got a tool error, andget_query_dslwas not found.- The editor, examples, Schema handoff, autocomplete, and query reference worked.
- No request reached GKG as JSON. The Rails Orbit log had no "JSON Query DSL was removed" errors.
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.




