Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-26-2020 08:08 PM
The generated mutation will use the first field listed in schema as the identifier for the mutation, eg
type Person {
username: String
name: String
group: String
email: String
}
will generate
UpdatePerson(
username: String!
name: String
group: String
email: String
): Person
which will create the cypher query
MATCH (p:Person) WHERE p.username = $username ...
However, for my use case, none of these fields are unique, and I would like this mutation to match by the neo4j assigned node ID (and apoc.uuid is not ideal: https://github.com/neo4j/neo4j/issues/12428)
06-27-2020 06:48 AM
You can always create your own ID field and use whatever identifier you want. You can then exclude that type from the auto generated mutations and make your own resolvers, etc.
06-28-2020 02:51 AM
Can confirm this, sometimes a call to apoc.create.uuid() is enough and sometimes it creates more hassle than needed because you need the id locally as well. In that case it is better to generate it yourself and pass it to cypher as an additional property.
All the sessions of the conference are now available online