When successfully running a query using the query editor, you will be presented with a view of results, broken down in 4 sections:
- Query Output: Displays the raw output of your query as would be available on the Gremlin Console, and, where available, a prettified version of any JSON output.
- Graph View (Optional): If your query putputs at least one Vertex or Edge being returned, the Graph View will be displayed, allowing you to visualize your query output as a graph.
- Vertex View (Optional): If your query outputs at least one Vertex, the Vertex View will be displayed, allowing to see a table display of returned vertices.
- Edge View (Optional):If your query outputs at least one Edge, the Edge View will be displayed, allowing to see a table display of returned edges.
Gremlin Console Output
The Gremlin Console Output is always available and simply displays the result of your query as would be displayed by the Gremlin Console.
You can perform a text/regex search on the Gremlin Console Output by pressing Alt-F, Ctrl-F or Cmd-F (macOS)
JSON Formatted Output
The JSON formatted output will display a slightly altered output for your query to allow viewing your elements in more details. Different Gremlin technologies return elements (Vertex, Property, Edge) in different ways, but G.V() will always ensure that a query returning any element includes all its data (id, label, properties).
You can perform a text/regex search on the JSON Formatted Output by pressing Alt-F, Ctrl-F or Cmd-F (macOS)
Navigating the Graph
Whilst on the graph window, you can perform the following actions:
- Zoom In: To zoom in on the graph, mouse wheel up or press Ctrl-PLUS.
- Zoom Out: To zoom out on the graph, mouse wheel down or press CTRL-HYPHEN.
- Pan Graph: To pan the graph, click on the background of the graph and drag your mouse in the direction you want to pan the graph towards
- Drag Vertices: To drag a vertex, hold left click on it and move your mouse. To drop it, release left click.
- Select Single Edge/Vertex: To select an element, simply left click on it.
- Select Multiple Edges/Vertices: To select multiple elements, left click on each element whilst holding the Ctrl key.
- Box Select Elements: To box select elements, hold the Shift key and hold left click on the background of the graph, then drag your mouse to draw a box. Elements within the box will be selected, however note that edges will only be selected if both vertices composing the edge are also contained within the box.
- Draw Edge Between Vertices: To draw an edge between two vertices, right click hold on a source vertex and drag the edge to its target, then release the right click button. You will then be prompted on the sideview to select a label for the edge and specify properties before confirming the edge creation.
Viewing Selected Elements
When selecting one or more element, they will be displayed on a sidebar to the graph allowing you to view the element details. Additionally, further controls to focus on the selected elements will be available on the graph's toolbar.
Updating selected elements
The graph sideview provides WYSIWYG ("What You See Is What You Get") functionality allowing you to perform the following:
- Add missing element properties as observed across other elements of the graph with the same label
- Add new properties to the element
- Update existing element properties
- Remove element properties
- Update styles for elements using the same label on your graph
See example of the view below:
In the graph sideview, you can delete an element by clicking the icon. You will be prompted to confirm the deletion of the element. Upon confirmation, the element will be deleted.
When deleting a vertex, all incoming and outcoming edges for that element will also be deleted just the same as dropping the element using a Gremlin query
Alternatively, when selecting multiple elements in the Graph View, you will be given the ability to delete all selected elements, as shown below:
Your element's properties are listed in a table and can be added/updated/deleted. G.V() will attempt to enforce loose type checks on your properties based on observed values to allow consistency for your value types. Property value types for Edges and Vertices are also enforced based on the features of your graph, which can be consulted at any time using the Graph Features functionality.
Depending on the type of your property, you will be presented with different editor views to facilitate setting values. The following types are currently supported and available to edit in G.V():
- boolean array
- integer array
- long array
- double array
- string array
- float array
- object (an object is treated as a generic type that can be any of the above)
- object array
The following types are not yet supported:
- byte array
These types apply just the same to Vertex meta-properties.
Vertex meta-properties will only be displayed and available to modify in your graph when jointly enabling the Fetch Vertex Meta Properties option on the associated query editor. When adding a new property to an element, G.V() will attempt to recommend a property key to use based on properties observed on other elements with the same label and whether they exist on the element already. When adding a property to an element that is not existing on any other element for that label, the data model will be automatically reloaded, causing the property key to be suggested for the database connection in query editors, graph sideviews and under the data model explorer.
After all property modifications are complete, you can save the element changes by clicking the icon on the top right of the view.
At the top of the graph is a toolbar with helper functionality available to help you shape the graph to your needs. The following commands are available:
- Fullscreen (): Toggles fullscreen display for the graph view
- Reset Graph Position (): Resets the graph's panning and zooming to default
- Detailed Element View (): When toggled, shows full details for each vertices as tables of properties
- Filtering (): Allows you to toggle on and off the display on the graph of specific edge or vertex labels.
- Layout: A select list of available layout algorithms to organize your graph. Selecting a different layout algorithm will cause the graph to re-arrange itself according to that algorithm.
- Focus Selected Elements (): If you have one or more vertex selected in the graph, clicking on this icon will re-layout the graph and hide all vertices that aren't direct neighboors of the selected elements.
- Focus Elements Neighboor Level Up (): If you have one or more focused elements in the graph, clicking on this icon will extend the focus to a further level of indirect neighboors for your selected elements
- Focus Elements Neighboor Level Down (): If you have one or more focused elements in the graph, clicking on this icon will shrink the focus down a level level of indirect neighboors for your selected elements
- Enable Data Explorer (): Enables Data Explorer mode, allowing you to load data on the graph as you click on vertices. Whilst Data Explorer mode is enabled, clicking on a vertex will cause G.V() to fetch all neighboor vertices from your graph database and output them on the graph. When disabling Data Explorer mode, all elements loaded in this process will be hidden from the graph.
- Reset to Initial Results (): This option will only display when elements are loaded via Data Explorer mode. Clicking on it will reset your graph view to the initial results as returned by the query you've run.
- Enable Edge Drawing (): Enables edge drawing on the graph. When enabled, left-click hold the node to create the edge from and drag it to the node you want to assign the edge to. Once you release the left click, will be prompted on the sideview to select a label for the edge and specify its properties before confirming the edge creation.
- Add Vertex (): Adds a Vertex on the graph. You will be prompted on the sideview to select a label for the vertex and specify its properties before confirming the vertex creation.
- Delete Multiple Elements (): When multiple elements are selected on the graph, click on Delete Multiple Elements to delete all selected elements. You will be prompted to confirm deletion beforehand.
- Export Graph Results As Query: Generates a Gremlin query to create a replica of your currently showing results (properties, vertices and edges) to another Gremlin graph database.
- Search Graph...: Allows filtering elements already displayed on the graph by specifying a search value. The search value is evaluated against the id, label and property values of all elements on the graph to allow quickly finding a specific element.
The Graph Legend displays a summary of the elements available on your graph and their appearance. You can toggle elements on the graph legend to show or hide. You can also hide or show the graph legend by clicking . Below is an example of the Graph Legend:
For query results containing a large amount of elements, rendering of the graph may perform slower. A warning will be displayed for results of more than 2000 elements. We generally recommended refraining from displaying graphs of more than 10000 elements, though this is also down to your host machine's own hardware configuration. The graph visualisation tool is not WebGL enabled meaning that GPU performance will make no impact on graph rendering.
The Vertex View allows you to see any vertices returned by your query in table form. There are two different types of displays:
- Aggregate Vertex View: Displays all vertices returned grouped by label. In this display, properties are displayed in JSON form, with the option to see the properties displayed as a table for a given vertex by clicking "View Details".
- Label Specific Vertex View: Displays all vertices for a specific label. Properties are displayed individually as columns on the table. When different vertex labels are returned by your query, you will be given the open to select a specific label to see vertices for.
Both views have a search bar allowing you to quickly filter the results. Additionally, all vertex rows have a "Show On Graph" control () which allows zooming in on the specific vertex directly on the graph view, and a delete button allowing you to delete the element from your graph.
The Edge View allows you to see any vertices returned by your query in table form. There are two different types of displays:
- Aggregate Edge View: Displays all edges returned grouped by label. In this display, properties are displayed in JSON form, with the option to see the properties displayed as a table for a given vertex by clicking "View Details".
- Label Specific Edge View: Displays all edges for a specific label. Properties are displayed individually as columns on the table. When different edge labels are returned by your query, you will be given the open to select a specific label to see edges for.
Both views have a search bar allowing you to quickly filter the results. Additionally, all edge rows allow you to view the details of the "from" and "to" vertices, as well as show the "from" and "to" vertices on the graph by clicking on , and a delete button allowing you to delete the element from your graph.