By queries in neo4j I get name of label as variable so in the same query I want to find all nodes with this label. I know that I can't have variable for label name like this
MATCH (n:${variable}) RETURN n
and nor
MATCH (n:variable) RETURN n
I am looking for work around for my situation I couldn't find apoc
function for this situation. I expected a function like this
apoc.match.node(['labelName'])
I know that it's possible to find nodes with label using WHERE
WHERE label IN labels(nodes)
My guess is that this structure will slow down the speed of search so I want to avoid it