GO FROM 'team1' OVER hasplayer YIELD src(edge) as team, edge(edge) as p1 |
GO FROM $-.p1 OVER hasfriend YIELD $-.team as team, src(edge) as p1, dst(edge) as p2 |
GO FROM $-.p2 OVER hasplayer REVERSELY WHERE src(edge) == $-.team YIELD $-.p1 as p1, $-.p2 as p2