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

CodeLens should not work if underlying endpoint is missing #2334

Open
divyenduz opened this issue Oct 24, 2018 · 4 comments
Open

CodeLens should not work if underlying endpoint is missing #2334

divyenduz opened this issue Oct 24, 2018 · 4 comments

Comments

@divyenduz
Copy link
Contributor

Actual Behavior

Currently, the extension parses TS/JS files for gql tag with a regex and decorates the code with Execute <Operation> actions. This also happens when we don't have a graphql config file which means that the actions cannot execute.

Expected Behavior

CodeLens should not decorate the code when it cannot execute and in other cases where we already know that it would fail.

Steps to Reproduce the Problem Or Description

  1. Create a project with TS and create a gql tag with a GraphQL query in it.
  2. You should see "Execute Query" CodeLens which is bound to fail because extension is not aware of any underlying endpoints because of lack of graphql config file.

Specifications

  • GraphQL for VSCode Extension Version: 0.1.5

Logs Of TS Server || GraphQL Language Service

NA

@MichalLytek
Copy link

I would like to disable the code lens feature at all as it only irritates me with the jumping line positions 😠 Why it doesn't have any config flag in VSCode settings?

@acao
Copy link
Member

acao commented Sep 22, 2020

@MichalLytek i have added a flag for disabling this now! going to add the automatic hiding as well. would be nice to make this a right click menu option and/or keyboard shortcut as well, for the sake of convenience

@acao
Copy link
Member

acao commented Sep 24, 2020

to add, it will still show the codelens (unless the "vscode-graphql.showExecCodeLens": false, is set) even if you don't have endpoints configured.

To make it hide the codelens if endpoints aren't configured, I will have to rearchitect the extension quite a bit to achieve this. However, this would be a very advantageous overhaul, and I would like to do that sooner than later, because then we can have earlier detections and better UX around missing graphql config

@acao
Copy link
Member

acao commented Apr 19, 2022

we have removed this feature for the time being, but should be able to take this into consideration in the future.

@acao acao transferred this issue from graphql/vscode-graphql Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants