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

[vscode-graphql] fix Svelte support #2861

Merged
merged 4 commits into from
Nov 3, 2022
Merged

Conversation

aloker
Copy link
Contributor

@aloker aloker commented Nov 3, 2022

Fixes #2857

The LSP server wasn't registered for svelte files.

Note: the PR does not have tests

@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2022

🦋 Changeset detected

Latest commit: 06d3cb6

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

This PR includes changesets to release 3 packages
Name Type
graphql-language-service-server Patch
vscode-graphql Patch
graphql-language-service-cli Patch

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 3, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@acao
Copy link
Member

acao commented Nov 3, 2022

@aloker one missing piece - just need to add .svelte to this array here:
https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service-server/src/parseDocument.ts#L8

otherwise, the langauge server will pick up svelte files, but do nothing with them

also as per the comments:

  • CLA if you can (using the same email the commits are signed with)
  • changeset so that a bugfix is published - we need to include both vscode-graphql and graphql-language-service-server so that other IDE implementations will see the changelog entry (because vim users are also not able to handle .svelte files for graphql features - vscode-graphql and various vim, sublime, etc extensions all use this server!)

@aloker
Copy link
Contributor Author

aloker commented Nov 3, 2022

I signed the CLA and added the missing change and the changeset.

@acao acao merged commit bdd1bd0 into graphql:main Nov 3, 2022
@acao
Copy link
Member

acao commented Nov 3, 2022

thank you @aloker ! I will now merge the release PR once it's created

This was referenced Nov 3, 2022
@acao
Copy link
Member

acao commented Nov 3, 2022

@aloker latest @0.8.1 is the fix version. awesome work. I'll add more comprehensive tests because I suspect the vue parser might fail with more advanced attribute binding usage, but if it works fine for you and the svelte community then that's awesome!

@aloker
Copy link
Contributor Author

aloker commented Nov 3, 2022

That's 0.8.2, right? I'll have to test it on an actual project. Thanks for the quick merge & release!

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

Successfully merging this pull request may close these issues.

[vscode-graphql-syntax] autocompletion in svelte files still not working in version 0.8.1
2 participants