Future - GQL and label creation

I have realised I am now at a point where I need to create nodes with labels that will come as parameters (at the moment I have 7 different labels, but this can extend from a configuration perspective).

Currently I have 2 choices:

  • "unwind" in my code and repeat the same bit for each label (no apoc dependency)
  • introduce apoc

My question is:

Does anyone know if GQL going to allow for label creations as part of the language?

Hi @joshcornejo.
This actually exists in Cypher since version 5.26 (the LTS version of Neo4j 5) and also on Aura since November last year.

You can do like this:
CREATE (greta:$($nodeLabels) {name: 'Greta Gerwig'})

Here is the documentation:

And here is a blog post about it for even more information: