Problem with http client

after run a mutate, wether with dgraph-js-http or row http(postman), the response is success, and return a new uid. but I can’t get the new data by query operation, why is that?

mutate:

query:

the params is valid, I copy it to the Ratel UI, it works fine then.

You have to use commitNow, ratel does this by default.

@verneleem thanks very much !

another question, I wonder what is the queryWithVars method used for, for the variables can be passed by template string:

const {type} = req.query

const qs = `
  {
    roots(func:type(${type})) {
      title
    }
  }
`

If you want to separate the query string from the script and where you define your query you may not have the variables.