6.8.6.1 Executing SELECT Queries Against a Graph in the Graph Server (PGX)
The PgxGraph.queryPgql(String query) method executes the
                query in the current session. The method returns a
                PgqlResultSet.
               
The ON clauses inside the MATCH
                        clauses can be omitted since the query is executed directly against a PGX
                        graph. For the same reason, the INTO clauses inside the
                                INSERT clauses can be omitted. However, if you want
                        to explicitly specify graph names in the ON and
                                INTO clauses, then those graph names have to match
                        the actual name of the graph (PgxGraph.getName()).
               
Parent topic: Java APIs for Executing SELECT Queries