# DGO schema

**URL:** <https://discuss.dgraph.io/t/dgo-schema/13463>\
**Category:** Dgraph\
**Tags:** dgo\
**Created:** [March 30, 2021, 12:27pm UTC](https://discuss.dgraph.io/t/dgo-schema/13463 "2021-03-30T12:27:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aledoo](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/aledoo/32/7428_2.png) [@Aledoo](https://discuss.dgraph.io/u/Aledoo)\
**Post date:** [March 30, 2021, 12:27pm UTC](https://discuss.dgraph.io/t/dgo-schema/13463/1 "2021-03-30T12:27:04Z")

</div>

Hi Dgraph community!  
How do I mutate my Person in dgo, with non-scalar predicate ?  
The below code works without any effect.

```auto
	operation := &api.Operation{
		Schema: `
			type Person {			
				name 
				age
				knows
				} 
			
			name: string @index(exact) .
			age: int .
			knows: [uid] .						
			`,
	}

```

```auto
query := `
		query{
			me( func: uid(0x2711)){
				foundValue as uid
				name
				knows
			}	
		}		
	`
	mu := &api.Mutation{
		SetNquads: []byte(`uid(foundValue) <knows> <0x4c> .`),
	}
	req := &api.Request{
		Query: query,
		Mutations: []*api.Mutation{mu},
		CommitNow: true,
	}

	_, err := txn.Do(ctx, req)
	if err != nil {
		log.Fatal("1015 error mutation person", err)
	}

```

---

<div class="post-metadata">

**Author:** ![chewxy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/chewxy/32/4339_2.png) [@chewxy](https://discuss.dgraph.io/u/chewxy)\
**Post date:** [March 30, 2021, 10:44pm UTC](https://discuss.dgraph.io/t/dgo-schema/13463/2 "2021-03-30T22:44:12Z")

</div>

Hi there, `dgo` maintainer here. Welcome to the Dgraph community!

Your mutation doesn’t have `CommitNow: true` in the field. You should set that.

```auto
mu := &api.Mutation{
		SetNquads: []byte(`uid(foundValue) <knows> <0x4c> .`),
                CommitNow: true,
	}

```

---

<div class="post-metadata">

**Author:** ![Aledoo](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/aledoo/32/7428_2.png) [@Aledoo](https://discuss.dgraph.io/u/Aledoo)\
**Post date:** [March 31, 2021, 1:10pm UTC](https://discuss.dgraph.io/t/dgo-schema/13463/3 "2021-03-31T13:10:49Z")

</div>

But actually I did it…

```auto
req := &api.Request{
		Query: query,
		Mutations: []*api.Mutation{mu},
		CommitNow: true,
	}

```
