I’m following tutorial Dgraph GraphQL Tour SCHEMA and when I try the provided mutation below it returns an error (page 7 of tutorial)
mutation {
updatePerson(input: {
filter: { xid: { eq: "alice" } }
remove: { manages: null }
})
}
{
"errors": [
{
"message": "Field \"updatePerson\" of type \"UpdatePersonPayload\" must have a selection of subfields. Did you mean \"updatePerson { ... }\"?",
"locations": [
{
"line": 2,
"column": 3
}
]
}
]
}
But this is what the tutorial provides. If I add some fields to the mutation I then get another error
mutation {
updatePerson(input: {
filter: { xid: { eq: "alice" } }
remove: { manages: null }
}){
person {
xid
manages {
xid
}
}
}
}
{
"message": "mutation updatePerson failed because Dgraph execution failed because Got unsupported type for list: Person.manages",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"updatePerson"
]
}
],
"data": {
"updatePerson": null
}
}
If I replace remove: { manages: null }
by remove: { manages: [] }
it no longer yells at me, but I’m not sure it does what it’s supposed to do, meaning remove all edges