A protoc plugin that generates GraphQL execution code from Protocol Buffers, enabling a GraphQL gateway for gRPC services.
grpc-graphql-gateway is a protoc plugin that generates GraphQL execution code from Protocol Buffers definitions. It solves the problem of maintaining both GraphQL and gRPC APIs separately by automatically creating a GraphQL gateway that connects to existing gRPC services, allowing clients to query them using GraphQL.
Backend developers and API architects working with gRPC microservices who want to expose GraphQL endpoints without rewriting services. It's particularly useful for teams implementing Backend-for-Frontend (BFF) patterns.
Developers choose grpc-graphql-gateway because it eliminates the need to manually maintain dual GraphQL and gRPC schemas, reducing duplication and errors. It provides a simple way to leverage GraphQL's query flexibility while keeping the performance benefits of gRPC.
A protoc plugin that generates graphql execution code from Protocol Buffers.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates GraphQL schemas and resolvers directly from .proto files, eliminating duplication and ensuring consistency, as demonstrated in the greeter.proto example.
Seamlessly connects to existing gRPC services, supporting queries, mutations, and subscriptions over HTTP/2, shown with the SayHello and StreamGreetings methods.
Facilitates Backend-for-Frontend architectures by allowing multiple gRPC resources to be aggregated into single GraphQL queries, mentioned in the Motivation section.
Uses protobuf options to define GraphQL operation types and field requirements, providing flexibility in API exposure, as seen with (graphql.schema) annotations.
Does not support Protobuf's `oneof` type, restricting the expression of certain data structures in the generated GraphQL schema, as admitted in the Limitations section.
Generates Go code and relies on graphql-go/graphql, making it incompatible with projects using other programming languages for their API layer.
Requires installing a protoc plugin, managing protobuf includes, and compiling files, which can be cumbersome compared to drop-in GraphQL solutions.
GraphQL schema is auto-generated from .proto files, with no clear mechanism for adding custom resolvers or modifying schema without altering Protocol Buffers, limiting adaptability.