Showing results for 
Search instead for 
Did you mean: 

Retrieving properties from distant nodes


Guess this is easy - when you know how to do it - but haven't found examples in the documentation yet. 


I have a graph structure similar to below. Main point of query is at the patient level and queries will be starting with only a single node property ({'PatientA'})

For the nodes directly related to the starting node, Patient, I was using the following to retrieve properties: 


MATCH (patient {name='PatientA'})-[CURRENT_DIAGNOSIS]>-(d:Diagnosis)

RETURN AS Current Diagnosis AS Date of Diagnosis


But what is the best way to retrieve properties of distant nodes? 

1.What is the name of the doctor that gave PatientA their current diagnosis?

2. What drugs can be used to treat the symptoms of the current diagnosis of PatientA (given only the patient's name)?



1. Does direction of relationship make a difference to efficiency of retrieval?

2. Should graph database structure be different if the end use will be retrieve to external app rather than just using Cypher within Neo4j (ie to make it operate faster for graphql queries)?

Thanks. New to this, so greatly appreciate any tips. 


Nodes 2022
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.