-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
-
1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
For example, you can start off by editng the
'basic' example on Stackblitz.Please make sure the graphql-eslint version under
package.json
matches yours. -
2. A failing test has been provided
-
3. A local solution has been provided
-
4. A pull request is pending review
Describe the bug
When passing a large schema of over 8kb as a string instead of file path the loader attempts to pattern match the raw string and will throw and eslint pattern too long error.
To Reproduce Steps to reproduce the behavior:
Programatically extend and call the ESLint class and load the schema as a string into parserOptions
. Next use the lintText method of the class to lint the GraphQL schema subset against the entire schema. Here an error will be thrown about the pattern being too long.
An example can be found and ran here. To run the example in the terminal run npm start
From here the following error message will be displayed
[
{
ruleId: null,
fatal: true,
severity: 2,
message: 'Parsing error: [graphql-eslint] pattern is too long',
line: undefined,
column: undefined,
nodeType: null
}
]
Environment:
- OS: Linux/MacOS
@graphql-eslint/eslint-plugin
: 3.20.1- Node.js:
Additional context
This appears to be worked around in version 4 of the linter here by building the schema differently in the browser for use in the playground.