Query Editor

Run your Query

To run your query, simply click on Run Query. G.V() will attempt running your query against your server, and display the results window indicating the output of your query. More information is available at Results View

WARNING

When running your query, remember to specify a terminal step (e.g. toList, next, iterate). Not specifying the terminal step will allow the query to run, but will not extract any results.

Error Management

Using Apache TinkerPop™'s ANTLR grammar, G.V() will attempt to proactively warn of any syntax error in your query. Syntax errors in your query are highlighted in the code editor and listed below it. Note that at this moment, G.V() will not warn of any semantic error (e.g. using the select step with an unknown select key), but will in future versions.

Autocomplete Features

Using Apache TinkerPop™'s ANTLR grammar, G.V() will provide smart autocomplete suggestions as you're typing your query. Additionally, G.V() loads the structure of your graph data in the background and will make suggestions on Edge, Vertex and Property labels. Additionally when entering a specific step in your query, a Javadoc style popup will display above the line you're typing in showing the available parameters and variations of the step.

Translate a Query to a target Gremlin Language Variant

To translate your query directly to a target Gremlin Language Variant (GLV), click on Translate Query and select your target language in the resulting modal window. Note that if there are any syntax errors in your query, this feature will be unavailable.

Debug Query

For more details, go to the Gremlin Query Debugging documentation.

Formatting using Gremlint

To format your query using Gremlint, click on Format Query

Fetch All Edges Between Vertices

By default, when fetching vertices only from your Gremlin Server, the resulting graph visualisation will not include any edges. Toggling Fetch Edges on will cause all edges found between resulting vertices to also be returned, allowing for a more useful graph visualisation experience. This is equivalent to adding the .bothE() step to your graph traversal when it returns vertices.

Fetch Vertex Meta Properties

By default, when fetching vertices, only direct properties will be returned by your Gremlin Server. For convenience purposes, toggling Fetch Meta Properties on will automatically append any meta properties on vertices returned by your query. Note that this is modifying the results of your query and therefore doesn't represent the effective response returned by Gremlin Server, but it allows to quickly visualize the entire data appended to your vertices.

Submit The Query As A String Instead of Bytecode

If enabled, submits your query as a string using Gremlin Client as opposed to running it as bytecode. This may be useful in situations where your server implementation contains custom code that doesn't bundle with the default Apache TinkerPop code, to prevent serialisation issues. This may also be required to submit complex lambdas. This option is off by default and can be toggled by clicking on Submit Query As String

TIP

This option is not applicable to Azure Cosmos DB which does not support Bytecode, nor G.V()'s Playground where custom code/serialization is not applicable.

Save a Query

To save your query, click on Save Query. If you haven't previously saved your query, you will also be prompted to specify a name for it. If your query can be saved, this will be signified by a * displayed next to the query's name.

TIP

G.V() will automatically remember all the queries you've previously opened. You can safely close G.V() and return to your queries when you next re-open the application.

View Query History

To view previous queries run in your query editor, click on View Query History. The query history view allows to to navigate previously ran queries.

Organize your Queries Into Folders

G.V() allows you to organize your queries into folders. You can manage folders from the Connection side menu. From there, you can perform the following folder actions:

  • Create a new folder
  • Delete a folder
  • Move a folder into another
  • Move a query to a folder

Additionally when saving a query, you will be given the option to choose a folder to save the query to.

Keyboard Shortcuts

The following keyboard shortcuts are currently available on the query editor:

  • Ctrl+Space: Toggle Autocomplete
  • Escape: Close Autocomplete Window
  • Alt+Enter: Submit Query
  • Ctrl+F: Format Query
  • Ctrl+T: Translate Query
  • Ctrl-S: Save Query
  • Ctrl-W: Close Query

You can view the currently available keyboard shortcuts directly from the query editor by clicking the Keyboard Shortcuts Icon icon.

TIP

For macOS users, you can also substitute Ctrl with Cmd.

Last Updated: 9/15/2022, 12:20:36 PM