Node Querying

Table 1. Functions
Qualified Name Type Release

apoc.nodes.isDense

apoc.nodes.isDense(node) - returns true if it is a dense node

Function

APOC Core

apoc.nodes.connected

apoc.nodes.connected(start, end, rel-direction-pattern) - returns true when the node is connected to the other node, optimized for dense nodes

Function

APOC Core

apoc.node.relationship.exists

apoc.node.relationship.exists(node, rel-direction-pattern) - returns true when the node has the relationships of the pattern

Function

APOC Core

apoc.node.relationships.exist

apoc.node.relationships.exist(node, rel-direction-pattern) - returns a map with rel-pattern, boolean for the given relationship patterns

Function

APOC Core

apoc.nodes.relationships.exist

apoc.nodes.relationships.exist(node|nodes|id|[ids], rel-direction-pattern) - returns a list of maps where each one has two fields: node which is the node subject of the analysis and exists which is a map with rel-pattern, boolean for the given relationship patterns

Function

APOC Core

apoc.node.relationship.types

apoc.node.relationship.types(node, rel-direction-pattern) - returns a list of distinct relationship types

Function

APOC Core

apoc.nodes.relationship.types

apoc.nodes.relationship.types(node|nodes|id|[ids], rel-direction-pattern) - returns a list of maps where each one has two fields: node which is the node subject of the analysis and types which is a list of distinct relationship types

Function

APOC Core

apoc.node.degree

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

Function

APOC Core

apoc.node.id

returns id for (virtual) nodes

Function

APOC Core

apoc.node.degree.in

apoc.node.degree.in(node, relationshipName) - returns total number number of incoming relationships

Function

APOC Core

apoc.node.degree.out

apoc.node.degree.out(node, relationshipName) - returns total number number of outgoing relationships

Function

APOC Core

apoc.node.labels

returns labels for (virtual) nodes

Function

APOC Core

apoc.any.properties

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

Function

APOC Core

apoc.any.property

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

Function

APOC Core

apoc.label.exists

apoc.label.exists(element, label) - returns true or false related to label existance

Function

APOC Core

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.

Table 2. Procedures
Qualified Name Type Release

apoc.nodes.get

apoc.nodes.get(node|nodes|id|[ids]) - quickly returns all nodes with these ids

Procedure

APOC Core