# Struggled at making upsert with assignment via the dgo client

**URL:** <https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126>\
**Category:** Dgraph\
**Created:** [March 14, 2020, 1:01am UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126 "2020-03-14T01:01:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirkon](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/sirkon/32/1571_2.png) [@sirkon](https://discuss.dgraph.io/u/sirkon)\
**Post date:** [March 14, 2020, 1:01am UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126/1 "2020-03-14T01:01:15Z")

</div>

Hi.

How can I do mutation like this below with dgo client?

```auto
  upsert {
    query {
      v as var(func: eq(xid, "6459f458-8938-463a-b9b9-9c044a1d2e61")) {
        LINK as ~link
      }
    }
        
    mutation {
      delete {
        uid(LINK) <link> uid(v) .
        uid(v) * * .
      }
    }
  }

```

---

<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:** [March 14, 2020, 3:45am UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126/2 "2020-03-14T03:45:01Z")

</div>

You can get examples from the test file

> <https://github.com/dgraph-io/dgo/blob/master/upsert_test.go>

---

<div class="post-metadata">

**Author:** ![sirkon](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/sirkon/32/1571_2.png) [@sirkon](https://discuss.dgraph.io/u/sirkon)\
**Post date:** [March 14, 2020, 8:55am UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126/4 "2020-03-14T08:55:41Z")

</div>

Thank you, this works. Still, I see lots of these kind of question at your discussions list. And this is rather your fault.

---

<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:** [March 14, 2020, 4:21pm UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126/5 "2020-03-14T16:21:24Z")

</div>

> [@sirkon](#):
>
> And this is rather your fault.

Sorry? If you have any constructive suggestions. Please do.

---

<div class="post-metadata">

**Author:** ![sirkon](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/sirkon/32/1571_2.png) [@sirkon](https://discuss.dgraph.io/u/sirkon)\
**Post date:** [March 15, 2020, 2:24am UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126/6 "2020-03-15T02:24:37Z")

</div>

We decided not to use Dgraph, still I have some points, hope they will help you:

1. The documentation is mostly about usual things pretty much every DB does: filtering, aggregation, etc. I think I would choose another established DB if I only needed these.
2. I would consider Dgraph only if I needed graph operations: add a node, connect two nodes, delete a node with all incoming and outgoing connections, disconnect two nodes, traversals, shortest paths. The documentation on these is pretty poor. Especially about node removal.
3. It is not clear how to translate queries into client requests.

PS Your query language of choice is truly special. In a bad sense. I could leave with it though.

---

<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:** [March 15, 2020, 3:08am UTC](https://discuss.dgraph.io/t/struggled-at-making-upsert-with-assignment-via-the-dgo-client/6126/7 "2020-03-15T03:08:29Z")

</div>

Thank you, I gonna take your comments into consideration. I agreed with some of them, above. That’s a thing we are working on. We indeed need to revamp the documentation and we have some internal track for this.

Cheers.
