fix(graphqlsp): Fix wrong fileType diagnostic error when introspection is disabled #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using the unused field detection feature without utilising the introspection generation an error is added to the diagnostics.
This is because the code tries to save an introspection file even when the provided output path is undefined.
I have made this small fix to stop the plugin from trying to save an introspection file when the output path is undefined.
This is relevant to me, because in the Project i am working on we use other ways of generating typescript files but want to use the unused field detection and autocompletion. This works fine in the IDE, but when reading the diagnostics of typescript in the CLI to create a pipeline that ensures every field is used, we also get an error about an unsupported file type for the introspection output path (Thrown in saveTadaIntrospection).
I just want to add that we very much enjoy the features this package provides, so thank you for your work!
Have a great day!
Looking forward to your feedback,
Leo