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

Feature - Option to disable "validate against schema" #2363

Closed
jgoux opened this issue Feb 2, 2021 · 4 comments · Fixed by #2382
Closed

Feature - Option to disable "validate against schema" #2363

jgoux opened this issue Feb 2, 2021 · 4 comments · Fixed by #2382
Labels
enhancement lsp-server graphql-language-service-server

Comments

@jgoux
Copy link

jgoux commented Feb 2, 2021

Hello all 👋

Now that there is the awesome https://github.com/dotansimha/graphql-eslint for doing linting and validation against a schema directly as part of ESLint, I'd like to use the vscode extension only for the purpose of autocompletion and code navigation.

Actual Behavior

At the moment, both ESLint and the extension are validating my operations :

image

In term of performance, the work is done twice. Also we can go further with ESLint by enforcing conventions and even writing custom lint plugins.

Expected Behavior

I'd like to have a validate against schema (default true) configuration option for this plugin so I can use it to enhance my DX in VSCode, but defer all my validation and linting to ESLint.

Specifications

  • GraphQL for VSCode Extension Version: v0.3.14
@jtieu-r7
Copy link

jtieu-r7 commented Oct 7, 2021

Running into a similar issue, are there any solutions for this?

@acao
Copy link
Member

acao commented Nov 26, 2021

hmm, hadn't thought of this! a feature could be added as such. I think it could be added to just this repo, and the answer is in extension.ts for the curious!

@arvindell
Copy link

This sounds like what I need. I would like to disable schema validation to tweak the rules that my tagged template literals are validated against. vscode-graphql doesn't seem to support toggling on/off.

This rule, for example, has had a bug for a while and I don't have a way to ignore the error without losing autocompletion and highlighting 😕

Screen Shot 2022-01-18 at 11 54 18 p m

@acao acao added the lsp-server graphql-language-service-server label Apr 19, 2022
@acao acao transferred this issue from graphql/vscode-graphql Apr 19, 2022
@zachallaun
Copy link

I'm running up against the same fragment issue as @arvindell above. Would love to see an option to disable this kind of validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement lsp-server graphql-language-service-server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants