Deploy Apollo Router in Test Environments
Deploy the Apollo Router in a test environment
This guide walks you through deploying the Apollo Router in a test environment, focusing on setup, configuration, and best practices for non-production use cases.
Prerequisites
A GraphOS organization and member account
By the end of the milestone, you'll have:
Successfully downloaded and installed the Apollo Router binary or container image
Obtained or composed a supergraph schema for your test environment
Run the Apollo Router in a test environment, exposing a GraphQL endpoint
Connected the Router to your test environment subgraphs
Applied best practices for test environment deployments
Steps to complete
Prepare environment and artifacts
Refer to the environment best practices guide.
Set up a dedicated test environment, which may include separate Kubernetes clusters, databases, and CI/CD configurations.
Create a staging or test graph variant to mirror real-world deployment stages, for example mygraph@develop or mygraph@test.
Deploy Subgraphs to test environment
Deploy subgraph services to your test environment
Configure subgraph endpoints with test URLs and ensure they're accessible by the router
Set up subgraph monitoring to track performance, errors, and resource usage
Ensure subgraphs are publishing schemas to the test graph variant
Deploy the Router to test environment
Create a new repository or location in your repository to manage the deployment configuration of the router
Follow the instructions for the GraphOS Apollo Container to deploy with Docker
Deploy the Router to test environment pointing at your test graph variant with
APOLLO_GRAPH_REFandAPOLLO_KEY