I have been trying to learn to use dgraph Go client. I tried to use the “complete example” from https://dgraph.io/docs/clients/go/#complete-example . But this does not have a main() function. After I added that myself, I kept getting the following error:
$ go run main.go 2020/08/12 06:04:25 rpc error: code = Unknown desc = Schema does not contain a matching predicate for field raw in type Person
Then I tried to use https://godoc.org/github.com/dgraph-io/dgo#example-package--SetObject example. But the
getDgraphClient() is missing. I was able to get it working.
I wish that you would address these issues for future users. Thanks.