Skip to content

Add a script to dump GraphQL schema

Paul Gascou-Vaillancourt requested to merge dump-graphql-schema-eslint into master

This adds a script to dump the GraphQL schema. The script leverages a Docker container to build the full-blown Apollo schema which is required for us to mimic the CI ESLint task locally. Running this script will now be required in order to run ESLint locally. This lets us enable the @graphql-eslint/eslint-plugin rule by default.

How to test this?

  1. Checkout this branch.
  2. Run yarn lint:eslint:all or any other script in the lint:eslint:* namespace.
    • If the task errors-out, you should see a message about the GraphQL schema dump potentially being outdated.
  3. Make sure you have docker running and run ./scripts/dump_graphql_schema.
    • This should build the full schema dump.
  4. Running yarn lint:eslint:all again should now pass successfully (or show expected errors).
Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading