cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cypher query to identify graph information

sebyid
Node Link

I have am trying to make a graph with a simple cypher query to see routes between Street Segments as shown below.

MATCH graph = (s1:StreetSegment)-[:ROUTE]->(s2:StreetSegment)
RETURN graph

I was wondering if there are any functions i can use to get information on the variable 'graph' that is initialized to this query such as number of nodes, number of relations etc.? Any functions to gain more insight on this relationship would also be interesting.

3 REPLIES 3

MATCH ff = (s1:StreetSegment)-[r:ROUTE]->(s2:StreetSegment)
RETURN size(collect(s1)) as s1_size ,size(collect(r)) as rel_size ,size(collect(s2)) as s2_size

Thanks for the quick feedback! I got the following error:

Type mismatch: expected String or List but was Node (line 2, column 13 (offset: 75))
"RETURN size(s1),size(r),size(s2)"

Was wondering if you could also help me understand this one?
Thanks
S

oops it was a typo. please, find the updated query in my original post.