apoc.meta.cypher.type

Function APOC Core

apoc.meta.cypher.type(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,MAP,LIST OF <TYPE>,POINT,DATE,DATE_TIME,LOCAL_TIME,LOCAL_DATE_TIME,TIME,DURATION)

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"