Dgo Mutation preds 1-\u0000 error during mutation

What Dgraph client (and version) are you using?

(put “x” in the box to select)

  • Dgo
    Version: v210

What version of Dgraph are you using? 21.03.1

When I run the following mutation

type Path struct {
				Title string `json:"Path.title,omitempty"`
			p := Path{
				Title: "NewPath",
			pb, err := json.Marshal(p)
			if err != nil {
			mu := &api.Mutation{
				SetJson: pb,
			resp, err := txn.Mutate(ctx, mu)
			if err != nil {

I keep getting this response during mutation. How do I solve this?

Can you share the error? I don’t see one.

No nodes are created, but the uid is returned.

Have you added the predicate "dgraph.type": "Path"? If the UIDs are returned, that means the Node was created for sure.

Is it happening because I am using Graphql schema and have not configured it to suit DQL?
This is my schema in graphql

type Path  {
	id: ID! 
	nodes: [Node] @hasInverse(field:is_in_path) 
	title: String 
	owner: User 

And this is the schema shown in Dgraph Schema

So your mutation should be like

"Path.title": "NewPath",
"dgraph.type": "Path"

And you should be good to go.

1 Like