Describe the bug
Mutations are not being properly translated to cypher when the ID property includes a @property alias. This affects updates, merges, and deletes on nodes, and adds/deletes on edges.
Test Case
GraphQL schema
type Person {
id: ID! @property(name: "~id")
name: String
actedIn: [Movie!]! @relation(name: "ACTED_IN", direction:OUT)
}
type Movie {
title: String!
}
GraphQL request
mutation {
mergePerson(id: "test-id", name: "test-name") {
id
}
}
Expected cypher query
MERGE (mergePerson:Person {
`~id`: $mergePersonId
})
SET mergePerson += {
name: $mergePersonName
}
WITH mergePerson
RETURN mergePerson {
id: mergePerson.`~id`
} AS mergePerson
Describe the bug Mutations are not being properly translated to cypher when the ID property includes a
@property
alias. This affects updates, merges, and deletes on nodes, and adds/deletes on edges.Test Case
GraphQL schema
GraphQL request
Expected cypher query
Expected cypher params
Neo4j test data N/A
Expected GraphQL response N/A
Actual cypher query
Additional context None