Add a script to dump GraphQL schema
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?
- Checkout this branch.
- Run
yarn lint:eslint:all
or any other script in thelint:eslint:*
namespace.- If the task errors-out, you should see a message about the GraphQL schema dump potentially being outdated.
- Make sure you have docker running and run
./scripts/dump_graphql_schema
.- This should build the full schema dump.
- Running
yarn lint:eslint:all
again should now pass successfully (or show expected errors).
Edited by Paul Gascou-Vaillancourt