Hi, @Kailash
Are looking for something like:
MATCH (p:Person {name: 'Eve'})
WITH p
RETURN apoc.meta.cypher.types(p)
{
"name": "STRING",
"gender": "STRING",
"age": "INTEGER",
"kids": "INTEGER"
}
To get same result, each line separate:
MATCH (p)
WITH distinct p, keys(p) as pKeys
UNWIND pKeys as Key
RETURN distinct labels(p), Key, apoc.map.get(apoc.meta.cypher.types(p), Key, [true])
Result
╒═══════════╤═════════╤══════════════════════════════════════════════════════╕
│"labels(p)"│"Key" │"apoc.map.get(apoc.meta.cypher.types(p), Key, [true])"│
╞═══════════╪═════════╪══════════════════════════════════════════════════════╡
│["Person"] │"age" │"INTEGER" │
├───────────┼─────────┼──────────────────────────────────────────────────────┤
│["Person"] │"kids" │"INTEGER" │
├───────────┼─────────┼──────────────────────────────────────────────────────┤
│["Person"] │"name" │"STRING" │
├───────────┼─────────┼──────────────────────────────────────────────────────┤
│["Person"] │"gender" │"STRING" │
├───────────┼─────────┼──────────────────────────────────────────────────────┤
│["Forum"] │"name" │"STRING" │
├───────────┼─────────┼──────────────────────────────────────────────────────┤
│["Forum"] │"members"│"INTEGER" │
└───────────┴─────────┴──────────────────────────────────────────────────────┘
Same thing for relationships:
MATCH ()-[p]-()
WITH distinct p, keys(p) as pKeys
UNWIND pKeys as Key
RETURN distinct type(p), Key, apoc.map.get(apoc.meta.cypher.types(p), Key, [true])
Result
╒═════════╤═══════╤══════════════════════════════════════════════════════╕
│"type(p)"│"Key" │"apoc.map.get(apoc.meta.cypher.types(p), Key, [true])"│
╞═════════╪═══════╪══════════════════════════════════════════════════════╡
│"KNOWS" │"since"│"INTEGER" │
└─────────┴───────┴──────────────────────────────────────────────────────┘