apoc.label.exists

Function APOC Core

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

Signature

apoc.label.exists(node :: ANY?, label :: STRING?) :: (BOOLEAN?)

Input parameters

Name Type Default

node

ANY?

null

label

STRING?

null

Usage Examples

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

CREATE (s1:Student {name: 'Priya'});
MATCH (s1:Student {name: 'Priya'})
RETURN apoc.label.exists(s1, "Student") AS output;
Table 1. Results
output

TRUE

MATCH (s1:Student {name: 'Priya'})
RETURN apoc.label.exists(s1, "Teacher") AS output;
Table 2. Results
output

FALSE