The router
The entry point to your supergraph
After you set up at least one federation-ready subgraph, you can configure a router to sit in front of your subgraphs. The router serves as the entry point to your supergraph, and it executes incoming operations across one or more of your subgraphs:
Choosing a router library
Apollo actively supports the following options for your router:
The Apollo Router (recommended): This is a high-performance, precompiled Rust binary.
- If you're getting started with federation, we recommend creating a cloud supergraph with Apollo GraphOS. With a cloud supergraph, GraphOS provisions and manages your router for you.
- You can also host your own Apollo Router instances. See the federation quickstart to get started.
Apollo Server: Apollo Server can act as your router via the
@apollo/gateway
extension library.
💡 TIP
Apollo recommends starting with the Apollo Router. It's faster to configure, performant even under high request loads, and supports many enterprise features.
If you'll use the Apollo Router, get started with the resources linked above. If you'll use Apollo Server, see Setting up Apollo Gateway.