apollo-router
БесплатноБез исполняемых скриптовНе проверенVersion-aware guide for configuring and running Apollo Router for federated GraphQL supergraphs. Generates correct YAML for both Router v1.x and v2.x. Use…
Об этом скилле
Apollo Router Config Generator
Apollo Router is a high-performance graph router written in Rust for running Apollo Federation 2 supergraphs. It sits in front of your subgraphs and handles query planning, execution, and response composition.
This skill generates version-correct configuration. Router v1 and v2 have incompatible config schemas in several critical sections (CORS, JWT auth, connectors). Always determine the target version before generating any config.
Step 1: Version Selection
Ask the user before generating any config:
Which Apollo Router version are you targeting?
[1] Router v2.x (recommended — current LTS, required for Connectors)
[2] Router v1.x (legacy — end-of-support announced, security patches only)
[3] Not sure — help me decide
If the user picks [3], display:
Quick guide:
• Pick v2 if: you're starting fresh, using Apollo Connectors for REST APIs,
or want backpressure-based overload protection.
• Pick v1 if: you have an existing deployment and haven't migrated yet.
Note: Apollo ended active support for v1.x. The v2.10 LTS (Dec 2025)
is the current baseline. Migration is strongly recommended.
Tip: If you have an existing router.yaml, you can auto-migrate it:
router config upgrade router.yaml
Store the selection as ROUTER_VERSION=v1|v2 to gate all subsequent template generation.
For v2, also ask for the exact version (router --version) when the config includes limits. The limits shape changed in v2.15.0, so store it as ROUTER_MINOR and pick the shape from it (see Ground Rules).
Step 2: Environment Selection
Ask: Production or Development?
- Production: security-hardened defaults (introspection off, sandbox off, homepage off, subgraph errors hidden, auth required, health check on)
- Development: open defaults (introspection on, sandbox on, errors exposed, text logging)
Load the appropriate base template from:
templates/{version}/production.yamltemplates/{version}/development.yaml
Step 3: Feature Selection
Ask which features to include:
- JWT Authentication
- Declarative Authorization (field-level
@authenticated/@requiresScopes/@policydirectives — requires GraphOS + request claims) - CORS (almost always yes for browser clients)
- Operation Limits
- Traffic Shaping / Rate Limiting
- Telemetry (Prometheus, OTLP tracing, JSON logging)
- APQ (Automatic Persisted Queries — performance/bandwidth only, NOT a security control)
- Persisted Query Safelisting (GraphOS PQL operation allowlist — a security control; distinct from APQ)
- Connectors (REST API integration — Router v2 only; GA key is
connectors, early v2 preview key waspreview_connectors) - Subscriptions
- Header Propagation
- Response Caching (entity + root field caching with Redis — Router v2 only, v2.6.0+)
- Demand Control (cost-based query protection with
@cost/@listSizedirectives — measure or enforce modes)
Step 4: Gather Parameters
For each selected feature, collect required values.
- Use section templates from
templates/{version}/sections/forauth,cors,headers,limits,telemetry, andtraffic-shaping. - For Connectors in v2, use
templates/v2/sections/connectors.yamlas the source. - For APQ and subscriptions, copy the snippet from the selected base template (
templates/{version}/production.yamlortemplates/{version}/development.yaml) or from references. - Only offer Connectors when
ROUTER_VERSION=v2.
CORS
- List of allowed origins (never use
"*"for production)
JWT Authentication
- JWKS URL
- Issuer(s) — note: v1 uses singular
issuer, v2 uses pluralissuersarray
Declarative Authorization (field-level)
Field- and type-level access control enforced in the router, via the
@authenticated,@requiresScopes, and@policydirectives applied in subgraph schemas. This is the layer that the globalauthorization.require_authenticationgate cannot express. It is a GraphOS feature (Enterprise; Developer/Standard plans require Router v2.6.0+) and requires a router connected to GraphOS. Directives are enabled by default — config only turns them off.
Confirm prerequisites before recommending these:
- Router connected to GraphOS (Router v1.29.1+; Developer/Standard plans need v2.6.0+).
- A claims source. Directives evaluate the claims at the
apollo::authentication::jwt_claimscontext key. Populate it via JWT authentication (configure that feature too) or a coprocessor that injects claims. @policyadditionally requires a Supergraph plugin (Rhai script or coprocessor) to evaluate each policy — the router extracts required policies intoapollo::authorization::required_policiesbut does not decide them itself.
Ask:
- Which fields/types need protection, and at what level? (
@authenticated= any valid identity;@requiresScopes= specific scopes;@policy= cust
Установить apollo-router в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(router:*)Bash(./router:*)Bash(rover:*)Bash(curl:*)Bash(docker:*)ReadWriteEditGlobGrepВложенные файлы
FAQ
Что делает скилл apollo-router?
Version-aware guide for configuring and running Apollo Router for federated GraphQL supergraphs. Generates correct YAML for both Router v1.x and v2.x. Use this skill when: (1) setting up Apollo Router to run a supergraph, (2) configuring routing, headers, or CORS, (3) implementing custom plugins (Rhai scripts or coprocessors), (4) configuring telemetry (tracing, metrics, logging), (5) troubleshooting Router performance or connectivity issues, (6) securing the graph with JWT, declarative field-level authorization directives, or persisted-query safelisting, (7) managing router.yaml as version-controlled config with CI/CD validation, (8) configuring demand control (cost-based query protection with @cost/@listSize directives).
Как установить скилл apollo-router?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл apollo-router запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub