Eric Myhre

Results 5 comments of Eric Myhre

I'd like to put a third option on the table: an "options" vararg. ```go func (c *Client) Query(ctx context.Context, q interface{}, variables map[string]interface{}, opts Option...) error { ... } ```...

I'm also starting to pine for some pluggability. I'd like to start doing mocks. I don't know if this requires replacing HTTP per se, but it might be one of...

I did an experiment with this, and here's what I learned: --- It's hard to decide if the Transport interface should use structs... ```go type Request struct { Query string...

Just for the sake of conversation the diff is here (with many things that are not meant for upstreaming, being too opinionated for that: https://github.com/dbmedialab/graphql/compare/master...pluggable-transport

Yup, that's pretty much the shape of it. The example you give of using nested anonymous structs like that is very interesting and looks a lot cleaner than doing it...