I might be asking an obvious question, but new to the graphs and gremlin language and got a bit stuck.
I have a graph setup where I can find N vertices of a particular
Aggregate all source vertices in a collection named x, then traverse to all y vertices and verify that each y vertex has n number of edges leading to vertices stored in x (where n equals the size of x).
gremlin> g.V().hasLabel("X1","X2").aggregate("x").
in("isOf").dedup().
filter(out("isOf").where(within("x")).count().
where(eq("x")).
by().
by(count(local))).
valueMap()
==>[name:[y1]]
==>[name:[y2]]