function endNode(relationship)

endNode() returns the end node of a relationship

Arguments:
relationship: An expression that returns a relationship

Example Query:
    MATCH (x:foo)-[r]-()
    RETURN endNode(r)