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
Some fragments show red underlines in VSCode that disappear after editing/re-saving file containing fragment #2064
Comments
Thank you, I noticed this as well when working with fragments recently. It’s by one of a few potential issues. I added logic to re-build all the caches used for lookup on every request, and this is probably unnecessary, causing performance issues, and potentially causing race conditions where parts of the project-wide fragment cache are not available for reference on certain events. |
Hi @acao! Were there any updates to this recently? We have red underlines in VSCode as well in our fragments (in external files), which disappear after editing the fragment in that file. |
The issue is still in place. Are there any updates? |
Same issues. Disappear after renaming the fragment. Is there any way to manually rebuild the fragments cache? |
Hey @acao, Are there any updates? I experience exactly the same issue in VSCode. |
The related issue: |
I was trying to move from Apollo extension to this, and this is still an issue apparently? |
Using |
Hi there! We have a graphql config file like this:
We have many fragments defined in documents path(s). There are a (large) handful of fragments that seem to not be initially recognized, when that fragment is referenced in another document graphql file. For example, let's say I have a file containing this fragment:
If B is defined in the same file, this works, but if B is defined in another file, it may get a red underline. Mousing over it shows the error
Unknown fragment "B". GraphQL: Validation
.However, I've found that if I go to the file containing B, delete a character from the fragment's name, add it back, save, go back to the file containing fragment A, remove and re-add the reference to fragment B (in fragment A), the previously unknown fragment B shows up in intellisense, and the red underline disappears. This change does not stick if I reload the window (assuming this is restarting the graphql language server).
The only thing I can tell for sure is that this doesn't impact referencing a fragment in the same file. I haven't been able to figure out some other pattern that would allow me to come up with a standalone, sharable reproduction project.
Versions
VSCode: 1.62.3
GraphQL Extension: 0.3.26
The text was updated successfully, but these errors were encountered: