Tool Usage

In addition the module, several tools are available.

gqlmod command

Included in the package is a gqlmod tool. This provides static analysis functionality outside of your software.

gqlmod check

Checks graphql files for syntax and schema validty. Unlike importing, all findable errors are reported.

Give the list of files to check, or pass –search to scan the current directory (recursively).

GitHub Action

The check function is also available as a GitHub Action (with extra annotation integration).

name: gqlmod check

on: push

    runs-on: ubuntu-latest
      - uses: actions/checkout@v1
          fetch-depth: 1
      - uses: gqlmod/check-action@master
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

You do need to use the actions/checkout action before calling gqlmod/check-action, and the GITHUB_TOKEN argument is required.