Report a GraphQL Bug
On update (set) mutation the returned array of updated elements is always empty. This doesn’t happen with add mutation when adding new elements.
What edition and version of Dgraph are you using?
Edition:
- SlashGraphQL
- [ x ] Dgraph (community edition/Dgraph Cloud)
If you are using the community edition or enterprise edition of Dgraph, please list the version:
Dgraph Version
$ dgraph version
v21.03
Have you tried reproducing the issue with the latest release?
yes
Steps to reproduce the issue (paste the query/schema if possible)
json query:
{
"operationName": "FolderUpdate",
"variables": {
"folder": {
"filter": {
"id": [
"0x3f90c"
]
},
"set": {
"name": "name1"
}
}
},
"query": "mutation FolderUpdate($folder: UpdateFolderInput!) { updateFolder(input: $folder) { __typename numUids folder { id name } } }"
}
Expected behaviour and actual result.
expected to return data.updateFolder.folder array with updated elements but returns empty array:
{
"data": {
"updateFolder": {
"__typename": "UpdateFolderPayload",
"numUids": 1,
"folder": []
}
},
...
When I do create (add) mutation the Add payload has array of added elements.