apoc.meta.cypher.type

Function

apoc.meta.cypher.type(value ANY) - returns the type name of the given value.

Signature

apoc.meta.cypher.type(value :: ANY) :: STRING

Input parameters

Name Type Default

value

ANY

null

Usage Examples

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

"INTEGER"

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

"STRING"

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

"BOOLEAN"

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

"DATE_TIME"

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

"LIST OF ANY"

RETURN apoc.meta.cypher.type(["Neo4j", "Bloom"]) AS output;
Table 6. 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;
Table 7. Results
node1Type relType node2Type

"NODE"

"RELATIONSHIP"

"NODE"