Router Configuration Overview

Overview and reference for router configuration


Running an Apollo Router instance involves two key steps:

  • Configuring runtime features declaratively in YAML

  • Getting the schema of the federated supergraph that your router is running

Configuring features in YAML

Configuring the router's features happens primarily via a YAML configuration file. Named router.yaml by default, the router's YAML configuration file lets you configure all of a router's runtime features declaratively.

Getting supergraph schema

As the runtime for a federated graph, a router needs to know the schema of the graph it's running. We call the schema for a federated graph a supergraph schema.

You need to configure the router at startup to know where to get its supergraph schema. The router supports several methods for loading a supergraph schema, each suited for different deployment scenarios.

OCI registry (graph artifacts)

Learn about OCI registry support →

  • ✅ Immutable, versioned schema references

  • ✅ Deterministic deployments (same digest = same schema)

  • ✅ Ideal for blue/green deployments

  • ✅ Reliable rollbacks to any previous version

  • ✅ Works with any infrastructure (Kubernetes, Docker, bare metal)

  • ❌ Requires manual schema version management

  • ❌ Network dependency for registry (can use local registry for independence)

Apollo GraphOS Operator

Learn about Apollo's support for Kubernetes operators →

  • ✅ Kubernetes-native schema management

  • ✅ Easily manages complex deployment workflows

  • ✅ Automatic schema updates with configurable strategies

  • ✅ Built-in blue/green deployment support

  • ✅ Integration with Kubernetes monitoring and logging

  • ❌ Requires Kubernetes infrastructure

Local file

Choose local schema files for local development, testing, or production deployments where you manage schema files directly (often combined with CI/CD pipelines).

Learn about local supergraph files →

  • ✅ Flexible for any infrastructure

  • ✅ Full control over schema version

  • ✅ Easy integration with CI/CD pipelines

  • ✅ Support for hot reloading in local development

  • ❌ Complexity of manual schema file management

  • ❌ Performance impact from hot reloading

Choose managed federation when application teams don't have access to infrastructure.

Learn about GraphOS Uplink and managed federation →

  • ✅ Automatic schema updates

  • ❌ Performance impact from hot reloading

  • ❌ Network dependency for GraphOS Uplink

  • ❌ Less control over deployment timing

Feedback

Edit on GitHub

Ask Community