Routing for supergraphs
Learn about self-hosted and cloud routing options
With supergraph architecture (also known as
The router intelligently executes each incoming client operation across the appropriate combination of subgraphs. It then merges subgraph responses into a single response for the client. You can configure your router's error handling, CORS settings, other security features, and more. Your configuration options depend on your router type.
GraphOS router types
With GraphOS, you can you can choose for Apollo to provision and manage a cloud-hosted router for you:
Or you can choose to self-host your router:
Cloud and self-hosted routers are both powered by the Apollo Router—a high-performance routing runtime packaged as a
ⓘ NOTE
Apollo also offers the @apollo/gateway
@apollo/gateway
because it provides
Router comparison
Apollo offers the following router options, in increasing order of configurability:
Router type | Description | Configurability | Plan availability |
---|---|---|---|
Shared cloud router | Apollo provisions and manages routers on shared infrastructure. | Basic configurability, including HTTP header rules, CORS settings, and subgraph error inclusion | Serverless |
Dedicated cloud router | Apollo provisions and manages routers on dedicated infrastructure that you control and scale. | Highly configurable, including all options for shared cloud routers and additional configurations | Dedicated |
Self-hosted router | You host and manage the router on your own infrastructure. | Highly configurable and customizable, including all options for Cloud Dedicated routers and additional customization options | Apollo Router is available as a free and source-available runtime. Connecting your self-hosted router to GraphOS requires an Enterprise plan. |
GraphOS router features
Although all GraphOS routers (both cloud- and self-hosted) are powered by the source-available Apollo Router binary, they offer an expanded feature set that isn't available when running the Apollo Router without connecting it to GraphOS.
Cloud-hosted routers automatically have access to additional GraphOS router features, while self-hosted routers must be authenticated with a GraphOS Enterprise license to gain access to these features. Refer to the
Setup and configuration
For setup and configuration instructions, refer to the respective router documentation: