11.3. Node Functions

apoc.nodes.isDense(node)

returns true if it is a dense node

apoc.nodes.connected(start, end, rel-direction-pattern)

returns true when the node is connected to the other node, optimized for dense nodes

apoc.node.relationship.exists(node, rel-direction-pattern)

returns true when the node has the relationships of the pattern

apoc.node.relationship.types(node, rel-direction-pattern)

returns a list of distinct relationship types

apoc.node.degree(node, rel-direction-pattern)

returns total degrees of the given relationships in the pattern, can use '>' or '<' for all outgoing or incoming relationships

apoc.node.id(node)

returns id for (virtual) nodes

apoc.node.degree.in(node, relationshipName)

returns total number of incoming relationship

apoc.node.degree.out(node, relationshipName)

returns total number of outgoing relationship

apoc.node.labels(node)

returns labels for (virtual) nodes

apoc.rel.id(rel)

returns id for (virtual) relationships

apoc.rel.type(rel)

returns type for (virtual) relationships

apoc.any.properties(node/rel/map, )

returns properties for virtual and real, nodes, rels and maps, optionally restrict via keys

apoc.any.property(node/rel/map)

returns property for virtual and real, nodes, rels and maps

apoc.create.uuid()

returns a UUID string

apoc.label.exists(element, label)

returns true or false related to label existance

rel-direction-pattern syntax:

[<]RELATIONSHIP_TYPE1[>]|[<]RELATIONSHIP_TYPE2[>]|…​

Example: 'FRIEND|MENTORS>|<REPORTS_TO' will match to :FRIEND relationships in either direction, outgoing :MENTORS relationships, and incoming :REPORTS_TO relationships.