Relationship labels with python neo4j-driver

Hello guys,

How do I get all the labels of the relationships with python neo4j-driver 1.7.6, I'm using query = (MATCH (n)-[r]-(m) WHERE n.doc = '1234' RETURN r )
My database got many relationships for a node (Ex: [:Buyer], [:Seller], [:Owner] ... ) but always returns [:Buyer]

thanks

Hi @pedrochagasjr,

Welcome to the Community!!

  1. If you need type of the relationship then return type(r).
  2. Please make sure if respective node have all those types of relationships you have mentioned
  3. As a best practice try to use Label also

type (r) .... works !!! I didn't understand the third item.

Thanks

Third one is about labels
like in the below code I have two types of nodes (Labels of nodes) Person and Company.
MATCH (n:Person)-[r]-(m:Company)

rather than
MATCH (n)-[r]-(m)

ok ... thank you !!!