A CLI tool and programmatic API for generating GraphQL schema representations in Schema Language format (SDL) from a GraphQLSchema object or a running GraphQL server URL. Version 1.0.0 is stable with no recent releases; it is a single-purpose utility that depends on the graphql package. It differentiates from similar tools by supporting both local schema files and remote introspection, outputting directly to STDOUT for easy file redirection.
npm install graphql-introspectNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to introspect a remote GraphQL server and print the schema SDL using async/await.
Use shell redirection: $ graphql-introspect http://example.com/graphql > schema.graphql
Use introspectURL() or introspectFile() explicitly to avoid confusion.
Add a declaration file or use `any` type.
npm install graphql
import { introspect } from 'graphql-introspect'Ensure the argument is a valid GraphQL server URL or path to a JavaScript module exporting a GraphQLSchema