Registry / devops / apollo

apollo

JSON →
library2.34.0jsnpmunverified

Apollo CLI (v2.34.0) is a command-line tool for Apollo GraphQL that validates schemas, lints operations for compatibility, generates TypeScript/Flow/Swift types, and pushes client-side operations to Apollo Studio. It supports service and client operations like schema download, push, check, and codegen. Release cadence is irregular; development is winding down. Key differentiators include tight integration with Apollo Platform, deep federation support, and built-in type generation. As of Jan 2022, the tool is slated for deprecation—most functionality is being replaced by Rover and Apollo's VSCode extension.

npm install apollo
INSTALL
IMPORT
SIG · APOLLO
A
apollo
devopsjavascriptv2.34.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cli
npx apollo ...
require('apollo')
Apollo CLI is a CLI tool, not a library. Use npx or install globally.
Config
No importable symbols. The package is only a CLI.
This package does not export any programmatic API. Use Rover for Node.js programmatic usage.
types
No importable types. TypeScript types are for the CLI internals only.

Install Apollo CLI globally, push a schema to Apollo Studio, and check local queries against it.

npm install -g apollo@2.34.0 apollo service:push --endpoint=https://example.com/graphql --key=YOUR_APOLLO_KEY apollo client:check --endpoint=https://example.com/graphql --excludes=node_modules/** --queries=./src/**/*.graphql
Debug
Known issues
deprecatedThis package (apollo-tooling) is deprecated as of Jan 2022. Migrate to @apollo/rover.
fix
Use @apollo/rover CLI instead. See https://go.apollo.dev/migrate-to-rover.
affects: >=2.0.0
breakingApollo CLI v2 no longer supports the `apollo schema:check` command; use `apollo service:check`.
fix
Replace `apollo schema:check` with `apollo service:check`.
affects: >=2.0.0
gotchaApollo CLI requires a running Node.js process on the machine and cannot be run in purely serverless environments.
fix
Ensure Node.js is available (engine requirement: >=8, but v2.34 recommends Node >=12).
affects: >=0.0.0
gotchaThe 'apollo client:codegen' command often fails when TypeScript has strict quotes or inconsistent graphql-tag usage.
fix
Ensure all .graphql files use consistent import style and fix TypeScript string quotes.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module '@oclif/command'
Missing peer dependencies due to npm trimming.
fix
Run `npm install -g apollo@2.34.0 --force` or try `npx apollo@2.34.0`.
Error: No Apollo GraphQL service found
Apollo key or endpoint not provided or incorrect.
fix
Set APOLLO_KEY environment variable or pass --key and --endpoint.
Error: Could not find any queries to validate
The --queries or --excludes pattern doesn't match any files.
fix
Ensure the glob pattern (e.g., 'src/**/*.graphql') is correct and the files exist.
Upgrade
Version history
2.34.0latest on npm
Audit
Dependencies
@apollo/roverrequiredOfficial replacement for Apollo CLI. New projects should use Rover instead.
Agent activity
26 hits · last 30 days
node
24
OpenAI (training)
1
Resources
packageapollo
apollo — npm install apollo · libregistry