Not sure whether this is possible, I tried and couldn't get it to work. I'd like to run a query to return a list of label names and the associated node counts based on this cypher query:
RETURN labels(n), COUNT(labels(n))
I thought I might be able to create a new type such as
itemList: [Item] @cypher(statement: "MATCH (n) RETURN labels(n) as Name,COUNT(n) as Count")
However it returns an error. Am I trying something that is not possible at all or am I taking the wrong approach.
Thanks for any pointers.