Open abaldawa opened 8 months ago
I have a fix for this I am just about to release in #3521! there is a pre-release in a zip file if you want to give it a try!
The stream
method appears to be completely dysfunctional due to the initializedHandlers
not being called in the branch where method
is stream
:
https://github.com/graphql/graphiql/blob/aa6dbbb45bf51c1966537640fbe5c4f375735c8d/packages/graphql-language-service-server/src/startServer.ts#L118-L128
I verified my hypothesis above by building graphql-lsp
from source, indeed aa6dbbb45bf51c1966537640fbe5c4f375735c8d is the first bad commit that causes graphql-lsp server --method stream
to malfunction.
To install the latest functioning graphl-lsp
that works for --method stream
(make sure yarn
is installed first):
git clone https://github.com/graphql/graphiql.git
cd graphiql
git checkout 03ab3a6b # The commit before the first bad commit
yarn install
yarn build
cd packages/graphql-language-service-cli/
npm i -g .
P/S: For some reason, the binaries published on npm
, although their version precedes the first bad commit, are also dysfunctional.
Any update about this?
main branch's stream server is still broken.
As @wongjiahau mentioned, git checkout 03ab3a6b
works fine.
Here is log of main branch using vim-lsp
Sat Jun 22 11:17:51 2024:["<---(stderr)",1,"graphql-language-server","Content-Length: 73\r\n\r\n"]
Sat Jun 22 11:17:51 2024:["<---(stderr)",1,"graphql-language-server","{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"capabilities\":{\"textDocumentSync\":0}}}"]
Confirm 3.4.1 fixed this problem. Thank you!
Is there an existing issue for this?
Current Behavior
No code completion in ".graphql" schema file inside vs code? Please see the video. I have installed both official extensions for vs code here and here but its still not giving any code completion.
Webstorm works fine without any settings but VS code does not show any autocomplete in ".graphql" file. Any help would be appreciated as after searching the web/this github repo, I still was not able to find the solution.
video https://github.com/graphql/graphiql/assets/5449692/c2dd72a8-70a2-411b-af52-7fcb8301b64e
Expected Behavior
Syntax highlighting should work in
*.graphql
schema filesSteps To Reproduce
.graphqlrc.yml
fileschema: 'schema.graphql'
sectionschema.graphql
fileEnvironment
Anything else?
No response