I have a graph for cities with 6 cities, and only two of them have a relationship between them. I would like to write a query that gives me all the cities along with all the relationships in between them.
MATCH (n) RETURN n
The query above only gives me the nodes and not the relationships.
If I would like to have all the nodes along with all the relationships, what query may I use?
you can try the below query
MATCH (n)-[r]-()
RETURN n, r
here "-[r]-()" matches all the relationships in the graph.
let me know if this helps.