Skip to content

Add .graphqlrc file for graphql LSPs

Jack Chapman requested to merge add-graphqlrc-file into master

What does this MR do and why?

Adds .graphqlrc config file to provide configuration to GraphQL LSP and other tooling.

While setting up my local dev environment I decided to make use of graphql-language-service (specifically the CLI) from the graphql.org team in order to add autocomplete, error messages, and other tooling in Neovim.

A .graphqlrc config file is required to give the language service information about your project.

This appears to be very similar to the apollo.config.js the instructions here in our docs recommends creating if using VSCode and the Apollo extension.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

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

Example to test with Neovim and nvim-lspconfig:

  1. Follow the instructions here to set up graphql in Neovim using nvim-lspconfig
  2. Run bundle exec rake gitlab:graphql:schema:dump to generate the schema
  3. Ensure you get autocomplete, go-to-definition, etc.

Merge request reports