Non existent query in .graphql slipping through compilation without giving any error

Hello community,
I am in dire need of help as we are facing discrepancy with graphql usage in react, which slipped through without any compilation error and caused a runtime production issue.



query getItems(
  $uniqueId: ID!
) {

in my ReactJS app:

import {
} from './abc.graphql';

The issue is getFewItems query does not exist in my graphql file and i am using it in my JS files, there is no error while compiling, issue occurs on runtime only.

ideally we would want a behaviour of linting this missing-export in graphql file imports itself while developing and ci compilation.
we are using the babel plugin correctly as mentioned in docs, but that doesn’t throw any error.

Would be grateful for any help on how we can achieve this behaviour.
Thanks, Ajay

Maybe this project will help? GitHub - B2o5T/graphql-eslint: ESLint parser, plugin and set rules for GraphQL (for schema and operations). Easily customizable with custom rules. Integrates with IDEs and modern GraphQL tools.

i tried this, but it only lints the graphql file or queries written in JS files, as such i couldn’t find any support for import statement cross checking :pensive: