apoc.meta.cypher.type

Details

Syntax

apoc.meta.cypher.type(value)

Description

Returns the type name of the given value.

Arguments

Name

Type

Description

value

ANY

An object to get the type of.

Returns

STRING

Usage Examples

RETURN apoc.meta.cypher.type(1) AS output;
Results
output

"INTEGER"

RETURN apoc.meta.cypher.type("Michael") AS output;
Results
output

"STRING"

RETURN apoc.meta.cypher.type(true) AS output;
Results
output

"BOOLEAN"

RETURN apoc.meta.cypher.type(datetime()) AS output;
Results
output

"DATE_TIME"

RETURN apoc.meta.cypher.type(["Neo4j", 2020]) AS output;
Results
output

"LIST OF ANY"

RETURN apoc.meta.cypher.type(["Neo4j", "Bloom"]) AS output;
Results
output

"LIST OF STRING"

CREATE (node1:Person)-[rel:FRIENDS]->(node2:Person)
RETURN apoc.meta.cypher.type(node1) AS node1Type,
       apoc.meta.cypher.type(rel) AS relType,
       apoc.meta.cypher.type(node2) AS node2Type;
Results
node1Type relType node2Type

"NODE"

"RELATIONSHIP"

"NODE"