I am trying to set labels dynamically with the apoc.create.setLabels function:
:auto MATCH (n:TempNode)
CALL {
with n
CALL apoc.create.setLabels( n, [ n.type ] ) YIELD node
} IN TRANSACTIONS;
I get a strange error that I never saw before:
Neo.ClientError.Statement.SyntaxError
Variable `n` not defined (line 3, column 10 (offset: 35))
" with n"
^
Any ideas why this fairly simple query does not work?