fix: Don't load localSchemaFile as part of project code #8
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.
This should fix what I believe is the most common case for hitting apollographql/apollo-tooling#801 (VSCode Plugin: Loading Schema Twice).
When using a local schema file to power the VSCode extension, if the schema file is in the
includes
(which it probably is by default), we will read it as part of the project code and try to extend the existing schema. Since this file has already been included as the base, the extension will fail and show an error.This change adds the local schema file(s) to the
excludes
list for the file set, which I think this makes sense overall. Excluding this from the project does mean that it wont get included for providers when editing this file, however in practice I dont think this worked anyways, and I dont see a strong use case for supporting editing a local schema file anyways assuming it did work.First three commits are refactors to make the intent of the final commit more clear.