Setting the file. One moment.
Subchapter 12.1
references/configuration.mdMarkdown6 KBView on GitHub
Installation, authentication, and environment configuration for Apollo Rover CLI.
# Install latest version
curl -sSL https://rover.apollo.dev/nix/latest | sh
# Install specific version
curl -sSL https://rover.apollo.dev/nix/v0.26.0 | sh
# Add to PATH (if not automatic)
export PATH="$HOME/.rover/bin:$PATH"# Global install
npm install -g @apollo/rover
# Project-local install
npm install --save-dev @apollo/rover
npx rover --version# Install latest
iwr 'https://rover.apollo.dev/win/latest' | iex
# Install specific version
iwr 'https://rover.apollo.dev/win/v0.26.0' | iexrover --version
rover --help# Opens browser for authentication
rover config authProcess:
# Set via environment variable (recommended for CI/CD)
export APOLLO_KEY=your-api-key
# Or configure directly
rover config auth --api-key your-api-key# Check current authentication
rover config whoamiOutput:
Authenticated as: user@example.com
Organization: My Org
API Key Type: User| Variable | Description | Example |
|---|---|---|
APOLLO_KEY | API key for GraphOS | user:gh.xxx:yyy |
APOLLO_GRAPH_REF | Default graph reference | my-graph@production |
# Set in shell
export APOLLO_KEY=your-api-key
export APOLLO_GRAPH_REF=my-graph@production
# Use in commands
rover subgraph fetch $APOLLO_GRAPH_REF --name products
# Or commands auto-detect APOLLO_GRAPH_REF
rover subgraph fetch --name products# GitHub Actions
env:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
APOLLO_GRAPH_REF: my-graph@production
steps:
- run: rover subgraph check $APOLLO_GRAPH_REF --name products --schema ./schema.graphql# CircleCI
environment:
APOLLO_KEY: ${APOLLO_KEY}
APOLLO_GRAPH_REF: my-graph@productionRover stores configuration in ~/.rover/config.toml.
# View config path
rover config list
# macOS/Linux: ~/.rover/config.toml
# Windows: %USERPROFILE%\.rover\config.toml[profiles.default]
api_key = "user:gh.xxx:yyy"
[profiles.staging]
api_key = "user:gh.xxx:zzz"Use profiles for different environments or accounts.
# Create/update profile
rover config auth --profile staging# Specify profile for command
rover subgraph fetch my-graph@staging --name products --profile stagingrover config listrover subgraph fetch my-graph@production --name productsOutput: Raw SDL schema
rover subgraph fetch my-graph@production --name products --format jsonOutput:
{
"data": {
"sdl": "type Product { ... }",
"name": "products"
},
"error": null
}# Extract just the SDL
rover subgraph fetch my-graph@production --name products --format json | jq -r '.data.sdl'
# Check for errors
rover subgraph check my-graph@production --name products --schema ./schema.graphql --format json | jq '.error'# Increase verbosity
rover --log debug subgraph fetch my-graph@production --name products
# Available levels: error, warn, info, debug, traceexport APOLLO_TELEMETRY_DISABLED=1 # Disable telemetry
export ROVER_LOG=debug # Set log levelRover collects anonymous usage data by default.
export APOLLO_TELEMETRY_DISABLED=1export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080export NO_PROXY=localhost,127.0.0.1,.internal.example.com# Set CA bundle
export SSL_CERT_FILE=/path/to/ca-bundle.crt
# Or for curl-based operations
export CURL_CA_BUNDLE=/path/to/ca-bundle.crt# For development only
export ROVER_SKIP_SSL_VALIDATION=1rover update check# npm
npm update -g @apollo/rover
# curl (reinstall)
curl -sSL https://rover.apollo.dev/nix/latest | shnpm uninstall -g @apollo/rover# Remove binary
rm -rf ~/.rover
# Remove from PATH (in .bashrc/.zshrc)
# Remove: export PATH="$HOME/.rover/bin:$PATH"# Clear and re-authenticate
rm ~/.rover/config.toml
rover config auth# Test connectivity
curl -I https://api.apollographql.com
# Check DNS
nslookup api.apollographql.com# Fix permissions (macOS/Linux)
chmod +x ~/.rover/bin/rover# Check installed location
which rover
# Ensure correct version
rover --version