graphql-introspect
CLI tool for building GraphQL schemas representation in the Schema Language format from GraphQLSchema object or GraphQL server URL.
Installation
npm install -g graphql-introspect
Usage
Using remote GraphQL server URL
$ graphql-introspect http://example.com/graphql
Using local schema module
$ graphql-introspect /path/to/schema.js
(See an example of local schema module in test/schema.js
)
Output
graphql-introspect
writes its output to STDOUT
. To save a schema to a file
use output redirection:
$ graphql-introspect /path/to/schema.js > /path/to/schema.graphql
API
const introspect introspectURL introspectFile } = // Same as // Same as