How to get the label of a relationship

Christopher Hackett

If I have the cypher query

MATCH (a)-[r]->(b)

I can get the labels of a and b fine line so

MATCH (a)-[r]->(b)
RETURN labels(a), labels(b)

But when I want the label of r using the same syntax

MATCH (a)-[r]->(b)
RETURN labels(r)

I get

Type mismatch: expected Node but was Relationship

How do I return the label of r, the relationship?

Dan G

In Neo4j, relationships don't have labels - they have a single type, so it would be:

MATCH (a)-[r]->(b)
RETURN TYPE(r)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get relationship inside a relationship

From Dev

How to get the label for DateField?

From Dev

How to get htmlFor of a label

From Dev

How to get access to relationship field?

From Dev

Cypher: How to traverse across any relationship except for a specific label

From Dev

How to show GET request in Label

From Dev

How to get the value from a label

From Dev

How to get a parameter in the label of a plot?

From Dev

How to get label by Id in jquery

From Dev

How to get many to many relationship items in laravel

From Dev

how to get informations about relationship of tables in oracle?

From Dev

How to get dict of lists from relationship in sqlalchemy?

From Dev

How to get data from a relationship in Laravel?

From Dev

How to get Bus and Device relationship for a /dev/ttyUSB

From Dev

How to get the "width" of a string to be used in a Tkx label

From Dev

How can I get the position of a label?

From Dev

How to get label name from Button?

From Dev

How to get the String (label) of a Vertex by clicking on it (Jgraph)?

From Dev

how to get value in javascript for asp Label control?

From Dev

llvm: How to get the label of Basic Blocks

From Dev

How can I get the value of a label in a cell

From Dev

How to get Drive Letter and Name (volume label)

From Dev

How to get label.getWidth() in javafx

From Dev

How to get Capybara to check a checkbox by its label

From Dev

How to get the label of radio button using selenium?

From Dev

How to get checkbox whose label value is known

From Dev

How to get a label text using Watir

From Dev

How to get the title of the selected UIActionSheet button into a label?

From Dev

How to get the contents of a label for WatchOS in Swift

Related Related

HotTag

Archive