Skillshub rover
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/apollographql/skills/rover" ~/.claude/skills/comeonoliver-skillshub-rover && rm -rf "$T"
manifest:
skills/apollographql/skills/rover/SKILL.mdsource content
Apollo Rover CLI Guide
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.
Quick Start
Step 1: Install
# 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
Step 2: Authenticate
# Interactive authentication (opens browser) rover config auth # Or set environment variable export APOLLO_KEY=your-api-key
Step 3: Verify Installation
rover --version rover config whoami
Core Commands Overview
| Command | Description | Use Case |
|---|---|---|
| Publish subgraph schema to GraphOS | CI/CD, schema updates |
| Validate schema changes | PR checks, pre-deploy |
| Download subgraph schema | Local development |
| Compose supergraph locally | Local testing |
| Local supergraph development | Development workflow |
| Publish monograph schema | Non-federated graphs |
Graph Reference Format
Most commands require a graph reference in the format:
<GRAPH_ID>@<VARIANT>
Examples:
my-graph@productionmy-graph@staging
(default variant)my-graph@current
Set as environment variable:
export APOLLO_GRAPH_REF=my-graph@production
Subgraph Workflow
Publishing a Subgraph
# 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
Checking Schema Changes
# Check against production traffic rover subgraph check my-graph@production \ --name products \ --schema ./schema.graphql
Fetching Schema
# Fetch from GraphOS rover subgraph fetch my-graph@production --name products # Introspect running server rover subgraph introspect http://localhost:4001/graphql
Supergraph Composition
Local Composition
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
Compose:
rover supergraph compose --config supergraph.yaml > supergraph.graphql
Fetch Composed Supergraph
rover supergraph fetch my-graph@production
Local Development with rover dev
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
With MCP Integration
# Start with MCP server enabled rover dev --supergraph-config supergraph.yaml --mcp
Reference Files
Detailed documentation for specific topics:
- Subgraphs - fetch, publish, check, lint, introspect, delete
- Graphs - monograph commands (non-federated)
- Supergraphs - compose, fetch, config format
- Dev - rover dev for local development
- Configuration - install, auth, env vars, profiles
Common Patterns
CI/CD Pipeline
# 1. Check schema changes rover subgraph check $APOLLO_GRAPH_REF \ --name $SUBGRAPH_NAME \ --schema ./schema.graphql # 2. If check passes, publish rover subgraph publish $APOLLO_GRAPH_REF \ --name $SUBGRAPH_NAME \ --schema ./schema.graphql \ --routing-url $ROUTING_URL
Schema Linting
# Lint against GraphOS rules rover subgraph lint --name products ./schema.graphql # Lint monograph rover graph lint my-graph@production ./schema.graphql
Output Formats
# 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
Ground Rules
- ALWAYS authenticate before using GraphOS commands (
orrover config auth
)APOLLO_KEY - ALWAYS use the correct graph reference format:
graph@variant - PREFER
beforerover subgraph check
in CI/CDrover subgraph publish - USE
for local supergraph development instead of running Router manuallyrover dev - NEVER commit
to version control; use environment variablesAPOLLO_KEY - USE
when parsing output programmatically--format json - SPECIFY
explicitly in supergraph.yaml for reproducibilityfederation_version - USE
to extract schemas from running servicesrover subgraph introspect