-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
Description
Describe the bug
When updating relationship properties via set operation within update mutations, it does not work.
The query returns with a valid response, but the properties are not updated.
Type definitions
type TypeCodePlaceholder @mutation(operations: [CREATE,UPDATE,DELETE]) @node @subscription(events: []) {
id: String!
values: [TypeCodeValue!]! @relationship (type: "TYPECODEPLACEHOLDER_HAS_TYPECODEVALUE", properties: "TypecodeplaceholderHasTypecodevalueProperties", direction: OUT, nestedOperations: [CREATE, UPDATE, DELETE, CONNECT, DISCONNECT], queryDirection: DIRECTED) @settable(onCreate: true, onUpdate: true)
}
type TypeCodeValue @mutation(operations: [CREATE,UPDATE,DELETE]) @node @subscription(events: []) {
id: String!
}
type TypecodeplaceholderHasTypecodevalueProperties @relationshipProperties {
order: Int!
}To Reproduce
Steps to reproduce the behavior:
- insert a
TypeCodePlaceholderwithid=A - insert two
TypeCodeValueswithid=Bandid=C - connect these with the
TypeCodePlaceholderand set the relation propertyorderto1forBand2forC - Execute the following Mutation
mutation {
updateTypeCodePlaceholders(
where: { id: { eq: "A" } }
update: {
values: [
{
update: {
where: { node: { id: { eq: "B" } } }
edge: { order: { set: 2 }}
}
}
{
update: {
where: { node: { id: { eq: "C" } } }
edge: { order: { set: 1 }}
}
}
]
}
) {
typeCodePlaceholders {
valuesConnection {
edges {
properties {
order
}
node {
id
}
}
}
}
}
}- check the response:
{
"data": {
"updateTypeCodePlaceholders": {
"typeCodePlaceholders": [
{
"valuesConnection": {
"edges": [
{
"properties": {
"order": 1,
},
"node": {
"id": "B"
}
},
{
"properties": {
"order": 2
},
"node": {
"id": "C"
}
}
]
}
}
]
}
}
}- The values for the
orderproperty have not been updated
System (please complete the following information):
- Version: @neo4j/[email protected]