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.

referencesconnectors.md

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

Rover Connector Commands

Commands for working with Apollo Connectors, which bridge REST APIs into a GraphQL supergraph. These commands require Federation version 2.12.0 or later.

Shared Options

All rover connector subcommands accept these options:

Option Description
--supergraph-config <PATH> Path to supergraph.yaml. Auto-detected if present in the current directory.
--graph-ref <REF> GraphOS graph reference as baseline (like rover dev).
--federation-version <VERSION> Federation version for composition. Defaults to latest 2.x. Must be >= 2.12.0.

If a supergraph.yaml contains a single subgraph, its schema path is used as the default for commands that accept --schema.

connector list

List all connectors defined in a subgraph schema.

# List connectors in a schema file
rover connector list --schema ./schema.graphql

# List connectors (auto-detected from single-subgraph supergraph.yaml)
rover connector list

Options:

Option Description
--schema <PATH> Path to the schema file. Optional if supergraph.yaml has one subgraph.

Output: Each connector's ID (used by connector run) and the type or field it is attached to.

connector run

Execute a single connector against a live REST endpoint to verify its request/response mapping.

# Run a connector on a field
rover connector run \
  --schema ./schema.graphql \
  --connector-id "Query.products" \
  --variables '{"$args": {"id": "123"}}'

# Run a connector on a type
rover connector run \
  --schema ./schema.graphql \
  --connector-id "Product" \
  --variables '{"$this": {"id": "456"}}'

# When multiple connectors exist on the same element, use an index
rover connector run \
  --schema ./schema.graphql \
  --connector-id "Query.search[1]" \
  --variables '{"$args": {"query": "test"}}'

Options:

Option Description
--schema <PATH> Path to the schema file. Optional if supergraph.yaml has one subgraph.
-c, --connector-id <ID> Connector ID (required). Use connector list to find IDs.
-v, --variables <JSON> JSON variables for the connector (required). Every top-level key must be $args, $this, $batch or $config.

Connector ID forms:

Form Example Meaning
Type Product Connector on the type itself
Type.field Query.products Connector on a specific field
Type.field[N] Query.search[1] Nth connector when multiple exist on one element

Output: The HTTP request Rover sent (method, URI, headers), the raw response (status, body, headers), the mapped GraphQL data, and any mapping problems.

connector test

Run test suites that validate connector behavior using recorded request/response fixtures.

# Run all tests in the default directory (tests/)
rover connector test

# Run tests from a specific file
rover connector test --file tests/products.connector.yml

# Run tests from a specific directory
rover connector test --directory integration-tests/

# Override the schema file
rover connector test --schema ./schema.graphql

# Generate a JUnit XML report
rover connector test --report junit-results.xml

# Continue running after failures
rover connector test --no-fail-fast

Options:

Option Description
-f, --file <PATH> Path to a single test suite file.
-d, --directory <PATH> Directory of test suites (*.connector.yml). Defaults to tests/.
--schema <PATH> Schema file override for all test suites.
--no-fail-fast Log errors without failing the process.
--report <PATH> Write JUnit XML report to this path.
-q, --quiet Suppress test progress output.
-v, --verbose Enable verbose logging.

If neither --file nor --directory is provided, Rover looks for test files in tests/.

connector analyze (macOS only)

Capture and analyze HTTP requests for use in generating connector schemas. Available on macOS only.

analyze curl

Record a single HTTP request for analysis.

rover connector analyze curl https://api.example.com/products \
  -X GET \
  -H "Authorization: Bearer token"

# With request body
rover connector analyze curl https://api.example.com/products \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "test"}'

# Save to a custom analysis directory
rover connector analyze curl https://api.example.com/products \
  --analysis-dir ./my-analysis

Options:

Option Description
<URL> Endpoint URL (required).
-X <METHOD> HTTP method (GET, POST, etc.).
-H <HEADER> HTTP header in Name: Value format. Repeatable.
-d <DATA> JSON request body.
-t <SECONDS> Connection timeout.
--analysis-dir <PATH> Directory to save analysis data.

analyze interactive

Start a local proxy server that captures HTTP traffic for analysis.

rover connector analyze interactive

# Use a custom port (default: 9999)
rover connector analyze interactive --port 8080

analyze clean

Remove previously saved analysis snapshots.

rover connector analyze clean

connector generate (macOS only)

Generate a GraphQL schema with connector directives from previously analyzed requests. Run connector analyze first to capture request/response data.

# Generate from default analysis directory
rover connector generate

# Custom output name (creates <name>.graphql)
rover connector generate --name products

# Custom directories
rover connector generate \
  --analysis-dir ./my-analysis \
  --output-dir ./generated

Options:

Option Description
-n, --name <NAME> Output file name (without extension). Defaults to output.
--analysis-dir <PATH> Directory containing analysis data. Defaults to ./analysis/.
--output-dir <PATH> Directory for generated files. Defaults to build/connectors/.

Workflow

Developing a connector from scratch (macOS)

# 1. Analyze your REST API endpoints
rover connector analyze curl https://api.example.com/users -X GET
rover connector analyze curl https://api.example.com/users/123 -X GET

# 2. Generate a connector schema
rover connector generate --name users

# 3. Review and edit the generated schema
# 4. List connectors to verify
rover connector list --schema ./build/connectors/users.graphql

# 5. Test a connector against the live API
rover connector run \
  --schema ./build/connectors/users.graphql \
  --connector-id "Query.users" \
  --variables '{}'

Testing connectors in CI

# Run all connector tests with JUnit output
rover connector test --report test-results.xml

# Run tests without stopping on first failure
rover connector test --no-fail-fast --report test-results.xml

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.