Skip to content

Add new CI task for linting GraphQL with Apollo tooling

Vitaly Slobodin requested to merge vs/add-fe-graphql-apollo-lint into master

What does this MR do and why?

Add Apollo tooling to improve our linting of GraphQL files with schema. To achieve that we create a new dependency of eslint job. Let the eslint job dependent on the graphql-schema-dump job to get the GraphQL schema which we use for running ESLint . But before we can do that we need to download (merge) our generated schema with types, queries, etc. from our code. We do that by using the following command yarn run apollo client:download-schema --config=config/apollo.config.js tmp/tests/graphql/gitlab_schema_apollo.graphql.

This CI job should help us in writing clean and maintainable GraphQL things. Closes #344088 (closed)

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vitaly Slobodin

Merge request reports