CLI tool for downloading GraphQL schemas (SDL or JSON) from remote endpoints via introspection. Version 1.1.0 is the current stable release; the tool is simple, single-purpose, and actively maintained. Unlike alternatives (e.g., graphql-cli, get-graphql-schema), gql-sdl does not require a full workflow setup and works out of the box with `npx`. It supports custom headers, output to file, and introspection options from GraphQL.js. Written in TypeScript and ships type definitions.
npm install gql-sdlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Downloads the GraphQL schema in SDL format from the Star Wars API and saves to schema.graphql.
Omit unsupported flags or check server compatibility.
Use -o FILE to specify a base filename when outputting both formats.
Redirect output to file using -o or shell redirection.
Add a header with authentication: -H 'Authorization: Bearer YOUR_TOKEN'
No dependency data recorded yet.