genqlient
genqlient copied to clipboard
a truly type-safe Go GraphQL client
## Summary: Craig suggested this; it seems plausibly useful although of course it will cause some churn in the generated file as well. And it's easy to do from Go's...
I don't remember the exact query I have, but certainly plenty of query fields end up as interfaces in Go. In some, maybe all, such cases we allow the `pointer:...
If you do `mutation { MyMutation { error { code } } }`, or something, we should be able to just return `(code string, err error)`, at least if you...
We have our own `errorf` (in `generate/errors.go`) so that we can do structured errors with positions. But our `errorf` is a bit un-idiomatic (which caused confusion in #117) -- it...
My thought here is that for every function `Myquery` that genqlient produces code for, it also produces a function `MockMyquery`, that can be used in tests. But we do away...
If you have a query like ```graphql query Q { f { # type: I (interface) ...Fragment # on I (or J which implements I) } } ``` Now, `resp.F`...
If you request some field of interface type, we automatically add `__typename` to your selection, so we can use the right type. But you probably don't need that field in...
Suppose you have ```graphql query Q { myInterface { a b c ... on Impl1 { d } } } ``` Right now we generate (roughly) ```go type QMyInterface interface...
With #85 we added support to say, if some field is of GraphQL interface type, but you don't request any type-specific fields, you can ask us to generate a struct...
If you have a field `id`, we should, for better or worse, generate `ID` rather than `Id`, and `XMLHTTPRequest` rather than `XmlHttpRequest`, per the Go style. Or at this point,...