eslint-plugin-graphql icon indicating copy to clipboard operation
eslint-plugin-graphql copied to clipboard

Please display which validator is raising an error

Open ghost opened this issue 6 years ago • 0 comments
trafficstars

In using this tool, I've noticed that every error simply says that the eslint rule violated is "graphql/template-strings". It'd be nice if violations of the rules would explicitly state which validator is being tripped.

For example, a couple of errors I get look like

  3:27  error  Variable "$fooBar" of type "String!" used in position expecting type "Int!"  graphql/template-strings

I'd be helped if this let me know that I am violating the VariablesInAllowedPosition rule (I discovered as much by trial and error).

Another example is

  5:7  error  Cannot query field "someField" on type "MyKewlType". Did you mean "someOtherThing"?  graphql/template-strings

I'd be helped if this let me know that I am violating the FieldsOnCorrectType rule (I discovered as much by trial and error).

ghost avatar Aug 28 '19 22:08 ghost