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 Client type, remove ctxhttp dependency. #1

Closed broady closed 6 years ago

broady commented 6 years ago

ctxhttp is only useful if you want to support Go <1.7. I removed it because this package already had a dependency on the stdlib context package.

broady commented 6 years ago

R= @matryer

broady commented 6 years ago

It can be a function type, too, but this prevents implementations from outside this package.

Something like:

type ClientOption func(*options)

would work just as well (options being an unexported struct)

On Sat, Dec 9, 2017, 2:00 AM Mat Ryer notifications@github.com wrote:

Merged #1 https://github.com/machinebox/graphql/pull/1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/machinebox/graphql/pull/1#event-1379966080, or mute the thread https://github.com/notifications/unsubscribe-auth/AABhliaFv5ykajFTkl8qasltIjzqwfIxks5s-lpEgaJpZM4Q713I .