apoc.label.exists
Syntax |
|
||
Description |
Returns true or false depending on whether or not the given label exists. |
||
Arguments |
Name |
Type |
Description |
|
|
A node to check for the given label on. |
|
|
|
The given label to check for existence. |
|
Returns |
|
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;
output |
---|
TRUE |
MATCH (s1:Student {name: 'Priya'})
RETURN apoc.label.exists(s1, "Teacher") AS output;
output |
---|
FALSE |