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 218 forks source link

ResponseStruct? #26

Closed cedricve closed 5 years ago

cedricve commented 5 years ago

What is this ResponseStruct?

pwmcintyre commented 5 years ago

I was a little confused too, a little more doco would be useful

@cedricve I found the tests show how to use it

https://github.com/machinebox/graphql/blob/master/graphql_json_test.go#L37

Basically a map of strings, the string being a json, so you could then unmarshal it into your actual struct Eg. https://stackoverflow.com/questions/47270595/golang-parse-json-string-to-struct

I'll be playing with this in the week, will loop back if I get something working

cedricve commented 5 years ago

hey @pwmcintyre, yes Indeed I used the map of stings and that works properly. Thanks for getting in touch ;)