# Upsert Block does not return query data

**URL:** <https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535>\
**Category:** Users\
**Created:** [November 28, 2019, 9:56pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535 "2019-11-28T21:56:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![artooro](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/artooro/32/1129_2.png) [@artooro](https://discuss.dgraph.io/u/artooro)\
**Post date:** [November 28, 2019, 9:56pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535/1 "2019-11-28T21:56:12Z")

</div>

In the example shown at [https://docs.dgraph.io/master/mutations/#upsert-block](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.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [November 28, 2019, 10:20pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535/2 "2019-11-28T22:20:31Z")

</div>

> [@artooro](#):
>
> But in my testing with Dgraph 1.1.0 this is not returned.

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.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [November 28, 2019, 10:24pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535/3 "2019-11-28T22:24:16Z")

</div>

> [@artooro](#):
>
> it shows a return object called “q” that returns the query result when doing an Upsert Block.

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

---

<div class="post-metadata">

**Author:** ![artooro](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/artooro/32/1129_2.png) [@artooro](https://discuss.dgraph.io/u/artooro)\
**Post date:** [November 28, 2019, 10:41pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535/4 "2019-11-28T22:41:23Z")

</div>

I was testing using Ratel.

---

<div class="post-metadata">

**Author:** ![artooro](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/artooro/32/1129_2.png) [@artooro](https://discuss.dgraph.io/u/artooro)\
**Post date:** [November 28, 2019, 10:42pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535/5 "2019-11-28T22:42:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)\
**Post date:** [December 28, 2019, 10:42pm UTC](https://discuss.dgraph.io/t/upsert-block-does-not-return-query-data/5535/6 "2019-12-28T22:42:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
