Replies: 1 comment
-
Rebooting this discussions with my own problems on the topic. My question (or problem) is also concerning multiple endpoints that provide unique schemas, which have some overlapping definitions so merging them into one single is not an option. I'm running with version So in affect when I run ESlint for the whole project (with the configuration I have described below) the config loader will omit the The problem does not occur:
So perhaps then the question is am I doing something that is not supported by the lib? The ...
overrides: [
{
files: ['*.gql'],
parser: '@graphql-eslint/eslint-plugin',
plugins: ['@graphql-eslint'],
rules: {
'@graphql-eslint/alphabetize': [
'error',
{
fields: ['ObjectTypeDefinition'],
selections: ['OperationDefinition', 'FragmentDefinition'],
},
],
'@graphql-eslint/known-type-names': 'error',
},
},
{
files: ['src/gql/a/operations/**/*.gql'],
parser: '@graphql-eslint/eslint-plugin',
parserOptions: {
graphQLConfig: {
documents: ['src/gql/a/operations/**/*.gql'],
schema: 'src/gql/a/a.schema.graphql',
skipGraphQLConfig: true,
},
},
},
{
files: ['src/gql/b/operations/**/*.gql'],
parser: '@graphql-eslint/eslint-plugin',
parserOptions: {
graphQLConfig: {
documents: ['src/gql/b/operations/**/*.gql'],
schema: 'src/gql/b/b.schema.graphql',
skipGraphQLConfig: true,
},
},
}
]
... |
Beta Was this translation helpful? Give feedback.
-
Hi there, I am new to eslint, I am currently using graphql-eslint with our project,
However, we are writing MULTIPLE graphql clients (while of course they have MULTIPLE different servers/schemas) in our projects, and their related operations are written in separated js/ts files.
How am I supposed to write my eslint config file to ensure each operation file (js/ts, gql
xxx
) are linted by their only related schemas? Should I rewrite the processors of graphql-eslint to generated virtual graphql files in separated locations?Beta Was this translation helpful? Give feedback.
All reactions