Compose Queries

The Gremlify query editor provides a nice interface for writing Gremlin queries.

What kind of Queries are supported?

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:

g.

The Query Editor

The Gremlify query editor is pretty basic, and provides step completion suggestions and a formatter.

Query Editor

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.

How to use the Formatter?

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.

Example

Let's take a look of the following example:

Ouch.

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:

The same query formatted.

You can play around with this example here.

Last updated

Was this helpful?