Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore "extend schema" in .graphql files #1910

Open
gituserjava opened this issue Oct 4, 2023 · 7 comments
Open

Ignore "extend schema" in .graphql files #1910

gituserjava opened this issue Oct 4, 2023 · 7 comments

Comments

@gituserjava
Copy link

gituserjava commented Oct 4, 2023

We use below extend line in our .graphql file for federation and we get below error.

Code snippet:

extend schema @link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key"])

type Query {
     myQuery: String
}

Error:
0:0 error Parsing error: [graphql-eslint] Error while loading schema: Directive "@link" may not be used on SCHEMA

Could you please advise on how this issue can be bypassed during graph ql eslint process?

@dimaMachina
Copy link
Owner

this issue will be fixed after adding federation support #1824

@gituserjava
Copy link
Author

Ok thank you @B2o5T, is there a tentative plan when this will be available?

@dimaMachina
Copy link
Owner

Until end of year

@gituserjava
Copy link
Author

Meanwhile is there a work around? I tried # eslint-disable-next-line and # eslint-ignore and both are not recognized by the library for .graphql files. Please advise.

@dimaMachina
Copy link
Owner

@gunes-sayin
Copy link

The directives work fine with files without parsing errors (extend in this case). But, they don't work with files that have extend on top. Is there a work around to ignore this part from parsing, until this feature is implemented?

@MarcCoquand
Copy link

Hi! Since this is reported as a parsing error, eslint directives are ignored. Is there any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants