I have two lists
['avia', 'paul', 'tom']
['james','bond']
I am tring to find the shortes path between
avia -> james
paul -> james
tom -> james
avia -> bond
paul -> bond
tom -> bond
i create the query with in two loops and query neo4j every time so multiple calls are being made to neo4j. is ther a way to creat this in one stored procedure and make only one call to neo4j. sample query is like below
match p = allShortestPaths((a{name:'avia'})-[*..2]-(b {name:'james'})) return p