Example eslint configuration for Apollo frontend project #1849
Unanswered
MichaelKim0407
asked this question in
Q&A
Replies: 1 comment
-
I'm in a similar situation, I think I've go the exact same question. I'm in a next.js typescript app, we describe fragments in page.tsx files, and define queries in seperate gql.ts files. I can't find a config that allows the parser to execute across those files for running graphql eslint rules. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have tried to read through the documentation but admittedly I don't have in-depth knowledge of ESLint or GraphQL, and I just need an example to make my project work.
My project: I have a
schema.graphql
generated by another project that I do not want to touch. My frontend is React/JavaScript + Apollo client. I have a bunch ofgql
queries and mutations in myjs(x)
files that I would like to validate against the schema file. Currently I'm relying on my IDE but I want to add the check to CI.It seems that the examples provided in the docs are desigend to lint
.graphql
files, notgql
code injs(x)
. I tried to mess around but either I get no error being reported at all or the plugin complains about every javascript file as if they are graphql files.An example or a direction would be appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions