Cannot Run Upsert in Dgraph Cloud DQl UI

In Dgraph Cloud UI I went to the DQL tab and selected ‘Mutation’ and entered:

upsert {
  query {
    state as var(func: eq(State.name,"Hawaii"))
    address as var(func: eq(Addr.tempState,"Hawaii"))
  }
  mutation {
    set {
      uid(address) <Addr.state> uid(state) .
    }
  }
}

And I got the error:

"Error parsing JSON at line 1, character 2: invalid character ‘u’ looking for beginning value "

But I opened Ratel and it worked without any change.

Let me expand this to cannot use any of the rdf syntax in the Dgraph Cloud DQL UI. You have to use only the JSON syntax. This should be an easy fix with a button to pick either RDF|JSON if it cannot autodetect the syntax.

1 Like