What is the elegant way to include a record in the set of records, when query uses a graph projection in the select?
For instance,
select expand(both('friends')) from #123:456 limit -1
The query above returns only adjacent vertices. How can I include #123:456
into the resultset?
Try this:
select expand($c) from #123:456 let $a = (select expand(both('friends')) from #123:456 limit -1) , $b = (select expand(@rid) from #123:456), $c = unionAll( $a, $b )