Use GraphQL Federation to connect, observe and collaborate on your microservices - WunderGraph
The more microservices you have, the more difficult it is to observe and connect them. Use Federation to connect, observe and collaborate on your microservices
Auto-generate a unified API surface from your microservices. Cosmo can manage federated APIs across teams with no coordination overhead required.
Book free crash course Read Cosmo docs
Federation: unified microservices
Moving from monoliths to microservices makes sense, but it comes with the challenge of orchestrating communication with these services. GraphQL Federation creates one unified GraphQL API, or unified Graph, of all microservices. This is the central touchpoint through which developers can funnel all requests, without having to consider which microservices deliver which part of the response. In a way, Federation allows developers to work with a complex landscape of microservices as if they were a single monolith, with all the advantages that come with it. Together with a Federation platform like Cosmo, it's easy to leverage all benefits in collaboration, coordination, and robustness.
Book free Federation intro course Read the Cosmo docs
- GraphQL
GraphQL Federation is a concept or architecture model to combine many GraphQL schemas into a single GraphQL API
Instead of querying every single microservice, GraphQL Federation enables developers to communicate with any number of microservices using a single request.
Together with a Federation platform like Cosmo, this concept delivers substantial efficiency gains when working with many microservices across larger organizations.
With a Federation platform come more benefits, such as observability, breaking change detection, or tracing.
In large organizations, orchestrating changes to microservices can be an efficiency killer
Federation enables GraphQL collaboration at scale
Say goodbye to breaking changes
Using GraphQL with your microservice APIs saves bandwidth and simplifies interaction with their data. The more microservices you use, the more challenging it becomes to collaborate on integrating microservice APIs without breaking changes.
Federation as a concept allows you to merge all of your microservice data Graphs into one single Master Graph automatically. This is possible because breaking changes are identified and visualized before such commits are approved. This allows every developer to safely consume data from this Master Graph, and makes your software much more robust. Collaboration on data provided by the Master Graph does no longer need to be closely coordinated to prevent bugs and merge conflicts which take time to resolve.
Contact us for details Schema checks in Cosmo
- GraphQL
Federation creates one single source of truth for all your dev teams: a unified GraphQL API to query any microservice.
Developers can work on their microservices independently. When they do a commit, the Federation platform will validate it and prevent breaking changes.
Due to the independence of the dev teams, the coordination effort on changes is reduced significantly, especially at scale.
As a result, software robustness also increases, which means less debugging effort.
Last, but not least, a Federation platform will track all changes in a comprehensive change log to help identify the source of problems.
Observability allows deep API insights across all connected services
You Can’t Scale Federation Without Understanding Graph Usage
Observability for federated Graphs
Besides collaboration, the most critical element of leveraging the potential of your microservices is understanding their use. A Federation platform like Cosmo provides analytics and metrics for you to understand how your microservice APIs are being used. For example, distributed tracing allows you to track a request end-to-end to identify potential issues or identify potential for performance improvements. As many organizations will already have an analytics stack, Cosmo offers an OTEL integration to make all collected data available. If you run your own router, this means that your analytics traffic stays within your network, drastically reducing egress and cost.
Talk to Sales Tracing in Cosmo
A Federation platform provides visibility into the use of all subgraphs and the Master Graph. This is a must-have for Dev team / DevOps managers.
You should be able to tell which consumers exist, who collaborates on which subgraphs, what kind of data they use, and how much requests they make.
Advanced features such as distributed tracing, as provided by the Cosmo platform, will help you understand how a request is processed end to end.
If you use your own analytics stack, make sure you can extract Federation usage data through OTEL
If you want to move fast, rely on a GraphQL Federation platform
The Cosmo platform enables GraphQL Federation
Federation made simple with Cosmo
If you don't intend to build everything on your own, which is not recommended if you want to move fast, you should rely on a GraphQL Federation platform like Cosmo to make things as simple as possible and easy to adopt for your teams.
The Cosmo platform comes with a Router as the core component. Acting as an API gateway, it orchestrates the requests to your microservice APIs and needs to be able to scale with the volume of requests.
A control plane with CLI allows CI/CD integration of all Federation operations. In addition to that, Cosmo Studio as UI provides visualizations of your Master Graph and subgraphs. It also lets you check logs and tracing information, and allows you to do most of the CLI-based operations as well.
Finally, if you want to keep the metrics within your stack, you need a metrics collector like OTEL. You can find out more about what's needed and how the components work together in the Cosmo documentation below. Last but not least, with Cosmo you choose an open-source solution that you can run on-prem. This helps to keep costs down, adds transparency (important for compliance) and provides maximum flexibility without vendor lock.
Cosmo Router/Gateway implements GraphQL Federation v1 and v2, playground included. It is fast, robust, scalable and secure.
Cosmo CLI allows direct access to the control plane to integrate seamlessly with your CI/CD pipeline.
Cosmo Studio is the UI to explore and manage your subgraphs and Master Graph. Access comprehensive analytics and traces, log files or the list of requested changes.
The changelog and schema explorer tell you exactly how your GraphQL schemas interact, and allows auditing on who committed which changes at which time.
Automated schema checks effectively prevent breaking changes. This allows many teams to work on the same graphs simultaneously without much coordination overhead.
Cosmo can be run on-prem or as SaaS. If your compliance requirements demand it, Cosmo fits your needs by being a stand-alone open-source solution.
Observability can be easily connected to your existing stack with OTEL.
Cosmo: Built for Developers and DevOps Teams
Inspect subgraphs, composition status and metrics
Built-in compliance and full flexibilityFeatures that help you focus on things that matter
Maximized compliance
You have complete autonomy over where to run all the components, including Studio, Control Plane, and Router. This empowers you to adopt GraphQL while adhering to strict data regulation policies.
Schema checks
Detect breaking changes before they affect your federated graph. Use our Github action for automated schema checks on every pull request.
OTEL compatibility
Use your existing OTEL stack and push data from your subgraphs and services to Cosmo. Combined with distributed tracing, it allows you to build a unified view on the entire request / response journey.
ClickHouse & Postgres compatibility
Cosmo relies on ClickHouse for analytical data and Postgres for storing everything else. You can connect your own cluster or use a database provider like ClickHouse Cloud and Neon to offload the most complex parts of the stack.
Unlimited customizability
Customize your router by writing a few lines of Go code and compiling it with a single command. This ensures full flexibility and easy debugging in the Go ecosystem rather than just working with scripts.
Kubernetes ready
We provide a Helm Chart and Terraform module to deploy a production-grade version of the Cosmo Platform to any Kubernetes distribution on Google, AWS or Azure.
Designed for the best for performance and unlimited customizability.
Analytics
Understand how and by whom your graph is consumed, monitor usage and track down potential performance and latency issues. Unlimited data retention for analytics and audit logs.
Scalability
There is no limit to the number of federated graphs and subgraphs; all components are horizontally scalable. Use the labeling engine to organize and compose subgraphs from multiple teams and environments.
One stack for best performance
All components have been built alongside each other allowing for an unparalleled developer experience and high performance.
Get in touch so we can help you!
We'd love to hear about your use-case and how we can help you to take your infrastructure to the next level.