How to efficiently construct a query of the form:
MATCH (a)-[:Foo]->(b) WHERE (a)-[:Bar]->(c) AND (a)-[:Bar]->(d) RETURN a
which is a query for
[Foo]----(b)
(a)---|
[Bar]----(c)
|
[Bar]----(d)
However I would like to have a variable number of destination nodes with relationship Bar (not just c and d, but any list of nodes).
Another way to say it: Return 'a' if it has Bar relationship to [c,d,...] list of nodes
Currently I manually concatenate the WHERE clause as on top, but I feel like there is a sexier way to do this.