my data:
{
name: 'test",
Tag: ["A", "B", "C"]
}
I want to change a value in the Tag array, such as:
{
name: 'test",
Tag: ["A", "B", "EEEEEE"]
}
What should I do, delete the old value first, and then add the new value?
my data:
{
name: 'test",
Tag: ["A", "B", "C"]
}
I want to change a value in the Tag array, such as:
{
name: 'test",
Tag: ["A", "B", "EEEEEE"]
}
What should I do, delete the old value first, and then add the new value?
try this:
upset {
query {
a as var(func: eq(name,"test"))
}
mutation {
set {
uid(a) <Tag> "EEEEEE" .
}
delete {
uid(a) <Tag> "C" .
}
}
}
(assuming name is a unique field)