The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Skip to main content

Introspection

Dumps an introspection file based on a schema.

Usage#

Run the following command:

graphql-inspector introspect SCHEMA --write path/to/file

It supports .graphql, .gql and .json extensions.

Arguments

Flags

  • -w, --write <s> - overwrite the output (default: graphql.schema.json)
  • -r, --require <s> - require a module
  • -t, --token <s> - an access token
  • -h, --header <s> - set http header (`--header 'Auth: Basic 123')
  • --method - method on url schema pointers (default: POST)
  • --federation - Support Apollo Federation directives (default: false)
  • --aws - Support AWS Appsync directives and scalar types (default: false)

Output

Writes a file with introspection result.

We recommend to use introspect as part of a git hook. Having an always up-to-date schema file might improve your workflow.