Setting up eslint with typescript and pnpm inside a monorepo #868
-
|
I'm having trouble making all these moving pieces work together.
I'm also using module.exports = {
schema: './**/*.graphql'
// documents: null
}I have created a repository to highlight the issue (code is in the Node: 16.3.0 When running |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
|
You need to load schema or operations only either with /Users/dimitri/Downloads/graphql-eslint-issue-main/server/src/user.graphql
0:0 error Parsing error: Unable to find any GraphQL type definitions for the following pointers:
- ./*.graphqlBecause Steps to solve it (choose only 1):
module.exports = {
- schema: './*.graphql'
+ schema: './**/*.graphql'
}OR
parserOptions: {
schema: './src/user.graphql',
+ skipGraphQLConfig: true,
}, |
Beta Was this translation helpful? Give feedback.

You need to load schema or operations only either with
graphql-configor viaparserOptionsoption in your ESLint config.Currenly you specify
schema: './*.graphql'in yourgraphql.config.jsfile BUT alsoschema: './src/user.graphql'in yourparserOptionsoption.So your receive an error:
Because
graphql-eslintfirstly searchgraphql-configfile in your project. And he found a specified schema ingraphql.config.jsfile that is WRONG.Steps to solve it (choose only 1):