apollo-router

Generate version-aware YAML configuration for Apollo Router v1.x and v2.x.

102|12|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/apollographql/skills --skill apollo-router-apollographql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apollo-router
Source: https://github.com/apollographql/skills/tree/main/skills/apollo-router
Command: npx skills add https://github.com/apollographql/skills --skill apollo-router-apollographql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the complex task of configuring Apollo Router, ensuring your federated GraphQL supergraphs are set up correctly and securely for both development and production environments.

Core Features & Use Cases

  • Version-Aware Configuration: Generates YAML compatible with both Apollo Router v1.x and v2.x, handling critical schema differences.
  • Environment-Specific Defaults: Provides secure production settings and open development defaults.
  • Feature Configuration: Guides users through setting up JWT authentication, CORS, operation limits, telemetry, and more.
  • Validation: Includes a mandatory checklist and supports router config validate for robust configuration checks.
  • Use Case: You need to set up Apollo Router to run a new supergraph. This Skill will guide you through selecting the Router version, choosing between production and development settings, and configuring essential features like authentication and CORS, ultimately generating a validated router.yaml file.

Quick Start

Use the apollo-router skill to generate a production configuration file for Apollo Router v2.

Frequently Asked Questions about apollo-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Apollo Router for a federated GraphQL supergraph?

To configure Apollo Router for a federated GraphQL supergraph, you generate a version-aware YAML configuration file. This involves selecting your router version, choosing between production or development environments, and defining essential features like authentication and CORS.

What is the difference between Apollo Router v1.x and v2.x configuration?

The difference between Apollo Router v1.x and v2.x configuration involves critical schema changes. Generating a version-aware router.yaml ensures compatibility by handling these schema differences correctly for your specific Apollo Router version.

How do I set up JWT authentication and CORS in router.yaml?

You set up JWT authentication and CORS in router.yaml by configuring these specific features during the generation process. This ensures your federated GraphQL supergraph securely handles client requests and cross-origin access.

Does Apollo Router support different settings for production and development environments?

Apollo Router does support different settings for production and development environments. You can generate environment-specific YAML defaults, applying secure production settings or open development defaults to your router configuration.

How do I validate an Apollo Router configuration file?

You validate an Apollo Router configuration file by running the `router config validate` command. This verifies your generated router.yaml against a mandatory checklist to ensure compatibility and security best practices.

What security best practices should I follow when setting up Apollo Router?

Security best practices when setting up Apollo Router include selecting secure production defaults, configuring JWT authentication, setting up CORS, and applying operation limits. Validating your router.yaml ensures these security practices are maintained.