# Golang Mutation Update Not Returning Uid, but Does Commit

**URL:** <https://discuss.dgraph.io/t/golang-mutation-update-not-returning-uid-but-does-commit/2568>\
**Category:** Dgraph\
**Created:** [May 10, 2018, 10:19pm UTC](https://discuss.dgraph.io/t/golang-mutation-update-not-returning-uid-but-does-commit/2568 "2018-05-10T22:19:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikkon226](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@nikkon226](https://discuss.dgraph.io/u/nikkon226)\
**Post date:** [May 10, 2018, 10:19pm UTC](https://discuss.dgraph.io/t/golang-mutation-update-not-returning-uid-but-does-commit/2568/1 "2018-05-10T22:19:17Z")

</div>

I have a mutation that updates an existing node. When I update with an existing uid, the api.Assigned struct does not have any uids returned, but does complete the update.

```auto
	input := &model{
   	     UID: "0x1234",
	        Name: "Test",
	}
	inputJson, err := json.Marshal(input)
	if err != nil {
		log.Println("error handing json marshal")
		return nil
	}

	mu := &api.Mutation{
		SetJson: inputJson,
		CommitNow: true,
	}
	log.Println("mutation object:", mu)

	txn := o.graph.NewTxn()
	defer txn.Discard(ctx)
	assigned, err := txn.Mutate(ctx, mu)
	if err != nil {
		log.Println("error handing mutation for update")
		return nil
	}
	log.Println("assigned:", assigned.Uids)
	if _, ok := assigned.GetUids()[string(input.ID)]; !ok {
		log.Println("update unsuccessful")
		return nil
	}

```

The return of assigned.Uids is a blank map, but in the database, the Name has changed to “Test”. Is there something that I’m missing?
