Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. GraphQL
  3. grpc-graphql-gateway

grpc-graphql-gateway

MITGov0.24.0

A protoc plugin that generates GraphQL execution code from Protocol Buffers, enabling a GraphQL gateway for gRPC services.

GitHubGitHub
426 stars54 forks0 contributors

What is grpc-graphql-gateway?

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.

Target Audience

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.

Value Proposition

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.

Overview

A protoc plugin that generates graphql execution code from Protocol Buffers.

Use Cases

Best For

  • Exposing existing gRPC microservices as GraphQL APIs
  • Implementing Backend-for-Frontend (BFF) layers with GraphQL
  • Reducing schema duplication between GraphQL and Protocol Buffers
  • Adding GraphQL subscriptions to gRPC streaming services
  • Creating unified GraphQL gateways for multiple gRPC services
  • Prototyping GraphQL interfaces quickly from existing .proto files

Not Ideal For

  • Teams using non-Go languages for their GraphQL layer, as the plugin generates Go-specific code
  • Projects requiring advanced GraphQL features like interfaces or unions not expressible in Protocol Buffers
  • Systems needing fine-grained control over GraphQL schema design beyond auto-generation
  • Environments where complex data transformations require custom resolver logic not supported by the plugin

Pros & Cons

Pros

Automated Schema Sync

Generates GraphQL schemas and resolvers directly from .proto files, eliminating duplication and ensuring consistency, as demonstrated in the greeter.proto example.

gRPC Native Integration

Seamlessly connects to existing gRPC services, supporting queries, mutations, and subscriptions over HTTP/2, shown with the SayHello and StreamGreetings methods.

BFF Pattern Enablement

Facilitates Backend-for-Frontend architectures by allowing multiple gRPC resources to be aggregated into single GraphQL queries, mentioned in the Motivation section.

Customizable Type Mapping

Uses protobuf options to define GraphQL operation types and field requirements, providing flexibility in API exposure, as seen with (graphql.schema) annotations.

Cons

Limited Protobuf Support

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.

Go-Only Implementation

Generates Go code and relies on graphql-go/graphql, making it incompatible with projects using other programming languages for their API layer.

Setup Complexity

Requires installing a protoc plugin, managing protobuf includes, and compiling files, which can be cumbersome compared to drop-in GraphQL solutions.

Schema Customization Limits

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.

Frequently Asked Questions

Quick Stats

Stars426
Forks54
Contributors0
Open Issues16
Last commit1 year ago
CreatedSince 2020

Tags

#api-gateway#backend-integration#graphql-gateway#graphql#protoc-plugin#protocol-buffers#grpc#golang#go

Built With

P
Protocol Buffers
G
Go
g
graphql-go

Included in

GraphQL15.0k
Auto-fetched 8 hours ago

Related Projects

gqlgengqlgen

go generate based graphql server library

Stars10,758
Forks1,254
Last commit1 day ago
graphqlgraphql

An implementation of GraphQL for Go / Golang

Stars10,144
Forks845
Last commit2 months ago
graphql-gographql-go

GraphQL server with a focus on ease of use

Stars4,760
Forks496
Last commit4 days ago
graphjingraphjin

One governed graph for AI agents — GraphQL + MCP over your databases, files, APIs, and code

Stars3,162
Forks194
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub