Return
This page describes how to create a RETURN clause with the Cypher®.Return class.
You can add return clauses with new Cypher®.Return.
However, more commonly they are added after an existing clause, such as MATCH, by using the method .return.
In both cases, the return variables can be passed as parameters:
const node = new Cypher.Node();
const returnQuery = new Cypher.Return(node, new Cypher.Literal(10));
This generates the following RETURN clause:
RETURN this0, 10
Any expression can be passed to return, for example a function:
const returnQuery = new Cypher.Return(Cypher.round(new Cypher.Param(2.3)));
This translates to:
RETURN round($param1)