Enable Visible Graph Mode
Visible Graph mode allows you to store your visible graph along with any graph manipulation actions in a variable. You can later use this variable in your further queries.
To enable visible graph mode and to use the visible graph mode variable:
-
Click Settings on the Visualization panel.
This opens the Settings dialog.
-
Click the Graph Exploration tab.
-
Switch on the Enable Visible Graph Mode toggle in the Visible Graph Sharing section.

-
Optionally, change the default name of the variable in the Global Variable Name field.
-
Click the
icon to copy the visible graph mode variable name to the clipboard. -
Click X on the top-right to close the Settings dialog.
The graph data gets stored in the variable. You can now query the vertices and edges of the graph using the variable as shown:
-
Vertices:
<visible_graph_mode_variable_name>.get("V") -
Edges:
<visible_graph_mode_variable_name>.get("E")
-
-
Use the variable in your further queries.
The following example creates a prepared statement for a query. The visible graph mode variable is used in the
setArraymethod to set the bind variable to an array of values.%java-pgx var prepared_stmnt = graph.preparePgql("SELECT * FROM MATCH (v) WHERE v.acct_id IN ?"); prepared_stmnt.setArray(1, visible_graph.get("E")); var r = prepared_stmnt.executeQuery(); out.println(prepared_stmnt.executeQuery());