machinebox / graphql

Simple low-level GraphQL HTTP client for Go
https://blog.machinebox.io/a-graphql-client-library-for-go-5bffd0455878
Apache License 2.0
933 stars 217 forks source link

Update the example to show json decoding #55

Open simobiggs opened 4 years ago

simobiggs commented 4 years ago

Simple example, but might save a bit of head scratching. Particularly querying an _id field like you get from faunadb was a bit confusing at first.

kevmo314 commented 4 years ago

+1 to this PR, I spent a decent chunk of time trying to figure this out. It might be "obvious" because the code only unmarshals the json, but a simple example to make the example code actually successfully compile would go a long way.