Node Querying

Table 1. Functions
Qualified Name Type Release

apoc.nodes.isDense

- returns true if it is a dense node

Function

APOC Core

apoc.nodes.connected

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

Function

APOC Core

apoc.node.relationship.exists

- returns true when the node has the relationships of the pattern

Function

APOC Core

apoc.node.relationships.exist

- returns a map with rel-pattern, boolean for the given relationship patterns

Function

APOC Core

apoc.nodes.relationships.exist

- 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

- returns a list of distinct relationship types

Function

APOC Core

apoc.nodes.relationship.types

- 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

- 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

Function

APOC Core

apoc.node.degree.in

- returns total number number of incoming relationships

Function

APOC Core

apoc.node.degree.out

- returns total number number of outgoing relationships

Function

APOC Core

apoc.node.labels

Function

APOC Core

apoc.any.properties

Function

APOC Core

apoc.any.property

Function

APOC Core

apoc.label.exists

- 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

- quickly returns all nodes with these ids

Procedure

APOC Core