# After mutate, how to get the new record or uid?

**URL:** https://discuss.dgraph.io/t/after-mutate-how-to-get-the-new-record-or-uid/7230
**Category:** Dgraph
**Created:** [June 16, 2020, 2:37pm UTC](https://discuss.dgraph.io/t/after-mutate-how-to-get-the-new-record-or-uid/7230 "2020-06-16T14:37:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pandalive](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pandalive/32/3455_2.png) [@pandalive](https://discuss.dgraph.io/u/pandalive)
#### Post date: [June 16, 2020, 2:37pm UTC](https://discuss.dgraph.io/t/after-mutate-how-to-get-the-new-record-or-uid/7230/1 "2020-06-16T14:37:34Z")

</div>

I used dgraph client for rust: [dgraph-tonic](https://github.com/selmeci/dgraph-tonic) .

I want to get the new record after mutate, but I quickly encountered a problem and raised the problem to dgraph-tonic: [After mutate, how to get the new record or uid ?](https://github.com/selmeci/dgraph-tonic/issues/17) .

There is no answer yet.

This problem prevented me from continuing to work.

I am not sure if this is a problem with dgraph-tonic or dgraph itself.

Hope to find the answer here.

---

<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: [June 16, 2020, 5:21pm UTC](https://discuss.dgraph.io/t/after-mutate-how-to-get-the-new-record-or-uid/7230/2 "2020-06-16T17:21:33Z")

</div>

> [@pandalive](#):
>
> I am not sure if this is a problem with dgraph-tonic or dgraph itself.

Not Dgraph, it is a client issue

e.g

> <https://github.com/dgraph-io/dgraph-js-http/blob/8f485a6c195edf8b72f9dda4d1011718e90018fe/examples/simple/index-async-await.js#L75>

Via `assigned.data.uids` you can get the mutate uids. This should exists in that Rust client.

---

<div class="post-metadata">

### Author: ![selmeci](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@selmeci](https://discuss.dgraph.io/u/selmeci)
#### Post date: [June 16, 2020, 6:43pm UTC](https://discuss.dgraph.io/t/after-mutate-how-to-get-the-new-record-or-uid/7230/3 "2020-06-16T18:43:33Z")

</div>

Hi,

We are going to add example to Readme.md asap.

---

<div class="post-metadata">

### Author: ![pandalive](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pandalive/32/3455_2.png) [@pandalive](https://discuss.dgraph.io/u/pandalive)
#### Post date: [June 17, 2020, 2:11am UTC](https://discuss.dgraph.io/t/after-mutate-how-to-get-the-new-record-or-uid/7230/4 "2020-06-17T02:11:38Z")

</div>

@MichelDiz Thanks. @selmeci answered my question. 👏
