question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Operations inside graphql`` statements are not being linted

See original GitHub issue

Not sure if this is a bug or just a feature: I have .graphql schema files being properly linted, but we use relay and our operations are defined inside graphql statements rather than gql and it seems the linter isn’t finding them. I was sure to add the following as an override per the instructions:

  {
    files: ['*.tsx', '*.ts'],
    processor: '@graphql-eslint/graphql',
  },

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
onsahcommented, Sep 1, 2022

Can we document this in README? I wasted 2 hours to find this issue and fix the same problem.

2reactions
BrianBusbycommented, Aug 17, 2022

@B2o5T I was able to fix the issue on my end; we initialize ESLint at a point in our front end linting workflow and .graphql needed to be added to the extensions property array. Thanks for trying to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Five Common Problems in GraphQL Apps (And How to Fix ...
Problem: Server/Client Data Mismatch​​ As we've just seen, your database and GraphQL API will have different schemas, which translate into ...
Read more >
let `require-id-when-available` validate when fragment is ...
Currently, since I am just in the initial development phase, this is not a ... Error: You have used a rule which requires...
Read more >
GraphQL query best practices
Operation naming, GraphQL variables, and more. When creating queries and mutations, follow these best practices to get the most out of both GraphQL...
Read more >
Schemas and Types - GraphQL
On this page, you'll learn all you need to know about the GraphQL type system and how it describes what data can be...
Read more >
GraphQL Queries to fetch data - Hasura
In GraphQL, you fetch data with the help of queries. A query is a GraphQL Operation that allows you to retrieve specific data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found