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
No language features for .graphql files since v0.5.0 (only colorization) #2671
Comments
About why I use an introspection output as my schema: It's been the only way I've been able to make this extension work. I explained this approach here. |
No highlighting even?! I’m sorry! I hope to test these cases next weekend and get back to you soon |
No need to be sorry! Thanks for the quick reply ❤️ |
@acao Any updates on this? I can try taking a look :) |
@MariaSolOs very sorry, trying to get to it, some things came up and I haven’t been able to do as much oss as I’ve liked. the issue is somewhere in graphql-language-service-server. It could be in parseDocument, perhaps some logic was changed and disabled handling graphql files directly? You can clone the repo, run yarn and yarn build —watch while editing the server, and then keep restarting vscode graphql debugger on each server change. I should have these instructions in DEVELOPMENT.md but not sure if i do. PRs are welcome if you have luck! |
No worries @acao! I can try taking a look ;)
|
Okay so I tried debugging the extension but my breakpoints won't bind anything outside the |
@MariaSolOs now that I'm actually looking more closely - the unit tests for the language server only include configs like these: testMultipleIncludes:
schema: __schema__/StarWarsSchema.graphql
documents:
- __queries__/*.graphql
- __fragments__/*.graphql is it that only queries and fragments but no SDL .graphql files are working? or are all types of .graphql files not working? this may be easier than the path I showed you, which is more ideal for manually confirming functionally that what you see working in unit tests is working in vscode |
my bad, i forgot to mention that the debugger for the vscode graphql start only attaches to the client main process for vscode, and not the language server process. we are just missing I think a seperate debugger we can run alongside the vscode graphql debugger, on an alternative port, I'm sure it's in the vscode extension docs somewhere. unfortunately, the best way we currently have to debug output when testing the language server with vscode or other clients is with the LSP output channel, in vscode or whichever client. in another option is to execute the
but i wouldn't know to pass |
@acao The current version of the extension is not working for me on all I will try expanding the tests to reflect the setup that I have. As for debugging the server, it seems like the server already has a debug configuration that should allow me to use the Chrome Dev Tools for debugging the process running the server. I'll check that. |
@MariaSolOs oh that’s how to enable that yes, with the debug extension setting |
Okay so I have an update: After debugging for a bit today I discovered that the problem is not As an example, I was comparing the behaviour in v0.4.15 versus the current one with the following mutation:
In v0.4.15, the kind of this token would be |
I've also identified #2557 to be the breaking PR. |
Thank you @MariaSolOs ! This makes a lot of sense! hopefully i can take a closer look after work today |
@MariaSolOs i have a PR to get rid of the completion insert text anyways, it doesn’t factor in required arguments so it’s not very useful |
also for the record, I know this bug exists, because there are duplicates of this issue (they are hard to find because there is no easy error/language to refer to!) I will need to find in this repo for when we finally close this. It's just a matter of the mountain of priorities and PRs already lined up for the LSP, but it would be annoying to ship all of that and still this regression. hopefully I'm very productive this weekend and can get to this! haha thank you so much for going above and beyond to look at it. in an ideal world you wouldn't have needed to go through this trouble with debugging, but that has been insightful for both this and other issues with the language server/extension DX |
No worries at all @acao! I'm glad I was able to help and I completely understand that there are other problems with higher priorities that need to be addressed first.
|
@MariaSolOs another clue, i suspect maybe logic I introduced with cacheProjectFiles() in messageprocessor could have caused some issues here |
@acao So I'm not sure if it is a caching issue per se, but I think I have a fix :) #2720 |
@MariaSolOs thank you so much for the extensive effort you put into finding this fix! 0.7.5 should be the fix version for this in |
I've been trying to make the latest versions of this extension to work but it seems like completion (and most other language features) broke since
v0.5.0
. Note that everything works fine inv0.4.15
.The project I'm currently working on is here, in case you want to check out my setup. But as a summary, my
graphql.config.json
file looks like this:And I'm using codegen with the following configuration:
The logs only show the following:
The text was updated successfully, but these errors were encountered: