Getting Started and Installation
Install GraphQL Inspector as a CLI, a GitHub Action, or a programmatic API, and run your first schema check.
You can choose one to more of the following ways to use GraphQL Inspector.
GitHub Action
- Visit GraphQL Inspector on GitHub Marketplace.
- Follow the installation instructions provided in the “GitHub Action” chapter.
CLI
The Command Line Tool provides all the features of GraphQL Inspector and can be installed with a single command:
Install using:
CLI Usage
Options:
| Command | Description | More |
|---|---|---|
| —version | Show version number | [boolean] |
| -r, —require | Require modules | [array] |
| -t, —token | Access Token | [string] |
| -h, —header | Http Header | [array] |
| —hl, —left-header | Http Header - Left | [array] |
| —hr, —right-header | Http Header - Right | [array] |
| —help | Show help | [boolean] |
CLI for CI
Works similar to regular CLI but every feature is pluggable to keep the size as low as possible.
Install using:
Commands
Every command is installable through a package.
- diff -
@graphql-inspector/diff-command - validate -
@graphql-inspector/validate-command - coverage -
@graphql-inspector/coverage-command - similar -
@graphql-inspector/similar-command - introspect -
@graphql-inspector/introspect-command - serve -
@graphql-inspector/serve-command
CLI for CI - Usage
Programmatic API
GraphQL Inspector comes with a programmatic API, here is how to use the Core package.
Install using your favorite package manager:
Programmatic API - Usage
Docker
GraphQL Inspector is also available on Docker.
Bind volumes to /app for working with local files, for example:
To run commands interactively inside of the container, use the following: