Beispiel #1
0
 public function discoveryQuery(Node $input, Context $context) : StatementInterface
 {
     $query = 'MATCH (n) WHERE id(n) = {id}
     MATCH (n)-[:FRIEND]->(friend)-[:FRIEND]->(reco)
     WHERE NOT (n)-[:FRIEND]->(reco)
     RETURN reco, count(*) as score';
     return Statement::prepare($query, ['id' => $input->identity()]);
 }
 public function blacklistQuery(Node $input)
 {
     $query = 'MATCH (n) WHERE n.name = "Zoe" RETURN n as item';
     return Statement::prepare($query, ['id' => $input->identity()]);
 }