neo4j-graphql-java
neo4j-graphql-java copied to clipboard
Support to auto generate IDs
Support an @autogenerate
directive which assigns an UUID on creation.
Schema would look like:
type Movie {
id: ID! @autogenerate
name: String!
}
GraphQL input:
mutation {
createMovies(input: [{ name: "dan" }]) {
movies {
id
name
}
}
}
Generated cypher
CALL {
CREATE (this0:Movie)
SET this0.id = randomUUID()
SET this0.name = $this0_name
RETURN this0
}
RETURN this0 { .id, .name } AS this0