If your schema is already published to the registry, you can download specific versions (variants):
There are three primary ways to download your schema: using the modern , the legacy Apollo CLI , or the Apollo Studio web interface. 1. The Modern Way: Apollo Rover CLI
While deprecated for server-side tasks, the legacy is still used by some teams for client-side code generation. Migrating to Rover - Apollo GraphQL Docs
rover graph fetch my-graph@my-variant --output schema.graphql Use code with caution. 2. The Legacy Way: Apollo CLI
Complete Guide: How to Download a GraphQL Schema for Apollo Downloading a GraphQL schema is a critical first step for any developer using or Apollo Server , as it enables essential features like Introspection , TypeScript type generation , and schema validation .
If your GraphQL server is currently running, use the introspect command to fetch the schema directly from the endpoint:
is Apollo's current, recommended tool for managing schemas, especially for federated graphs. Fetching via Introspection (Running Server)
# For a standard (monolithic) graph rover graph introspect http://localhost:4000/graphql > schema.graphql # For a federated subgraph rover subgraph introspect http://localhost:4000/graphql > subgraph.graphql Use code with caution. Fetching from Apollo GraphOS (Cloud Registry)
