Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some rules seem impossible to ignore #321

Open
defsteph opened this issue Aug 22, 2022 · 0 comments
Open

Some rules seem impossible to ignore #321

defsteph opened this issue Aug 22, 2022 · 0 comments

Comments

@defsteph
Copy link

A bit of background, we're working with a Federated Schema, built using TypeGraphQL and Apollo. As a quality measure, I want to implement schema linting, to help us maintain this rather large, and growing graph.

We have a large monolith graph that we are migrating away from, and are no longer making changes to that old schema. Thus, I don't want to include it in our linting, but rather just ignore everything in it. This is where ignore rules come into play.

I've successfully ignored quite a few of the rules, using a graphql-schema-linter.config.js that imports a set of rules that are related to the legacy schema, like this:

const legacy = require('./path/to/legacy-schema-linter.config.js');
module.exports = {
  ignore: {
    "arguments-have-descriptions": [
      "Query._entities",
      ...legacy.ignore["arguments-have-descriptions"]
    ],
    ...
 }
}

I'm having issues with the arguments-have-descriptions and input-object-values-are-camel-cased rules specifically.

Here's an example of two such errors:

14:5    The `SERVICEID` argument of `conditionFilterQuery` is missing a description.   arguments-have-descriptions        
14:5    The input value `conditionFilterQuery.SERVICEID` is not camel cased.           input-object-values-are-camel-cased

My problem is that neither of these ignore rules (or combinations of them) have any effect:

module.exports = {
  ignore: {
    "arguments-have-descriptions": ["SERVICEID"],
    "input-object-values-are-camel-cased": ["SERVICEID"]
  }
}
module.exports = {
  ignore: {
    "arguments-have-descriptions": ["conditionFilterQuery.SERVICEID"],
    "input-object-values-are-camel-cased": ["conditionFilterQuery.SERVICEID"]
  }
}
module.exports = {
  ignore: {
    "arguments-have-descriptions": ["conditionFilterQuery"],
    "input-object-values-are-camel-cased": ["conditionFilterQuery"]
  }
}

Any idea on what I'm doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant