A minimal CLI and Node.js library (v0.2.1, last updated March 2018) for fetching a GraphQL schema via an introspection query and outputting JSON or readable SDL. Currently in maintenance mode with no active development. Simpler than graphql-cli's introspection command, with no dependency on graphql-core; plain HTTP fetch and JSON parse.
npm install fetch-graphql-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Fetches a GraphQL schema via introspection and logs the result in readable SDL format.
Use Node >= 8 or rely on built-in fetch (experimental in 18+).
Only use documented options: { readable, headers, method }.Check stderr or validate JSON output manually.
Use const fetchSchema = require('fetch-graphql-schema');Ensure server is running and URL is correct.
Do not use curly braces; assign default export directly.