How would Go's client code for mutations would look like for your command line example?


I am a bit surprised with your Go samples in GitHub - dgraph-io/dgo: Official Dgraph Go client
I mean, fancy tree-like JSON is a strange choice for graph representation. I would rather expect to see a []*api.NQuad in your samples which is simply a better match for the task.

I tried to do something myself but this doesn’t work as expected. Could do you provide a small example of equivalent Go code to your set { … }, may be just with the first SW?

You can use api.Mutation{Set: ...} to set NQuads.

There wasn’t enough information on how to work with it. And it is buggy. Probably because it is not widely used.

I learnt how to deal with it though. Will report an issue about a bug I found.

We use N-Quad mutations quite often with dgo. I’m not sure what issue you ran into, so it’d be great to understand what issue you faced so we can address it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.