Support multiple schema files with localSchemaFile #1500
Merged
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.
Resolves #1483
What
The purpose of this PR is to officially support multiple schema files through the
localSchemaFile
config option and CLI flag for the client and service commands.Why
Until VSCode 1.10.0 (and accompanying CLI release), I've been recommending people use the
client.includes
option to allow for multiple schema files when needed. Since clientincludes
now is treated as a client schema for the purpose of autocompleting client fields (#1433) this no longer works.How
This PR overloads the existing
localSchemaFile
option, allowing for a list of filepaths (in the config file) or multiple uses of the--localSchemaFile
flag (in the CLI).The schema loader will go through the same process it used to in order to load a schema from a file, with a couple modifications.
Questions
extendSchema
instead to progressively build the schemaextendSchema
rather than concatenating SDL?TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.