{"repo":"Khan/genqlient","free":true,"listed":false,"github":"https://github.com/Khan/genqlient","clone":"git clone https://github.com/Khan/genqlient.git","description":"a truly type-safe Go GraphQL client","language":"Go","stars":1318,"topics":["graphql","go","golang","codegen"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"genqlient: a truly type-safe Go GraphQL client What is genqlient? genqlient is a Go library to easily generate type-safe code to query a GraphQL API. It takes advantage of the fact that both GraphQL and Go are typed languages to ensure at compile-time that your code is making a valid GraphQL query and using the result correctly, all with a minimum of boilerplate. genqlient provides: - Compile-time validation of GraphQL queries: never ship an invalid GraphQL query again! - Type-safe response objects: genqlient generates the right type for each query, so you know the response will unmarshal correctly and never need to use interface{} . - Production-readiness: genqlient is used in production at Khan Academy, where it supports millions of learners and teachers around the world. How do I use genqlient? You can download and run genqlient the usual way: go run github.com/Khan/genqlient . To set your project up to use genqlient, see the getting started guide, or the example. For more complete documentation, see the docs. How can I help? genqlient welcomes contributions! Check out the (Contribution Guidelines), or file an issue on GitHub. Why another GraphQL client? Most common Go GraphQL clients have you write code something like this: This code works, but it has a few problems: - While the response struct is type-safe at the Go level; there's nothing to check that the schema looks like you expect. Maybe the field is called fullName , not name ; or maybe you capitalized it wrong (sin","default_branch":null,"files":null,"tree":[],"storefront":"/r/Khan","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Khan/genqlient/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}