/apollo-skills:roverfrom apollo-skills
Guides using Apollo Rover CLI to manage GraphQL schemas, federation, and GraphOS. Covers schema publish/fetch, supergraph composition, local dev with rover dev, validation, authentication, schema exploration, project init, and API key management.
Ships in apollo-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Rover is the official CLI for Apollo GraphOS. It helps you manage schemas, run composition locally, publish to GraphOS, and develop supergraphs on your local machine.
# macOS/Linux
curl -sSL https://rover.apollo.dev/nix/latest | sh
# npm (cross-platform)
npm install -g @apollo/rover
# Windows PowerShell
iwr 'https://rover.apollo.dev/win/latest' | iex
# OAuth login via browser (recommended for local dev)
rover auth login
# Or interactive API key entry
rover config auth
# Or set environment variable (recommended for CI/CD)
export APOLLO_KEY=your-api-key
rover --version
rover auth whoami # OAuth identity
rover config whoami # API key identity
# Create a new federated graph project
rover init
# Create a project with MCP server
rover init --mcp
To answer "what's in this graph?", find a field, or write a query against a GraphOS graph, fetch the API schema and pipe it into rover schema — this keeps the SDL out of your context and returns only what you need:
# What can I query? (compact overview)
rover graph fetch <graph@variant> | rover schema describe -
# Find a field by concept/keyword (returns the path from a root operation)
rover graph fetch <graph@variant> | rover schema search - "<keyword>"
# Zoom into one type or field
rover graph fetch <graph@variant> | rover schema describe - --coord <Type.field> --depth 1
Three rules that keep this correct:
rover graph fetch (the API schema) — not rover supergraph fetch (that returns composition SDL with federation internals like join__/link__).rover graph fetch alone and read the raw SDL (a large schema floods your context; that's exactly what rover schema avoids).schema commands read piped SDL, not a graph ref — rover schema describe <graph@variant> fails; you must fetch first and pipe.Full reference, ranking rules, and the save-once pattern: Schema Exploration and references/schema.md.
| Command | Description | Use Case |
|---|---|---|
rover init | Initialize a new federated graph project | New project setup, MCP server setup |
rover subgraph publish | Publish subgraph schema to GraphOS | CI/CD, schema updates |
rover subgraph check | Validate schema changes | PR checks, pre-deploy |
rover subgraph fetch | Download subgraph schema | Local development |
rover subgraph preview | Preview supergraph changes without publishing | What-if analysis |
rover supergraph compose | Compose supergraph locally | Local testing |
rover supergraph config | Expand or get JSON schema for supergraph.yaml | Config validation |
rover dev | Local supergraph development | Development workflow |
rover graph publish | Publish monograph schema | Non-federated graphs |
rover schema describe | Explore a schema by coordinate; takes SDL via stdin/file, not a graph ref — pipe from rover graph fetch | Agent schema discovery |
rover schema search | Search a schema by keyword; takes SDL via stdin/file, not a graph ref — pipe from rover graph fetch | Agent schema discovery |
rover connector | Work with Apollo Connectors (run, test, list) | Connector development |
rover contract | Manage contract variants (describe, preview, publish) | API surface filtering |
rover persisted-queries | Generate and publish persisted query manifests (alias: pq) | Security, performance |
rover client check | Validate client operations against a graph schema | Client-side CI |
rover auth login | Authenticate via OAuth browser flow | Local dev auth |
rover auth grants revoke | Revoke all OAuth grants for a user in an organization | Access management |
rover api-key | Create, list, delete, rename, rotate API keys | Key management |
rover info | Print Rover version, OS, and shell info | Troubleshooting |
rover readme | Fetch or publish graph variant READMEs | Graph documentation |
rover template | List and use project templates | Scaffolding |
Most commands require a graph reference in the format:
<GRAPH_ID>@<VARIANT>
Examples:
my-graph@productionmy-graph@stagingmy-graph@current (default variant)Set as environment variable:
export APOLLO_GRAPH_REF=my-graph@production
# From schema file
rover subgraph publish my-graph@production \
--name products \
--schema ./schema.graphql \
--routing-url https://products.example.com/graphql
# From running server (introspection)
rover subgraph publish my-graph@production \
--name products \
--schema <(rover subgraph introspect http://localhost:4001/graphql) \
--routing-url https://products.example.com/graphql
# Check against production traffic
rover subgraph check my-graph@production \
--name products \
--schema ./schema.graphql
# Fetch from GraphOS
rover subgraph fetch my-graph@production --name products
# Introspect running server
rover subgraph introspect http://localhost:4001/graphql
Create supergraph.yaml:
federation_version: =2.9.0
subgraphs:
products:
routing_url: http://localhost:4001/graphql
schema:
file: ./products/schema.graphql
reviews:
routing_url: http://localhost:4002/graphql
schema:
subgraph_url: http://localhost:4002/graphql
federation_version here is the composition version — it only needs to be ≥
each subgraph's @link floor, so subgraphs pinned to a lower version compose
fine. Federation 3 is available as a preview (federation_version: 3). Federation 1
is no longer supported (error E064). If a subgraph server throws
UNKNOWN_FEDERATION_LINK_VERSION at startup, that's a client-library lag, not a
composition problem. See the apollo-federation skill's
Federation versions.
Compose:
rover supergraph compose --config supergraph.yaml > supergraph.graphql
rover supergraph fetch my-graph@production
This returns the supergraph SDL (federation directives +
join__/link__internals) — use it for composition/router work. To explore what you can query or write an operation, userover graph fetch(the API schema) instead — see Explore a Graph's Schema.
rover devStart a local Router with automatic schema composition:
# Start with supergraph config
rover dev --supergraph-config supergraph.yaml
# Start with GraphOS variant as base
rover dev --graph-ref my-graph@staging --supergraph-config local.yaml
# Start with MCP server enabled
rover dev --supergraph-config supergraph.yaml --mcp
rover schema describe and rover schema search let an agent explore a schema without loading the full SDL into context — that is the entire point of these commands.
⚠️ Never read the raw SDL into context. Running
rover graph fetch <ref>(orrover graph introspect <url>) on its own prints the entire schema — hundreds to tens of thousands of lines — straight into your context, which defeats the purpose of these commands. Always pipe fetch output intorover schema describe/search: the SDL flows through stdin and only the compact overview/results reach you. (Fetching to a file is fine when the user actually wants the SDL.)These commands also take SDL on stdin or a file, NOT a graph ref — you can't pass
graph@variantto them. Fetch first, then pipe:❌ rover schema describe my-graph@current # error: looks for a file named that ❌ rover graph fetch my-graph@current # dumps the full SDL into your context ✅ rover graph fetch my-graph@current | rover schema describe -
To explore a graph in GraphOS, fetch its schema and pipe it in. Use rover graph fetch (the API schema) for "what can I query?" exploration — it omits federation internals. Reach for rover supergraph fetch only when you need composition details (join__/link__ types, subgraph structure):
# Overview of a GraphOS graph
rover graph fetch my-graph@current | rover schema describe -
# Find fields by keyword (results include paths from root operations)
rover graph fetch my-graph@current | rover schema search - "playback"
# Zoom into a coordinate, expanding referenced types one level
rover graph fetch my-graph@current | rover schema describe - --coord <Type.field> --depth 1
Coordinate forms: --coord accepts a type (User), a field (User.posts), a field argument (Type.field(arg:)), or a directive (@deprecated) — omit it for the overview.
search vs describe: reach for rover schema search first when matching a concept or keyword and you don't yet know the field name — it finds nested fields and shows the path from a root operation. The describe overview lists only root fields, so search is how you locate fields buried deeper. Use describe for the overview or once you know the type/field coordinate.
This enables a closed-loop workflow — search → describe → write a query — with no MCP server setup. See Schema Exploration for the full command reference, ranking rules, and the save-once pattern for large schemas.
Running the generated operation: Rover does not execute queries — it only manages and inspects schemas. To actually run a generated query you need the graph's endpoint:
rover subgraph list <graph@variant> prints the Routing Url — send the query there with curl.$APOLLO_KEY, so ad-hoc API calls will come back unauthenticated.Detailed documentation for specific topics:
rover init project initialization and MCP server setuprover connector run, test, list, analyze, generate# Option 1: Check and publish in one command (recommended)
rover subgraph publish $APOLLO_GRAPH_REF \
--name $SUBGRAPH_NAME \
--schema ./schema.graphql \
--routing-url $ROUTING_URL \
--check
# Option 2: Separate check, then publish only if the check passes
rover subgraph check $APOLLO_GRAPH_REF \
--name $SUBGRAPH_NAME \
--schema ./schema.graphql &&
rover subgraph publish $APOLLO_GRAPH_REF \
--name $SUBGRAPH_NAME \
--schema ./schema.graphql \
--routing-url $ROUTING_URL
# Lint against GraphOS rules
rover subgraph lint --name products ./schema.graphql
# Lint monograph
rover graph lint my-graph@production ./schema.graphql
# JSON output for scripting
rover subgraph fetch my-graph@production --name products --format json
# Plain output (default)
rover subgraph fetch my-graph@production --name products --format plain
rover auth login, rover config auth, or APOLLO_KEY)graph@variantrover subgraph check before rover subgraph publish in CI/CDrover dev for local supergraph development instead of running Router manuallyrover init to scaffold new graph projects instead of manual setupAPOLLO_KEY or APOLLO_CLIENT_SECRET to version control; use environment variables--format json when parsing output programmaticallyfederation_version explicitly in supergraph.yaml for reproducibilityrover subgraph introspect to extract schemas from running servicesrover schema search / rover schema describe (piped from a fetch) to explore large schemas instead of loading the full SDL into contextrover graph fetch/introspect into rover schema describe/search (a bare fetch is only for when the user wants the SDL file itself)rover client check to validate client operations before deploying client changesrover persisted-queries publish to register operations for persisted query enforcementreferences/additional-commands.md (opens in a new tab)references/auth-grants.md (opens in a new tab)references/client.md (opens in a new tab)references/configuration.md (opens in a new tab)references/connectors.md (opens in a new tab)references/contracts.md (opens in a new tab)references/dev.md (opens in a new tab)references/graphs.md (opens in a new tab)references/init.md (opens in a new tab)references/lsp.md (opens in a new tab)references/persisted-queries.md (opens in a new tab)references/project-config.md (opens in a new tab)references/schema.md (opens in a new tab)references/subgraph-preview.md (opens in a new tab)references/subgraphs.md (opens in a new tab)references/supergraphs.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
15 skills in this plugin
/apollo-clientGuide for building React applications with Apollo Client 4.x. Use this skill when: (1) setting up Apollo Client in a React project, (2) writing GraphQL queries or mutations with hooks, (3) configuring caching or cache policies, (4) managing local state with reactive variables, (5) troubleshooting Apollo Client errors or performance issues.
/apollo-connectorsDEPRECATED: superseded by the graphos-factory skill (npx skills add apollographql/skills@graphos-factory), which builds and maintains a Connectors subgraph from a REST API with recorded decisions and verification. Guide for integrating REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives. Use this skill when the user: (1) mentions "connectors", "Apollo Connectors", or "REST Connector", (2) wants to integrate a REST API into GraphQL, (3) references @source or @connect directives, (4) works with files containing "# Note to AI Friends: This is an Apollo Connectors schema".
/apollo-federationGuide for authoring Apollo Federation subgraph schemas. Use this skill when: (1) creating new subgraph schemas for a federated supergraph, (2) defining or modifying entities with @key, (3) sharing types/fields across subgraphs with @shareable, (4) working with federation directives (@external, @requires, @provides, @override, @inaccessible), (5) troubleshooting composition errors, (6) any task involving federation schema design patterns.
/apollo-iosGuide for building Apple-platform applications with Apollo iOS, the strongly-typed GraphQL client for Swift. Use this skill when: (1) adding Apollo iOS to a Swift Package Manager or Xcode project, (2) configuring `apollo-codegen-config.json` and running code generation, (3) configuring an `ApolloClient` with auth, interceptors, and caching, (4) writing queries, mutations, or subscriptions from SwiftUI views, (5) writing tests against generated operation mocks.
/apollo-kotlinGuide for building applications with Apollo Kotlin, the GraphQL client library for Android and Kotlin. Use this skill when: (1) setting up Apollo Kotlin in a Gradle project for Android, Kotlin/JVM, or KMP, (2) configuring schema download and codegen for GraphQL services, (3) configuring an `ApolloClient` with auth, interceptors, and caching, (4) writing queries, mutations, or subscriptions,
/apollo-mcp-serverGuide for using Apollo MCP Server to connect AI agents with GraphQL APIs. Use this skill when: (1) setting up or configuring Apollo MCP Server, (2) defining MCP tools from GraphQL operations, (3) using introspection tools (introspect, search, validate, execute, explorer), (4) configuring authentication, CORS, health checks, or telemetry, (5) writing Rhai scripts for request lifecycle hooks, (6) defining MCP prompts, (7) troubleshooting MCP server connectivity or tool execution issues, (8) building MCP Apps for interactive UI experiences, (9) deploying Apollo MCP Server to production.
Other plugins' skills for the same job
npx claudepluginhub apollographql/skills --plugin apollo-skills