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:
- ./*.graphql Because 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-config
or viaparserOptions
option in your ESLint config.Currenly you specify
schema: './*.graphql'
in yourgraphql.config.js
file BUT alsoschema: './src/user.graphql'
in yourparserOptions
option.So your receive an error:
Because
graphql-eslint
firstly searchgraphql-config
file in your project. And he found a specified schema ingraphql.config.js
file that is WRONG.Steps to solve it (choose only 1):