docs.rs failed to build grpc_graphql_gateway-0.6.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
grpc_graphql_gateway
High-performance Rust gateway bridging gRPC to GraphQL with Apollo Federation v2.
Transform gRPC microservices into a unified GraphQL API. Zero GraphQL code required.
🚀 Performance at a Glance
Performance Rankings (Rust):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. grpc_graphql_gateway ████████████████████ 112,000 req/s 🚀
2. async-graphql (Actix) █████████░░░░░░░░░░░ 45,000 req/s
3. Juniper (Actix) ████████░░░░░░░░░░░░ 39,000 req/s
Data Efficiency Mode (GBP Ultra + Parallel):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
JSON Payload (1GB) ████████████████████ 100%
GBP Ultra (9MB) ▏ 0.9% ⚡ (1,749 MB/s)
✨ Features
| Category | Capabilities |
|---|---|
| Core | Schema generation, Queries/Mutations/Subscriptions, WebSocket, File uploads |
| Live Queries | @live directive, Real-time updates, Invalidation triggers, WebSocket push |
| Federation | Apollo Federation v2, Entity resolution, DataLoader batching, No N+1 |
| Production | Health checks, Prometheus, OpenTelemetry, Rate limiting, Circuit breaker |
| Security | Query depth/complexity limits, Introspection control, Query whitelisting |
| Performance | SIMD JSON, Sharded Cache, Response caching (Redis), APQ, Request collapsing |
| Connectors | REST APIs, OpenAPI integration, Multi-descriptor stitching |
📦 Quick Start
[]
= "0.5.5"
= { = "1", = ["full"] }
use ;
const DESCRIPTORS: & = include_bytes!;
async
Endpoints: http://localhost:8888/graphql | ws://localhost:8888/graphql/ws | ws://localhost:8888/graphql/live
🌐 Federation
builder
.enable_federation
.with_entity_resolver
.build?;
🔧 Production Config
builder
.enable_health_checks // /health, /ready
.enable_metrics // /metrics (Prometheus)
.enable_tracing // OpenTelemetry
.with_query_depth_limit // DoS protection
.with_query_complexity_limit
.with_response_cache
.with_circuit_breaker
.build?;
⚡ Live Queries
Real-time updates with the @live directive:
# Connect to ws://localhost:8888/graphql/live
query @live {
users {
id
name
status
}
}
Configure in your proto:
rpc GetUser(GetUserRequest) returns (User) {
option (graphql.schema) = { type: QUERY, name: "user" };
option (graphql.live_query) = {
enabled: true
strategy: INVALIDATION
triggers: ["User.update", "User.delete"]
};
}
Trigger updates from mutations:
// After mutation, invalidate affected queries
LIVE_QUERY_STORE.invalidate;
📚 Examples
📦 Client SDKs
Official high-performance decoders for GBP:
- TypeScript/JavaScript:
@protocol-lattice/gbp-decoder
import { GbpDecoder } from '@protocol-lattice/gbp-decoder';
const decoder = new GbpDecoder();
const decoded = decoder.decodeGzip(uint8Array);
🔗 Links
📖 Full Documentation • 📦 Crates.io • 💻 GitHub
Made with ❤️ by Protocol Lattice