diggy
(Dgraph Bot)
September 12, 2019, 1:41pm
1
Moved from GitHub ratel/119
Posted by pepoospina :
How can run an upsert from Ratel?
{
upsert {
query {
v as var(func: eq(email, "user@company1.io"))
}
mutation {
set {
uid(v) <name> "first last" .
uid(v) <email> "user@company1.io" .
}
}
}
}
diggy
(Dgraph Bot)
September 13, 2019, 2:24pm
2
paulftw commented :
@mangalaman93 how should it supposed to work via HTTP?
Currently for the upsert above Ratel sends /mutate
with content-type application/rdf
but server returns Error while lexing <query above> at line 2 column 10: Invalid character '{' inside mutation text
diggy
(Dgraph Bot)
September 13, 2019, 2:27pm
3
mangalaman93 commented :
The outermost braces are causing the issue just remove them.
upsert {
query {
v as var(func: eq(email, "user@company1.io"))
}
mutation {
set {
uid(v) <name> "first last" .
uid(v) <email> "user@company1.io" .
}
}
}
diggy
(Dgraph Bot)
September 13, 2019, 4:57pm
4
paulftw commented :
Seems like removing brackets will solve the issue.
Closing the github bug for now.
@pepoospina please feel free to reopen if you still have problems sending an upsert mutation via Ratel
diggy
(Dgraph Bot)
May 9, 2020, 5:14pm
5
onkarbanerjee commented :
Using uid(v) as the object in the mutation doesn’t work though.