I have been trying to create a new edge property using the property of the nodes it has been connected to but am unable to complete the cypher query.
Database: Using the neo4j gds examples airports database
Task: set a property "avgPageRank" to the "has_route" relation from the two nodes its connected to having the property page rank.
````match (p:Airport)-[r:HAS_ROUTE]->(q:Airport)
with collect(r) as routes
foreach(route in routes | SET route.avgPageRank = p.pagerank + q.pagerank)```
Here I am unable to get the access to p and q, the starting airport and the ending airport