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

Invalid configuration rule for "graphql/template-strings" #283

Open
kryptonat opened this issue Aug 24, 2020 · 1 comment
Open

Invalid configuration rule for "graphql/template-strings" #283

kryptonat opened this issue Aug 24, 2020 · 1 comment

Comments

@kryptonat
Copy link

Hi, I'm getting an unexpected validation rule error from giving an array of desired validators as per instructions. I had no issues with this configuration for [email protected] and [email protected] but don't see why it wouldn't work for the following package versions either.

module.exports = {
  parser: "babel-eslint",
  rules: {
    'graphql/template-strings': [
      'error',
      {
        env: 'apollo',
        validators: ['FieldsOnCorrectType'],
      },
    ],
  },
  plugins: ['graphql']
};

is giving the following error

Configuration for rule "graphql/template-strings" is invalid:
	Value "FieldsOnCorrectType" should be equal to one of the allowed values.
	Value ["FieldsOnCorrectType"] should be equal to one of the allowed values.
	Value ["FieldsOnCorrectType"] should match exactly one schema in oneOf.

Versions

[email protected]
[email protected]

@OlfaKaroui
Copy link

Since you're using graphql 15, I believe that you have to add "Rule" suffix to your validators. So FieldsOnCorrectType should become FieldsOnCorrectTypeRule

Check this PR for more info : #281

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

2 participants