apoc.nodes.isDense

Function APOC Core

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

Signature

apoc.nodes.isDense(node :: NODE?) :: (BOOLEAN?)

Input parameters

Name Type Default

node

NODE?

null

Usage Examples

The examples in this section are based on the following sample graph:

MERGE (michael:Person {name: "Michael"})
WITH michael
CALL {
    WITH michael
    UNWIND range(0, 100) AS id
    MERGE (p:Person {name: "Person" + id})
    MERGE (michael)-[:KNOWS]-(p)
    RETURN count(*) AS friends
}
RETURN friends;
Table 1. Results
friends

101

MATCH (p:Person {name: "Michael"})
RETURN apoc.nodes.isDense(p) AS output;
Table 2. Results
output

TRUE

MATCH (p:Person {name: "Person1"})
RETURN apoc.nodes.isDense(p) AS output;
Table 3. Results
output

FALSE