Compose Queries
Last updated
Last updated
The Gremlify query editor provides a nice interface for writing Gremlin queries.
The Gremlify query editor is not a Gremlin console, but a tool for writing queries on an already-initialised graph. Hence commands such as TinkerGraph.open()
and similar are not necessary in order to start working.
With that being said, it is worth pointing out that every query must be in the form of:
The Gremlify query editor is pretty basic, and provides step completion suggestions and a formatter.
Available keyboard shortcuts:
Action
Keyboard Shortcut
Search
ctrl/cmd + f
Formatter
The Gremlify query formatter takes any Gremlin query and formats it according to the official TinkePop Gremlin Style Guide.
It is highly recommended to use the query formatter when sharing a Workspace, since it makes the query more readable and easy to understand. It can also be used as a standalone formatting tool.
By typing any character into the query editor, a "Format" button will show up in the Query editor toolbar:
Clicking on it will format your query immediately.
Let's take a look of the following example:
As you may see, this query is a nasty one liner, that can barely fit the computer screen.
Although it's possible to resize the query editor, it will probably not help much.
Query formatter to the rescue!
Let's press on "Format" and see what we get:
You can play around with this example here.