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

patch(cli-utils): Add VSCode detection and warnings #230

Merged
merged 5 commits into from
Apr 19, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented Apr 18, 2024

Resolves #194

Summary

This PR adds an addition to the doctor command that attempts to detect VSCode extensions.

When VSCode is installed and the GraphQL Syntax extension for it isn't installed, a warning is issued with a link to the extension.

When the suggested extensions file or the installed extensions contain the VSCode GraphQL Language Service extension and a GraphQL Config is present a warning is issued to prompt the user to check whether documents is targeting their files correctly.

This doesn't actually use graphql-config to validate the config, since that's quite a huge package for what it does (large dependency to handle TS & ESM files). So, unless we really need that, or want to just load the module from the user node_modules, I'd say this should be good enough.

Screenshot 2024-04-18 at 16 04 04

Set of changes

  • Add check to doctor for VSCode syntax extension
  • Add check to doctor for VSCode language service extension

Copy link

changeset-bot bot commented Apr 18, 2024

🦋 Changeset detected

Latest commit: 5d31cf4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kitten kitten merged commit ef24df5 into main Apr 19, 2024
2 checks passed
@kitten kitten deleted the feat/detect-vscode-graphql branch April 19, 2024 16:21
@github-actions github-actions bot mentioned this pull request Apr 19, 2024
@kitten kitten added the editor support ✍️ An issue related to a specific editor, extension, editor or IDE, external from gql.tada label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor support ✍️ An issue related to a specific editor, extension, editor or IDE, external from gql.tada
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphiQL VSCode warning: Undefined Fragment when spreading is used for an complex type
2 participants