Upsert Block does not return query data


(Arthur Wiebe) #1

In the example shown at https://docs.dgraph.io/master/mutations/#upsert-block it shows a return object called “q” that returns the query result when doing an Upsert Block.

But in my testing with Dgraph 1.1.0 this is not returned.

Is this something currently in development on the master branch, or am I doing something wrong?
I did check the project commits and didn’t find the addition of of returning query result anywhere.


(Michel Conrado) #2

It does return if you’re using HTTP API. But if you’re using some client. You should have a result using some procedures documented for that client.

As an upsert block is a “mutation” query in practice, that means you would return data if you explicitly ask for it. It doesn’t throw info automatically in clients. Only in Raw HTTP.

If not so, please explain what you’re doing exactly.


(Michel Conrado) #3

This is part of Master only. Not v1.1.0 you need to wait v1.1.1 tho.


(Arthur Wiebe) #4

I was testing using Ratel.


(Arthur Wiebe) #5

OK thanks for confirming that. I think this will simplify some code.