-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
apollo.config.json,yaml,yml
(#200)
- Loading branch information
Showing
18 changed files
with
471 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vscode-apollo": patch | ||
--- | ||
|
||
Fixed an issue where the configuration was not reloaded when the `.env.local` file changed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vscode-apollo": patch | ||
--- | ||
|
||
Add support for `apollo.config.yml`, `apollo.config.yaml` and `apollo.config.json`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
client: | ||
service: | ||
name: localSchema | ||
localSchemaFile: "./starwarsSchema.graphql" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"client": { | ||
"service": { | ||
"name": "localMultiSchema", | ||
"localSchemaFile": ["./starwarsSchema.graphql", "./planets.graphql"] | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
{ | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/baseConfig" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"client": { | ||
"$ref": "#/definitions/clientConfig" | ||
} | ||
}, | ||
"required": [ | ||
"client" | ||
] | ||
} | ||
], | ||
"definitions": { | ||
"clientConfig": { | ||
"type": "object", | ||
"properties": { | ||
"service": { | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"description": "The name of the Apollo Studio graph to use. Alternatively pass in an object to configure a local schema." | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name your project will be referred to by the Apollo GraphQL extension." | ||
}, | ||
"url": { | ||
"type": "string", | ||
"description": "URL of a GraphQL to use for the GraphQL Schema for this project. Needs introspection enabled." | ||
}, | ||
"headers": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
}, | ||
"default": {}, | ||
"description": "Additional headers to send to the server." | ||
}, | ||
"skipSSLValidation": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Skip SSL validation. May be required for self-signed certificates." | ||
} | ||
}, | ||
"required": [ | ||
"url" | ||
], | ||
"additionalProperties": false, | ||
"description": "Configuration for using a local schema from a URL." | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name your project will be referred to by the Apollo GraphQL extension." | ||
}, | ||
"localSchemaFile": { | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"description": "Path to a local schema file to use as GraphQL Schema for this project. Can be a string or an array of strings to merge multiple partial schemas into one." | ||
}, | ||
{ | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "Path to a local schema file to use as GraphQL Schema for this project. Can be a string or an array of strings to merge multiple partial schemas into one." | ||
} | ||
], | ||
"description": "Path to a local schema file to use as GraphQL Schema for this project. Can be a string or an array of strings to merge multiple partial schemas into one." | ||
} | ||
}, | ||
"required": [ | ||
"localSchemaFile" | ||
], | ||
"additionalProperties": false, | ||
"description": "Configuration for using a local schema from a file." | ||
} | ||
], | ||
"description": "A string to refer to a graph in Apollo Studio, or an object for a local schema." | ||
}, | ||
"validationRules": { | ||
"anyOf": [ | ||
{ | ||
"type": "array", | ||
"description": "Additional validation rules to check for. To use this feature, please use a configuration file format that allows passing JavaScript objects." | ||
} | ||
], | ||
"description": "Additional validation rules to check for. To use this feature, please use a configuration file format that allows passing JavaScript objects." | ||
}, | ||
"includes": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "An array of glob patterns this project should be active on. The Apollo GraphQL extension will only support IntelliSense-like features in files listed here." | ||
}, | ||
"excludes": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"default": [ | ||
"**/node_modules", | ||
"**/__tests__" | ||
], | ||
"description": "Files to exclude from this project. The Apollo GraphQL extension will not provide IntelliSense-like features in these files." | ||
}, | ||
"tagName": { | ||
"type": "string", | ||
"default": "gql", | ||
"description": "The name of the template literal tag or function used in JavaScript files to declare GraphQL Documents." | ||
}, | ||
"clientOnlyDirectives": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
}, | ||
"clientSchemaDirectives": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
}, | ||
"statsWindow": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
}, | ||
"name": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
}, | ||
"referenceId": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
}, | ||
"version": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
} | ||
}, | ||
"required": [ | ||
"service" | ||
], | ||
"additionalProperties": false, | ||
"description": "Configuration for a Client project." | ||
}, | ||
"engineConfig": { | ||
"type": "object", | ||
"properties": { | ||
"endpoint": { | ||
"type": "string", | ||
"default": "https://graphql.api.apollographql.com/api/graphql", | ||
"description": "The URL of the Apollo Studio API." | ||
}, | ||
"apiKey": { | ||
"type": "string", | ||
"description": "The API key to use for Apollo Studio. If possible, use a `.env` file or `.env.local` file instead to store secrets like this." | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"description": "Network configuration for Apollo Studio API." | ||
}, | ||
"baseConfig": { | ||
"type": "object", | ||
"properties": { | ||
"engine": { | ||
"$ref": "#/definitions/engineConfig", | ||
"default": {}, | ||
"description": "Network configuration for Apollo Studio API." | ||
}, | ||
"client": { | ||
"description": "Configuration for a Client project." | ||
}, | ||
"service": { | ||
"description": "This option is no longer supported, please remove it from your configuration file." | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"$schema": "http://json-schema.org/draft-07/schema#" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.