You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 attempting to lint a federation v2 schema with v4 of graphql-eslint that includes a federation directive e.g. @key. It fails with the error below.
It was possible to lint with v3 of graphql-eslint by setting parserOptions.schemaOptions.assumeValid to true, but it doesn't seem possible to do this in v4.
I did see both of the following and while they are related it might not be the only way to resolve this issue hence I raised another one. Feel free to close if you think its appropriate:
graphql-eslint should parse federation subgraphs without parse errors and you could even use known-directives rule which previously reported errors about unknown @link directive.
But for linting federation subgraphs schemas optional peer dependency @apollo/subgraph should be installed (you'll get runtime error in case of missing it)
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
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 attempting to lint a federation v2 schema with
v4
of graphql-eslint that includes a federation directive e.g.@key
. It fails with the error below.It was possible to lint with
v3
of graphql-eslint by settingparserOptions.schemaOptions.assumeValid
to true, but it doesn't seem possible to do this inv4
.To Reproduce Steps to reproduce the behavior:
You can see an example failing schema here on the playground.
Expected behavior
To be able to lint federation v2 schemas.
Environment:
@graphql-eslint/eslint-plugin
: 4.2.1Additional context
I did see both of the following and while they are related it might not be the only way to resolve this issue hence I raised another one. Feel free to close if you think its appropriate:
The text was updated successfully, but these errors were encountered: