Moved from GitHub dgraph/5640
Posted by masonlr:
In the Mutate console, the following mutation works.
Mutation:
{
"set": [
{"name": "foo"}
]
}
Response message:
{
"data": {
"code": "Success",
"message": "Done",
"queries": null,
"uids": {
"dg.932529826.109": "0xc3be"
}
},
"extensions": {
"server_latency": {
"parsing_ns": 46600,
"processing_ns": 3764100,
"assign_timestamp_ns": 1099500,
"total_ns": 4977500
},
"txn": {
"start_ts": 70252,
"commit_ts": 70253,
"preds": [
"1-name"
]
}
}
}
When comments are added, an error is returned. For example:
Mutation:
{
"set": [
{"name": "outer"}
]
}
# foo
Response:
{
"name": "t",
"url": "http://localhost:8080/mutate?commitNow=true",
"errors": [
{
"message": "while lexing {\n \"set\": [\n \t{\"name\": \"outer\"}\n\t]\n}\n\n# foo at line 2 column 2: Unrecognized character inside mutation: U+0022 '\"'",
"extensions": {
"code": "ErrorInvalidRequest"
}
}
]
}