Add SKIP and OFFSET to the Orbit query editor
What does this MR do and why?
Orbit GQL is switching from cursor pagination (PAGE n AFTER 'token') to Cypher's SKIP n LIMIT m, with OFFSET as a synonym for SKIP. The query editor doesn't know about the new clauses yet, so SKIP shows as plain text and isn't suggested. This MR teaches the editor both keywords.
- The editor highlights and suggests
SKIPandOFFSET. - The GQL syntax reference lists
SKIP 25betweenORDER BYandLIMIT, in the order the grammar requires. - When more rows match, the results alert now says "Raise the LIMIT, or use SKIP to get the next page."
- The Schema tab treats
skipandoffsetas reserved words when it names query aliases, matching the GQL grammar.
The editor reads only pagination.has_more from responses, and that field doesn't change. So the GKG change doesn't depend on this MR.
Merge this MR after the GKG release that ships SKIP reaches GitLab.com. Until then, the syntax reference would advertise a clause that the server rejects.
References
- GKG MR that replaces cursor pagination with SKIP/LIMIT: gitlab-org/orbit/knowledge-graph!2924 (merged)
Screenshots or screen recordings
Before, on Caproni against the GKG MR branch: SKIP runs, but the editor shows it unhighlighted and the alert mentions only LIMIT. After screenshots to follow.
How to set up and validate locally
- Run a GKG build that includes gitlab-org/orbit/knowledge-graph!2924 (merged).
- Open Your work > GitLab Orbit > Query editor.
- Type
SKand check thatSKIPis suggested. - Run
MATCH (u:User) WHERE u.id >= 1 RETURN u.username ORDER BY u.id SKIP 2 LIMIT 2.SKIPis highlighted and the results start at the third user. - Open Query reference and check that
SKIP 25appears beforeLIMIT 25.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.