Index of every page on this site: llms.txt
All skills
apollographql avatar

/rover

@9dda139 official
by Apollo GraphQLapollographql/skills134 stars
14
Run it yourself

Guide for using Apollo Rover CLI to manage GraphQL schemas and federation. Use this skill when: (1) publishing or fetching subgraph/graph schemas, (2) composing supergraph schemas locally or via GraphOS, (3) running local supergraph development with rover dev, (4) validating schemas with check and lint commands, (5) configuring Rover authentication and environment, (6) exploring or searching a graph's schema for agent-driven discovery (rover schema describe / rover schema search), (7) initializing a new graph project or MCP server with rover init, (8) working with Apollo Connectors, contracts, persisted queries, or client operations, (9) managing API keys, plugins, templates, or graph artifacts.

Use this Skill: https://skilld.dev/gh/apollographql/skills/rover

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesinit.md

≈1.6k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Rover Init Command

Initialize a new federated graph project with rover init. This interactive wizard authenticates with GraphOS, creates a graph in the registry, downloads a starter template, and scaffolds a ready-to-run project directory.

Basic Usage

# Interactive mode (prompts for every option)
rover init

# Initialize with MCP server capabilities
rover init --mcp

# Specify an output directory
rover init --path ./my-project

rover init requires authentication. If you have not signed in, the wizard prompts you to authenticate before continuing.

Interactive Flow

When run without flags, rover init walks through these steps:

  1. Authentication — verifies your GraphOS credentials (via rover auth login, rover config auth or APOLLO_KEY).
  2. Project type — choose to create a new graph or add a subgraph to an existing one.
  3. Organization — select which GraphOS organization owns the graph.
  4. Use case — pick a starting template based on your data source.
  5. Template — download the selected template files.
  6. Project name — enter a name for your project.
  7. Graph ID — confirm or customize the graph identifier in GraphOS.
  8. Preview — review the files that will be created.
  9. Create — scaffold the project, register the graph in GraphOS, and generate an API key.

Project Types

Type Description
Create new Scaffold a brand-new federated graph from a template.
Add subgraph Add a new subgraph to an existing federated graph.

Use Cases (Templates)

Use case Template Best for
Connectors start-with-rest Connecting REST APIs to your graph via Apollo Connectors.
GraphQL start-with-typescript Wrapping existing GraphQL endpoints into a federated subgraph.

What Gets Created

A typical rover init run produces:

my-project/
├── supergraph.yaml         # Supergraph composition config
├── schema.graphql          # Starter subgraph schema
├── .env                    # APOLLO_KEY and APOLLO_GRAPH_REF
├── package.json            # (if TypeScript template)
└── src/                    # Subgraph server source

The wizard also:

  • Registers the graph in GraphOS under your selected organization.
  • Creates a service API key scoped to the new graph.
  • Saves credentials to a .env file in the project directory.

MCP Mode

Use --mcp to scaffold a project with an Apollo MCP Server, making your graph's capabilities accessible to AI agents.

rover init --mcp

MCP Setup Types

The MCP flow prompts you to choose between two setup paths:

Setup Description
New project Create a new graph with MCP server from a template (REST Connectors or GraphQL).
Existing graph Add MCP server capabilities to a graph already registered in GraphOS.

New Project MCP Flow

  1. Select a data source template (REST Connectors or GraphQL).
  2. Choose your organization.
  3. Name the project and confirm the graph ID.
  4. Preview and confirm file creation.
  5. The wizard creates the graph, generates an API key, and scaffolds MCP files.

Files created (in addition to standard project files):

my-project/
├── .apollo/
│   ├── mcp.local.yaml        # Local MCP server config
│   └── mcp.claude.yaml       # Claude Desktop MCP config
├── mcp.Dockerfile             # Container image for MCP server
├── claude_desktop_config.json  # Ready-to-use Claude Desktop config
├── .env                        # Credentials (APOLLO_KEY, APOLLO_GRAPH_REF)
└── supergraph.yaml             # Composition config

Existing Graph MCP Flow

  1. Select an existing graph and variant from your organizations.
  2. Rover fetches the supergraph schema and subgraph list from GraphOS.
  3. Preview and confirm the MCP files to be added.
  4. The wizard generates MCP configuration, a Dockerfile, and a .env file.
# With a specific graph (skip the selection prompt)
rover init --mcp --graph-id my-graph@production

Starting the MCP Server

