Cosmo Connect | GraphQL Federation Without GraphQL Servers | WunderGraph - WunderGraph
Add any backend to GraphQL Federation without a GraphQL server
Define a subgraph schema. Compile it to Protocol Buffers. Implement in any gRPC language. The Router handles query planning, batching, and response assembly.
The problem
GraphQL Federation has a backend adoption problem
Backend teams must learn a query language, adopt specific server frameworks, and rewrite existing services. Most organizations cannot absorb that cost across every team at once.
Backend teams must learn GraphQL to join the graph
Every team that wants to contribute data to the supergraph needs GraphQL expertise, a compatible server library, and knowledge of Federation concepts. That is a significant adoption cost.
GraphQL library quality varies by language
Some ecosystems have poor or unmaintained GraphQL server libraries. Teams in Go, Java, or Rust may find their options limited or unreliable.
Legacy APIs need full rewrites to become subgraphs
REST, SOAP, and internal services have to be rebuilt from scratch to run as Apollo Federation subgraphs. Months of work per service, with no reuse of existing business logic.
Our solution
gRPC contracts instead of GraphQL servers
Cosmo Connect compiles GraphQL schemas into Protocol Buffer definitions. Backend teams implement gRPC service interfaces in their preferred language. The Router translates GraphQL operations to gRPC calls at runtime.
How it works, end to end
- Define an Apollo-compatible subgraph schema — the same schema you would use for a standard federation subgraph.
- Run the Cosmo CLI to compile the schema into Protocol Buffer definitions and a mapping configuration.
- Implement the generated gRPC service interfaces in any gRPC language: Go, Java, C#, Python, Rust, Node.js, and others.
- Connect the service to the Cosmo Router. No GraphQL framework required on the backend.
- The Router handles all GraphQL query planning, routes operations to gRPC calls, and batches requests via DataLoader.
- All Cosmo platform capabilities — breaking change detection, telemetry, governance — work automatically.
Before & After
| Before Cosmo | With Cosmo |
|---|---|
| Backend teams must learn GraphQL to participate in federation | Teams implement familiar gRPC contracts without GraphQL knowledge |
| Limited language options due to poor GraphQL library support | Any language with gRPC support can participate in the supergraph |
| Migrating legacy systems requires full GraphQL subgraph rewrites | Wrap existing APIs (REST, SOAP) without building full subgraphs |
| Each subgraph framework has varying spec compliance and quality | Strongly-typed proto definitions guarantee correct implementations |
Deployment models
Two ways to connect
Router Plugins: Local processes managed by the Router. Go SDK, plus TypeScript on Bun (no bundled SDK). Lowest latency, unified deployment. Ideal for simple integrations.
gRPC Services: Independent microservices. Any gRPC language. Independent scaling and deployment. Team autonomy.
Both approaches are fully compatible with standard GraphQL subgraphs in the same federated graph.
How Cosmo Connect works
Define: Write a standard Apollo-compatible subgraph schema. Entities, keys, and cross-service field resolution all work with the standard syntax.
Compile: Run the Cosmo CLI to generate Protocol Buffer definitions and mapping configuration. Automatic code generation produces type-safe service stubs for your chosen language.
Implement: Build the gRPC service in any gRPC language. Go, Java, C#, Python, Rust, and many others. No GraphQL knowledge required. Implement the generated interfaces.
Connect: The Router translates GraphQL operations into gRPC calls. DataLoader batches requests automatically. Breaking change detection, telemetry, and governance work out of the box.
Capabilities
What Cosmo Connect provides
Schema compilation, code generation, batching, and full federation compatibility in one toolchain.
Schema-first protobuf compilation
Define a GraphQL schema. The CLI compiles it to Protocol Buffer definitions and mapping config. No manual proto writing.
DataLoader batching built in
The Router batches gRPC requests automatically. N+1 problems are eliminated by default, unlike declarative approaches.
Hot-reload support
Update plugins without service interruption. The Router manages plugin lifecycle including hot-reloading.
Full Federation compatibility
Entities, keys, and cross-service field resolution work. Mix gRPC services and standard GraphQL subgraphs in the same federated graph.
Any gRPC language
Go, Java, C#, Python, Rust, Node.js, and any other language with a gRPC runtime.
AI-assisted code generation
Strongly-typed proto definitions give AI coding assistants a reliable foundation for generating adapter code from OpenAPI specs or example requests.
Start integrating your first backend
Define a schema, run the CLI, implement the gRPC service. No GraphQL server required.
FAQ
Cosmo Connect questions
- Which languages can I use with Cosmo Connect?
- Do backend teams need to know GraphQL?
- What is the difference between Router Plugins and gRPC Services?
- Can I mix gRPC services with existing GraphQL subgraphs?
- How does Cosmo Connect handle N+1 problems?
Full details in the Cosmo Connect documentation.