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

Add support for top level extensions field. #28

Open riverajo opened 5 years ago

riverajo commented 5 years ago

The graphQL spec specifies an extensions field in the top level response. It's reserved for implementation specific data. However right now there is no way for a client to reach that data. Some endpoints return useful data about query cost. Perhaps a function like RunWithExtensions and convert Run to just pass nil to it for backwards compatibility and for anyone that doesn't care about them. I'd be willing to put together a PR if this is something that would be integrated.