After rover init --mcp completes, start the server:

# Linux/macOS
set -a && source .env && set +a && rover dev --supergraph-config supergraph.yaml --mcp .apollo/mcp.local.yaml

# Windows PowerShell
Get-Content .env | ForEach-Object { $name, $value = $_.split('=',2); [System.Environment]::SetEnvironmentVariable($name, $value) }
rover dev --supergraph-config supergraph.yaml --mcp .apollo/mcp.local.yaml

The router runs at http://localhost:4000 and the MCP server at http://localhost:5050.

Containerized MCP Deployment

docker build -f mcp.Dockerfile -t my-project-mcp .
docker run --env-file .env -p5050:5050 my-project-mcp

Options Reference

Option Description
--mcp Enable MCP server scaffolding.
--path <PATH> Output directory for the project (default: current directory).
--project-type <TYPE> Skip the project type prompt (create-new or add-subgraph).
--organization <ORG> Pre-select an organization by name or ID.
--project-name <NAME> Pre-set the project name.
--graph-id <ID> Pre-set the graph ID (format: graph-id or graph-id@variant).
--project-use-case <CASE> Pre-select the use case (connectors or graphql-template).

Prerequisites

  • Rover installed and on your PATH.
  • GraphOS authentication configured (rover auth login, rover config auth or APOLLO_KEY environment variable).
  • An empty directory for new projects (non-MCP flow checks that the directory is empty).

Troubleshooting

Directory Not Empty

Cannot initialize because the current directory is not empty

Run rover init from an empty directory, or use --path to specify one.

Authentication Failure

If the wizard fails at the authentication step, run rover auth login, rover config auth or set APOLLO_KEY first, then retry.

Graph ID Already Taken

If the generated graph ID conflicts with an existing graph, the wizard prompts you to choose a different one. You can retry up to three times before the command exits.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning24d5 checks · Risk SAFE
  • Gen Agent Trust Hub24d

    This skill provides a comprehensive guide for managing GraphQL schemas using the Apollo Rover CLI. While it includes commands for remote installation and schema ingestion, these are standard operations targeting official Apollo GraphQL infrastructure and follow security best practices.

  • Socket24d

    No alerts

  • Snyk24d

    Risk: LOW · No issues

  • Runlayer9mo

    6/6 files flagged

  • ZeroLeaks7mo

    1 finding · Score: 82/100

Signed by skilld at 9dda139. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 4 weeks ago
What it can do
Runs commands
compatibility
Node.js v18+, Linux/macOS/Windows
metadata
{
  "author": "apollographql",
  "version": "1.2.0"
}
All 1 allowed tools
Bash(rover:*) Bash(npm:*) Bash(npx:*) Read Write Edit Glob Grep
  • CLI
  • graphql
  • apollo
  • rover
  • federation
  • schema
  • supergraph
  • graphos
  • subgraph

README badge

README badge for apollographql/skills/rover

Manages GraphQL schemas and federation via the Apollo Rover CLI, including publishing subgraphs, composing supergraphs, and validating schemas with check and lint commands. Designed for local schema exploration via piped commands (rover schema describe/search) and GraphOS integration workflows, with built-in support for federated and monograph architectures.

Generated from the current SKILL.md.

Does Rover work with both federated and non-federated GraphQL graphs?
Yes. Use `rover subgraph` commands for federated graphs and `rover graph` commands for monographs (non-federated graphs). Both workflows are supported.
How do I explore a large GraphQL schema without loading the entire SDL into context?
Pipe `rover graph fetch` into `rover schema describe` or `rover schema search` — these commands read the schema via stdin and return only a compact overview or search results, keeping context manageable.
What's the difference between `rover graph fetch` and `rover supergraph fetch`?
`rover graph fetch` returns the API schema (what you can query), while `rover supergraph fetch` returns the composed supergraph SDL with federation internals like `join__` and `link__`. Use the former for schema exploration and the latter for composition/router work.
Can Rover execute GraphQL queries, or does it only manage schemas?
Rover only manages and inspects schemas. To run a generated query, you must send it to the graph's endpoint separately using curl or another HTTP client.
Does this skill require a GraphOS account, or can I use Rover offline?
Most Rover commands (publish, fetch, check) require authentication with a GraphOS API key. Local composition with `rover supergraph compose` and schema exploration of local files work offline.

Generated from the current SKILL.md. These answers refresh after source changes.