Our team is currently working on developing micro-services using NestJS with Typescript.
Each of these services exposes a GraphQL schema, and to combine them into a single graph, we are utilizing a federation service built with NestJS as well.
I recently attempted to integrate the '@graphql-eslint/eslint-plugin' into our project.
This plugin has two main roles:
- The first type of role works without any specific requirements and functions properly.
- However, the second type of role which requires schema/operation files seems to be causing issues and failing.
For the roles in section 2#, additional information about the schema files is needed.
According to the documentation, to make these roles work, the "parserOptions.schema" needs to be defined.
Despite my efforts, I have been unable to set this field correctly, resulting in the following error message:
Error: Rule 'unique-argument-names' necessitates setting 'parserOptions.schema' and loading the schema. Refer to https://github.com/dotansimha/graphql-eslint#extended-linting-rules-with-graphql-schema for more details
In my perspective, all I want is for the linter to access and review all the .graphql
files within our entire project. I am unsure why this setup is not functioning as expected and why this specific field is necessary when I have already specified that only *.graphql
files should be linted.