Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Graphql lsp does not currently support graphql@16 #221

Closed
NICHTJ3 opened this issue Oct 31, 2021 · 7 comments
Closed

Graphql lsp does not currently support graphql@16 #221

NICHTJ3 opened this issue Oct 31, 2021 · 7 comments

Comments

@NICHTJ3
Copy link
Contributor

NICHTJ3 commented Oct 31, 2021

This is an issue because the lsp installer for the graphql lsp installs the latest version of graphql. Is there something I can do to work around this quickly or do I have to create a custom server?

For more info see here

@kylo252
Copy link
Contributor

kylo252 commented Oct 31, 2021

Yes you can specify the version that you want, e.g. :LspInstall rust_analyzer@nightly

@williamboman
Copy link
Owner

williamboman commented Oct 31, 2021

When specifying a version, it will only be applied to the "head" package, so if a server installs more than one npm package you're currently only able to specify the version for the first one 🙃

I'm not sure how to best deal with this particular issue. I was thinking perhaps adding a --interactive flag to :LspInstall which will allow installers to prompt for input

As for the GraphQL LSP, I think we could pin it to @15 for now. Preferably it should ship with a fallback graphql dependency itself, might be worth filing an issue upstream too?

@williamboman
Copy link
Owner

It seems to be installing graphql@15 though, I wonder if it's because of the peerDependency which specifies "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0". @NICHTJ3 what problems are you having?

@NICHTJ3
Copy link
Contributor Author

NICHTJ3 commented Oct 31, 2021

It's probably my node version not installing the correct pair dependency. To work around it I just cd'd to the install directory and installed graphql@15. I'm getting the same error as the guy in the linked issue but in the lsp logs

@williamboman
Copy link
Owner

I think the GraphQL LSP tries to use a project local graphql installation, maybe that's where the issue is? The graphql that is installed alongside the LSP in this plugin is just a fallback, iirc. Similar to ESLint and tsserver (I think)

@williamboman
Copy link
Owner

@NICHTJ3 Is this still causing problems? I can't seem to repro - it's installing graphql@15 for me and I'm not running into any issues with GraphQL. I think it's most likely a project-local graphql dependency that is running version 16 that's causing this?

@NICHTJ3
Copy link
Contributor Author

NICHTJ3 commented Nov 3, 2021

@williamboman So I decided to test this again today. The project version of graphql is 15.5.1 so that's definitely not the issue but reinstalling the lsp doesn't install version 16 like it did the otherday. I put it down to maybe running LspInstall graphql with a different node version that didn't respect the pair dependency.

I'm going to close this issue since it's unrelated to this plugin 🤦‍♂️

@NICHTJ3 NICHTJ3 closed this as completed Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants