Moved from GitHub ratel/220
Posted by danielmai:
Steps to reproduce
I’m trying to send the following mutation in Ratel:
{"set":[{"uid":"_:root","connects":[{"name": "A"},{"name":"B"}]]}
I get the following error, when I expect it to succeed:
{
"name": "t",
"url": "http://localhost:8080/mutate?commitNow=true",
"errors": [
{
"message": "while lexing {\"set\":[{\"uid\":\"_:root\",\"connects\":[{\"name\": \"A\"},{\"name\":\"B\"}]]} at line 1 column 1: Unrecognized character inside mutation: U+0022 '\"'",
"extensions": {
"code": "ErrorInvalidRequest"
}
}
]
}
This error message is telling me that the mutation was processed as an RDF mutation when it should’ve processed it as a JSON mutation. In the network inspector, I see it sent the mutation request with the Content-Type
header as application/rdf
instead of application/json
.
Additional info
Ratel info from the Latest distribution
Built at 2020-06-17T15:16:21.698Z
Commit: 2cdc64b
Commit Info: 2cdc64b Wed Jun 17 18:15:46 2020 +0300 (HEAD -> master)
Dgraph version v20.03.3.