Graph name, Query, [timeout], [--compact], [version]
Returns: Result set for a read only query or an error if a write query was given.
Frequently Asked Questions
What is the difference between GRAPH.QUERY and GRAPH.RO_QUERY?
What is the difference between GRAPH.QUERY and GRAPH.RO_QUERY?
GRAPH.RO_QUERY only executes read operations and will return an error if you attempt a write query (CREATE, SET, DELETE, MERGE with creation). GRAPH.QUERY supports both read and write operations.
Why should I use GRAPH.RO_QUERY instead of GRAPH.QUERY for reads?
Why should I use GRAPH.RO_QUERY instead of GRAPH.QUERY for reads?
GRAPH.RO_QUERY can be distributed to read replicas in a clustered setup, improving read scalability. It also provides a safety guarantee that data will not be accidentally modified.
What happens if I pass a write query to GRAPH.RO_QUERY?
What happens if I pass a write query to GRAPH.RO_QUERY?
The command will return an error indicating that write queries are not permitted. The graph data will remain unchanged.
Does GRAPH.RO_QUERY support the same optional parameters as GRAPH.QUERY?
Does GRAPH.RO_QUERY support the same optional parameters as GRAPH.QUERY?
Yes. GRAPH.RO_QUERY accepts the same optional parameters:
timeout, --compact, and version.