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.
scenario:
abc.graphql
query getItems(
$uniqueId: ID!
) {
...
}
in my ReactJS app:
import {
getFewItems,
} 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