Hi,
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
I just wanted to echo @tamalsaha’s comments above. I went thru the same process, adding main, getting things running in a debugger and have (only in the debugger) hit the same error ("Schema does not contain a matching predicate for field raw in type Person) finally. I’ve definitely spent too much time on getting this example to work only to hit this. I’m not annoyed but more disappointed. I was hoping to have something working to launch from to continue to make some headway on a proof-of-concept but now having to go back to “the basics”.
I’d just “+1” here in hopes that your task of documentation improvement has already happened. Any chance you have something new to give “the masses” as we attempt to learn how to use the dgo client?
In addition, I’ve attempted to run the tests that come with the client code and those do not work either (out of the box). I’ve run the dgraph server in a couple different ways (as a locally hosted process and as a containerized set of services running in docker) but neither has allowed the dgo tests to pass. Just some additional info here for you. At this point, I’d be happy with just some tests that run succesfully.
Hi Mark,
Thank you for your comment and welcome to the community.
We are in the process of over-hauling all our docs and this is one of the items in the list. We will address this soon.
Regarding the tests failing, please open a Dgraph dgo issue and we can look into it separately as well. Please provide the steps you followed. I will try to run the tests locally on my end as well.