-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[lsp-server] 🐞 VSCode validation error Unknown fragment in v0.11.0 #3620
Comments
This is kind of a breaking bug, all fragments have broken in my project as well |
Confirm same bugs as mentioned here. |
Confirming I'm seeing the same bug as well. Adding a plain text version of the logged syntax errors to help others find the github issue. Reverting to
Thanks for the work on this extension, beyond this bug it's an invaluable tool! |
Same issue as here and it's fixed by downgrading to v 9.3. This is what I found - I get the error where the file containing the fragment couldn't be parsed
When I then go to that file and save it, and then go back to where I used the fragment the fragment is picked up and it's working again. I'm guessing the file is parsed successfully and cached when I save the file or something? |
While I seem to have a slightly different setup than others, I also encountered a similar issue and I was able to figure out what's causing it in my case. I still had some .graphql files that contain import comments at the top of the file, e.g. #import "~/components/Teaser/fragment.teaser.graphql"; Looking at the logs (in neovim using
Since I don't need these import comments anymore, I was able to remove them. I assume this functionality to resolve these imports was added at one point or it was made to throw an error if the import fails. In my case, the imports are irrelevant anyway because all the documents that could potentially be imported are declared as a pattern in |
Is there any Progress on resolving this Issue in the Current Version? |
@DerPlayer2001 not yet, I will let folks know here when it is! update: still trying to find a job, I will get to this once I do |
Same issue here, only downgrading to 0.9.3 fixes it |
Emergency situation: With the recession in Germany, I was caught up in a 30% engineering org layoff in the summer, and without being able to find a job, lost my apartment and had to move back to the US a few weeks ago. I have to prioritize at least some income before I can jump back into open source work. Meanwhile, as always, PRs are welcome, even a draft PR that adds a failing test case, as re-creating a bug like this is very hard and time consuming, and is the main reason I haven't been able to solve this. You can use the new functional spec suite for MessageProcessor, which is designed to model real workflows and project configurations, including several scenarios like these. |
So u need a minimal project that exhibits this issue? I don't think this Issue results in failing tests, but in errors in the Intelisense of VSCode (at least that's the case in our Projects). If needed I could provide such a project. |
@DerPlayer2001 the test suite would surface the invalid fragment errors you see in vscode. in this case, it would show an invalid fragment definition code validation error which you can assert for. providing a project config and files would be helpful as well, but would take longer, as we still need to add the failing test case |
Is there an existing issue for this?
Current Behavior
I get errors after updating “GraphQL: Language Feature Support” to v0.11.0.
FooFragment
is defined another file.Expected Behavior
No errors when using fragments from another files.
Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: