A Go implementation of GraphQL that follows the official reference implementation and supports queries, mutations, and subscriptions.
graphql-go/graphql is a Go implementation of the GraphQL query language specification that provides a complete runtime for building GraphQL APIs in Go applications. It enables developers to define GraphQL schemas, execute queries and mutations, and implement subscriptions while following the official reference implementation for compatibility. The library solves the problem of bringing GraphQL's flexible data querying capabilities to Go-based backend systems.
Go developers and backend engineers who need to implement GraphQL APIs in their Go applications, particularly those building modern web services, microservices, or API gateways that require flexible data querying capabilities.
Developers choose graphql-go/graphql because it provides a production-ready, spec-compliant GraphQL implementation specifically designed for Go, with type safety, good performance, and compatibility with the broader GraphQL ecosystem. Its close adherence to the official reference implementation ensures predictable behavior and makes it easier to work with GraphQL tooling and clients.
An implementation of GraphQL for Go / Golang
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the complete GraphQL specification including queries, mutations, and subscriptions, as stated in the README, ensuring reliable and predictable API behavior compatible with standard GraphQL clients.
Leverages Go's static typing for schema definition with compile-time validation, reducing runtime errors, as shown in the example using graphql.Fields and graphql.ObjectConfig for safe field mappings.
Closely follows the official graphql-js implementation, facilitating ecosystem compatibility and easier adoption for developers familiar with GraphQL standards, per the project description.
Well-tested with high coverage and continuous integration, evidenced by CircleCI and Coveralls badges in the README, indicating production-ready reliability and maintainability.
Has fewer third-party libraries and plugins compared to Node.js GraphQL solutions, as seen in the short list of external tools in the README, which may require custom implementations for advanced features.
Requires manual schema definition and resolver wiring without automatic code generation, leading to verbose code, unlike frameworks like gqlgen that offer more declarative approaches.
While subscriptions are supported, implementation details and advanced real-time features are minimally documented, often necessitating additional effort and external libraries for production use.