vscode-apollo 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +1 -17
- package/.github/workflows/E2E.yml +27 -0
- package/.github/workflows/build-prs.yml +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +71 -52
- package/jest.e2e.config.js +2 -0
- package/package.json +31 -3
- package/renovate.json +5 -5
- package/sampleWorkspace/localSchemaArray/apollo.config.json +9 -0
- package/sampleWorkspace/localSchemaArray/src/test.js +1 -1
- package/sampleWorkspace/rover/apollo.config.yaml +3 -0
- package/sampleWorkspace/rover/src/test.graphql +11 -10
- package/sampleWorkspace/rover/supergraph.yaml +0 -0
- package/schemas/apollo.config.schema.json +184 -0
- package/src/__e2e__/runTests.js +1 -0
- package/src/build.js +53 -1
- package/src/language-server/__e2e__/clientSchema.e2e.ts +58 -28
- package/src/language-server/__e2e__/httpSchema.e2e.ts +23 -4
- package/src/language-server/__e2e__/localSchema.e2e.ts +23 -4
- package/src/language-server/__e2e__/localSchemaArray.e2e.ts +31 -6
- package/src/language-server/__e2e__/rover.e2e.ts +150 -0
- package/src/language-server/__e2e__/studioGraph.e2e.ts +18 -6
- package/src/language-server/__e2e__/utils.ts +114 -13
- package/src/language-server/config/__tests__/loadConfig.ts +35 -2
- package/src/language-server/config/cache-busting-resolver.js +65 -0
- package/src/language-server/config/cache-busting-resolver.types.ts +45 -0
- package/src/language-server/config/config.ts +133 -57
- package/src/language-server/config/loadConfig.ts +27 -6
- package/src/language-server/config/loadTsConfig.ts +74 -38
- package/src/language-server/project/base.ts +8 -8
- package/src/language-server/project/rover/project.ts +6 -0
- package/src/language-server/server.ts +8 -7
- package/src/language-server/workspace.ts +2 -5
- package/src/languageServerClient.ts +3 -1
- package/sampleWorkspace/localSchemaArray/apollo.config.js +0 -12
- package/sampleWorkspace/rover/apollo.config.js +0 -3
- /package/sampleWorkspace/localSchema/{apollo.config.js → apollo.config.ts} +0 -0
package/.circleci/config.yml
CHANGED
|
@@ -6,7 +6,7 @@ orbs:
|
|
|
6
6
|
executors:
|
|
7
7
|
node:
|
|
8
8
|
docker:
|
|
9
|
-
- image: cimg/node:22.
|
|
9
|
+
- image: cimg/node:22.8.0
|
|
10
10
|
working_directory: ~/vscode-graphql
|
|
11
11
|
|
|
12
12
|
commands:
|
|
@@ -53,28 +53,12 @@ jobs:
|
|
|
53
53
|
name: Test
|
|
54
54
|
command: npm run test -- --runInBand
|
|
55
55
|
|
|
56
|
-
E2E tests:
|
|
57
|
-
executor: node
|
|
58
|
-
steps:
|
|
59
|
-
- checkout
|
|
60
|
-
- npm-install
|
|
61
|
-
- run: sudo apt update && sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb
|
|
62
|
-
- run:
|
|
63
|
-
name: Build
|
|
64
|
-
command: npm run build:production
|
|
65
|
-
- run:
|
|
66
|
-
command: echo 'APOLLO_KEY="service:bob-123:489fhseo4"' > ./sampleWorkspace/spotifyGraph/.env
|
|
67
|
-
- run:
|
|
68
|
-
name: E2E tests
|
|
69
|
-
command: xvfb-run -a npm run test:extension
|
|
70
|
-
|
|
71
56
|
workflows:
|
|
72
57
|
build-test-deploy:
|
|
73
58
|
jobs:
|
|
74
59
|
- lint
|
|
75
60
|
- typescript
|
|
76
61
|
- test
|
|
77
|
-
- E2E tests
|
|
78
62
|
security-scans:
|
|
79
63
|
jobs:
|
|
80
64
|
- secops/gitleaks:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Run E2E tests
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
name: Run E2E tests
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- run: sudo apt update && sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb expect
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
cache: "npm"
|
|
17
|
+
- run: npm install
|
|
18
|
+
- run: npm run build:production
|
|
19
|
+
- run: echo 'APOLLO_KEY="service:bob-123:489fhseo4"' > ./sampleWorkspace/spotifyGraph/.env
|
|
20
|
+
- run: |
|
|
21
|
+
expect <<EOF
|
|
22
|
+
spawn ./node_modules/.bin/rover config auth --profile VSCode-E2E
|
|
23
|
+
expect "Copy the key and paste it into the prompt below."
|
|
24
|
+
send -- "test\n"
|
|
25
|
+
expect eof
|
|
26
|
+
EOF
|
|
27
|
+
- run: xvfb-run -a npm run test:extension
|
|
@@ -11,7 +11,7 @@ jobs:
|
|
|
11
11
|
with:
|
|
12
12
|
cache: "npm"
|
|
13
13
|
- run: npm install
|
|
14
|
-
- run: echo PKG_VERSION="$(git show --no-patch --format=0.0.0-build
|
|
14
|
+
- run: echo PKG_VERSION="$(git show --no-patch --format=0.0.0-build-%ct.pr-${{ github.event.pull_request.number }}.commit-%h)" >> $GITHUB_ENV
|
|
15
15
|
- run: npm pkg set "version=${{ env.PKG_VERSION }}"
|
|
16
16
|
- run: npx -y @vscode/vsce package --out vscode-apollo-${{ env.PKG_VERSION }}.vsix
|
|
17
17
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7a55e46b`](https://github.com/apollographql/vscode-graphql/commit/7a55e46bbce01af851a5daafd2507a7b353ea081) Thanks [@phryneas](https://github.com/phryneas)! - Fix styling in README.
|
|
8
|
+
|
|
9
|
+
## 2.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#209](https://github.com/apollographql/vscode-graphql/pull/209) [`fc73ed30`](https://github.com/apollographql/vscode-graphql/commit/fc73ed3089e281aa1234268f4ec78e6aa68eae15) Thanks [@phryneas](https://github.com/phryneas)! - Change default recommended configuration file format to `json`.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#200](https://github.com/apollographql/vscode-graphql/pull/200) [`d6c6af81`](https://github.com/apollographql/vscode-graphql/commit/d6c6af811e1c04901990278e3b76057ef2221911) Thanks [@phryneas](https://github.com/phryneas)! - Fixed an issue where the configuration was not reloaded when the `.env.local` file changed.
|
|
18
|
+
|
|
19
|
+
- [#202](https://github.com/apollographql/vscode-graphql/pull/202) [`ea5cc094`](https://github.com/apollographql/vscode-graphql/commit/ea5cc0944b7015cd7b2cfee15993469c124a8356) Thanks [@phryneas](https://github.com/phryneas)! - Prevent configuration file parsing loop when transpiling TypeScript configs.
|
|
20
|
+
|
|
21
|
+
- [#204](https://github.com/apollographql/vscode-graphql/pull/204) [`c2351d2e`](https://github.com/apollographql/vscode-graphql/commit/c2351d2e179eb92fb493a4209a3461c8aa92c979) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where config file changes could not be picked up
|
|
22
|
+
|
|
23
|
+
- [#200](https://github.com/apollographql/vscode-graphql/pull/200) [`d6c6af81`](https://github.com/apollographql/vscode-graphql/commit/d6c6af811e1c04901990278e3b76057ef2221911) Thanks [@phryneas](https://github.com/phryneas)! - Add support for `apollo.config.yml`, `apollo.config.yaml` and `apollo.config.json`.
|
|
24
|
+
|
|
3
25
|
## 2.2.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -26,31 +26,36 @@ The Apollo GraphQL extension for VS Code brings an all-in-one tooling experience
|
|
|
26
26
|
|
|
27
27
|
<h2 id="getting-started">Getting started</h2>
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
For the VS Code plugin to know how to find the schema, it needs to be linked to either a published schema or a local one.
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
2. Obtain a [Personal API key](https://www.apollographql.com/docs/graphos/api-keys) from GraphOS Studio.
|
|
31
|
+
First, create an `apollo.config.json` file at the root of the project.
|
|
32
|
+
Alternatively, you can create a `yaml`, `cjs`, `mjs`, or `ts` file with the same configuration.
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
For the contents of this configuration file, select one of these options:
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
<h3>Configure extension for schemas published to Apollo GraphOS</h3>
|
|
37
|
+
<details>
|
|
38
|
+
<summary>
|
|
39
|
+
<i>Expand for instructions.</i>
|
|
40
|
+
</summary>
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
To get all the benefits of the VS Code experience, it's best to link the schema that is being developed against before installing the extension. The best way to do that is by [publishing a schema](https://www.apollographql.com/docs/graphos/delivery/publishing-schemas/) to the Apollo schema registry.
|
|
43
|
+
|
|
44
|
+
After that's done, edit the `apollo.config.json` file to look like this:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"client": {
|
|
49
|
+
"service": "graphos-graph-name"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
45
52
|
```
|
|
46
53
|
|
|
47
54
|
The `service` name is the name of the graph you've created in [GraphOS Studio](https://studio.apollographql.com).
|
|
48
55
|
|
|
49
56
|
See [additional configuration options](#additional-apollo-config-options).
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
To authenticate with GraphOS Studio to pull down your schema, create a `.env` file in the same directory as the `apollo.config.js` file. This should be an untracked file (that is, don't commit it to Git).
|
|
58
|
+
To authenticate with GraphOS Studio to pull down your schema, create a `.env` file in the same directory as the `apollo.config.json` file. This should be an untracked file (that is, don't commit it to Git).
|
|
54
59
|
|
|
55
60
|
Then go to your [User Settings page](https://studio.apollographql.com/user-settings/api-keys?referrer=docs-content) in GraphOS Studio to create a new Personal API key.
|
|
56
61
|
|
|
@@ -64,56 +69,70 @@ APOLLO_KEY=<enter copied key here>
|
|
|
64
69
|
|
|
65
70
|
After this is done, VS Code can be reloaded and the Apollo integration will connect to GraphOS Studio to provide autocomplete, validation, and more.
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
</details>
|
|
73
|
+
|
|
74
|
+
<h3 id="local-schemas">Configure extension to use introspection from a locally running service</h3>
|
|
75
|
+
<details>
|
|
76
|
+
<summary>
|
|
77
|
+
<i>Expand for instructions.</i>
|
|
78
|
+
</summary>
|
|
68
79
|
|
|
69
|
-
Sometimes it may make sense to link the editor to a locally running version of a schema to try out new designs that are in active development. To do this, the `apollo.config.
|
|
80
|
+
Sometimes it may make sense to link the editor to a locally running version of a schema to try out new designs that are in active development. To do this, the `apollo.config.json` file can be linked to a local service definition:
|
|
70
81
|
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
client: {
|
|
74
|
-
service: {
|
|
75
|
-
name: "my-graphql-app",
|
|
76
|
-
url: "http://localhost:4000/graphql"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"client": {
|
|
85
|
+
"service": {
|
|
86
|
+
"name": "my-graphql-app",
|
|
87
|
+
"url": "http://localhost:4000/graphql"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
80
91
|
```
|
|
81
92
|
|
|
82
93
|
Linking to the local schema won't provide all features, such as switching graph variants and performance metrics.
|
|
83
94
|
|
|
84
|
-
|
|
95
|
+
</details>
|
|
96
|
+
|
|
97
|
+
<h3 id="local-schema-files">Configure extension for local schema files</h3>
|
|
98
|
+
<details>
|
|
99
|
+
<summary>
|
|
100
|
+
<i>Expand for instructions.</i>
|
|
101
|
+
</summary>
|
|
85
102
|
|
|
86
103
|
You might not always have a running server to link to, so the extension also supports linking to a local schema file.
|
|
87
104
|
This is useful for working on a schema in isolation or for testing out new features.
|
|
88
|
-
To link to a local schema file, add the following to the `apollo.config.
|
|
105
|
+
To link to a local schema file, add the following to the `apollo.config.json` file:
|
|
89
106
|
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
client: {
|
|
93
|
-
service: {
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"client": {
|
|
110
|
+
"service": {
|
|
94
111
|
// can be a string pointing to a single file or an array of strings
|
|
95
|
-
localSchemaFile: "./path/to/schema.graphql"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
112
|
+
"localSchemaFile": "./path/to/schema.graphql"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
99
116
|
```
|
|
100
117
|
|
|
101
|
-
|
|
118
|
+
</details>
|
|
119
|
+
|
|
120
|
+
<h3 id="client-only-schemas">Adding Client-only schemas</h3>
|
|
102
121
|
|
|
103
122
|
One of the best features of the VS Code extension is the automatic merging of remote schemas and local ones when using integrated state management with Apollo Client. This happens automatically whenever schema definitions are found within a client project. By default, the VS Code extension will look for all JavaScript, TypeScript and GraphQL files under `./src` to find both the operations and schema definitions for building a complete schema for the application.
|
|
104
123
|
|
|
105
|
-
Client side schema definitions can be spread throughout the client app project and will be merged together to create one single schema. The default behavior can be controlled by adding specifications to the `apollo.config.
|
|
124
|
+
Client side schema definitions can be spread throughout the client app project and will be merged together to create one single schema. The default behavior can be controlled by adding specifications to the `apollo.config.json`:
|
|
106
125
|
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
client: {
|
|
110
|
-
service:
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"client": {
|
|
129
|
+
// "service": <your service configuration>,
|
|
111
130
|
// array of glob patterns
|
|
112
|
-
includes: ["./src/**/*.js"],
|
|
131
|
+
"includes": ["./src/**/*.js"],
|
|
113
132
|
// array of glob patterns
|
|
114
|
-
excludes: ["**/__tests__/**"]
|
|
115
|
-
}
|
|
116
|
-
}
|
|
133
|
+
"excludes": ["**/__tests__/**"]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
117
136
|
```
|
|
118
137
|
|
|
119
138
|
<h3 id="get-the-extension">Get the extension</h3>
|
|
@@ -195,11 +214,11 @@ _Optional_ - custom tagged template literal.
|
|
|
195
214
|
|
|
196
215
|
When using GraphQL with JavaScript or TypeScript projects, it is common to use the `gql` tagged template literal to write out operations. Apollo tools look through your files for the `gql` tag to extract your queries, so if you use a different template literal, you can configure it like so:
|
|
197
216
|
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
client: {
|
|
201
|
-
tagName: "graphql",
|
|
202
|
-
service:
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"client": {
|
|
220
|
+
"tagName": "graphql",
|
|
221
|
+
"service": //...
|
|
203
222
|
}
|
|
204
|
-
}
|
|
223
|
+
}
|
|
205
224
|
```
|
package/jest.e2e.config.js
CHANGED
|
@@ -3,6 +3,8 @@ const path = require("path");
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
moduleFileExtensions: ["js", "ts"],
|
|
6
|
+
// restrict the roots here so jest doesn't complain about *other* snapshots it sees as obsolete
|
|
7
|
+
roots: ["<rootDir>/src/language-server/__e2e__"],
|
|
6
8
|
testMatch: ["<rootDir>/src/**/*.e2e.ts"],
|
|
7
9
|
testEnvironment: "./src/__e2e__/vscode-environment.js",
|
|
8
10
|
setupFiles: ["./src/__e2e__/setup.js"],
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "vscode-apollo",
|
|
3
3
|
"displayName": "Apollo GraphQL",
|
|
4
4
|
"description": "Rich editor support for GraphQL client and server development that seamlessly integrates with the Apollo platform",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.3.1",
|
|
6
6
|
"referenceID": "87197759-7617-40d0-b32e-46d378e907c7",
|
|
7
7
|
"author": "Apollo GraphQL <opensource@apollographql.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"graphql": "16.9.0",
|
|
49
49
|
"graphql-language-service": "5.2.2",
|
|
50
50
|
"graphql-tag": "2.12.6",
|
|
51
|
+
"jsonc-parser": "^3.3.1",
|
|
51
52
|
"lodash.debounce": "4.0.8",
|
|
52
53
|
"lodash.merge": "4.6.2",
|
|
53
54
|
"lodash.throttle": "4.1.1",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"zod-validation-error": "3.3.1"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
68
|
+
"@apollo/rover": "0.27.0-alpha.0",
|
|
67
69
|
"@changesets/changelog-github": "0.4.8",
|
|
68
70
|
"@changesets/cli": "2.26.2",
|
|
69
71
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
"eslint-config-prettier": "9.0.0",
|
|
85
87
|
"eslint-plugin-prettier": "5.0.1",
|
|
86
88
|
"graphql-http": "^1.22.1",
|
|
89
|
+
"import-fresh": "^3.3.0",
|
|
87
90
|
"jest": "29.7.0",
|
|
88
91
|
"jest-environment-node": "29.7.0",
|
|
89
92
|
"memfs": "4.11.1",
|
|
@@ -93,7 +96,8 @@
|
|
|
93
96
|
"ts-jest": "29.1.2",
|
|
94
97
|
"ts-node": "^10.9.2",
|
|
95
98
|
"typescript": "^5.5.3",
|
|
96
|
-
"vscode-tmgrammar-test": "^0.1.3"
|
|
99
|
+
"vscode-tmgrammar-test": "^0.1.3",
|
|
100
|
+
"zod-to-json-schema": "^3.23.3"
|
|
97
101
|
},
|
|
98
102
|
"publisher": "apollographql",
|
|
99
103
|
"categories": [
|
|
@@ -103,7 +107,8 @@
|
|
|
103
107
|
"icon": "images/icon-apollo-blue-400x400.png",
|
|
104
108
|
"activationEvents": [
|
|
105
109
|
"workspaceContains:**/apollo.config.[jt]s",
|
|
106
|
-
"workspaceContains:**/apollo.config.[cm]js"
|
|
110
|
+
"workspaceContains:**/apollo.config.[cm]js",
|
|
111
|
+
"workspaceContains:**/apollo.config.{yaml,yml,json}"
|
|
107
112
|
],
|
|
108
113
|
"contributes": {
|
|
109
114
|
"configuration": {
|
|
@@ -147,6 +152,12 @@
|
|
|
147
152
|
"GraphQL"
|
|
148
153
|
],
|
|
149
154
|
"configuration": "./graphql.configuration.json"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "jsonc",
|
|
158
|
+
"filenames": [
|
|
159
|
+
"apollo.config.json"
|
|
160
|
+
]
|
|
150
161
|
}
|
|
151
162
|
],
|
|
152
163
|
"grammars": [
|
|
@@ -231,6 +242,23 @@
|
|
|
231
242
|
}
|
|
232
243
|
}
|
|
233
244
|
],
|
|
245
|
+
"jsonValidation": [
|
|
246
|
+
{
|
|
247
|
+
"fileMatch": "apollo.config.json",
|
|
248
|
+
"url": "./schemas/apollo.config.schema.json"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"__yamlValidation": "For context, see https://github.com/redhat-developer/vscode-yaml?tab=readme-ov-file#mapping-a-schema-in-an-extension",
|
|
252
|
+
"yamlValidation": [
|
|
253
|
+
{
|
|
254
|
+
"fileMatch": "apollo.config.yml",
|
|
255
|
+
"url": "./schemas/apollo.config.schema.json"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"fileMatch": "apollo.config.yaml",
|
|
259
|
+
"url": "./schemas/apollo.config.schema.json"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
234
262
|
"commands": [
|
|
235
263
|
{
|
|
236
264
|
"command": "apollographql/selectSchemaTag",
|
package/renovate.json
CHANGED
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
{
|
|
6
6
|
"groupName": "all @types",
|
|
7
7
|
"groupSlug": "all-types",
|
|
8
|
-
"
|
|
8
|
+
"matchPackageNames": ["/@types/*/"]
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"groupName": "all devDependencies",
|
|
12
12
|
"groupSlug": "all-dev",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"matchDepTypes": ["devDependencies"],
|
|
14
|
+
"matchPackageNames": ["*"]
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"groupName": "all dependencies - patch updates",
|
|
18
18
|
"groupSlug": "all-patch",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"matchUpdateTypes": ["patch"],
|
|
20
|
+
"matchPackageNames": ["*"]
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
"ignoreDeps": [
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
""
|
|
1
|
+
extend schema
|
|
2
|
+
@link(
|
|
3
|
+
url: "https://specs.apollo.dev/federation/v2.8"
|
|
4
|
+
import: ["@key", "@override", "@requires", "@external", "@shareable"]
|
|
5
|
+
)
|
|
6
|
+
|
|
4
7
|
type Query {
|
|
5
|
-
|
|
8
|
+
a: A
|
|
6
9
|
}
|
|
7
10
|
|
|
8
|
-
""
|
|
9
|
-
|
|
10
|
-
""
|
|
11
|
-
|
|
12
|
-
id: ID!
|
|
13
|
-
name: String!
|
|
11
|
+
type A @key(fields: "a") {
|
|
12
|
+
a: ID @override(from: "DNE")
|
|
13
|
+
b: String! @requires(fields: "c") @shareable
|
|
14
|
+
c: String! @external
|
|
14
15
|
}
|
|
File without changes
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"allOf": [
|
|
3
|
+
{
|
|
4
|
+
"$ref": "#/definitions/baseConfig"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"client": {
|
|
10
|
+
"$ref": "#/definitions/clientConfig"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": [
|
|
14
|
+
"client"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"definitions": {
|
|
19
|
+
"clientConfig": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"service": {
|
|
23
|
+
"anyOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The name of the Apollo Studio graph to use. Alternatively pass in an object to configure a local schema."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"name": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The name your project will be referred to by the Apollo GraphQL extension."
|
|
34
|
+
},
|
|
35
|
+
"url": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "URL of a GraphQL to use for the GraphQL Schema for this project. Needs introspection enabled."
|
|
38
|
+
},
|
|
39
|
+
"headers": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"default": {},
|
|
45
|
+
"description": "Additional headers to send to the server."
|
|
46
|
+
},
|
|
47
|
+
"skipSSLValidation": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"default": false,
|
|
50
|
+
"description": "Skip SSL validation. May be required for self-signed certificates."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"url"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"description": "Configuration for using a local schema from a URL."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"name": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "The name your project will be referred to by the Apollo GraphQL extension."
|
|
65
|
+
},
|
|
66
|
+
"localSchemaFile": {
|
|
67
|
+
"anyOf": [
|
|
68
|
+
{
|
|
69
|
+
"type": "string",
|
|
70
|
+
"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."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"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."
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"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."
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"localSchemaFile"
|
|
85
|
+
],
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"description": "Configuration for using a local schema from a file."
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"description": "A string to refer to a graph in Apollo Studio, or an object for a local schema."
|
|
91
|
+
},
|
|
92
|
+
"validationRules": {
|
|
93
|
+
"anyOf": [
|
|
94
|
+
{
|
|
95
|
+
"type": "array",
|
|
96
|
+
"description": "Additional validation rules to check for. To use this feature, please use a configuration file format that allows passing JavaScript objects."
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"description": "Additional validation rules to check for. To use this feature, please use a configuration file format that allows passing JavaScript objects."
|
|
100
|
+
},
|
|
101
|
+
"includes": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"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."
|
|
107
|
+
},
|
|
108
|
+
"excludes": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"default": [
|
|
114
|
+
"**/node_modules",
|
|
115
|
+
"**/__tests__"
|
|
116
|
+
],
|
|
117
|
+
"description": "Files to exclude from this project. The Apollo GraphQL extension will not provide IntelliSense-like features in these files."
|
|
118
|
+
},
|
|
119
|
+
"tagName": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"default": "gql",
|
|
122
|
+
"description": "The name of the template literal tag or function used in JavaScript files to declare GraphQL Documents."
|
|
123
|
+
},
|
|
124
|
+
"clientOnlyDirectives": {
|
|
125
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
126
|
+
},
|
|
127
|
+
"clientSchemaDirectives": {
|
|
128
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
129
|
+
},
|
|
130
|
+
"statsWindow": {
|
|
131
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
132
|
+
},
|
|
133
|
+
"name": {
|
|
134
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
135
|
+
},
|
|
136
|
+
"referenceId": {
|
|
137
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
138
|
+
},
|
|
139
|
+
"version": {
|
|
140
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"service"
|
|
145
|
+
],
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"description": "Configuration for a Client project."
|
|
148
|
+
},
|
|
149
|
+
"engineConfig": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"endpoint": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"default": "https://graphql.api.apollographql.com/api/graphql",
|
|
155
|
+
"description": "The URL of the Apollo Studio API."
|
|
156
|
+
},
|
|
157
|
+
"apiKey": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"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."
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"description": "Network configuration for Apollo Studio API."
|
|
164
|
+
},
|
|
165
|
+
"baseConfig": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"properties": {
|
|
168
|
+
"engine": {
|
|
169
|
+
"$ref": "#/definitions/engineConfig",
|
|
170
|
+
"default": {},
|
|
171
|
+
"description": "Network configuration for Apollo Studio API."
|
|
172
|
+
},
|
|
173
|
+
"client": {
|
|
174
|
+
"description": "Configuration for a Client project."
|
|
175
|
+
},
|
|
176
|
+
"service": {
|
|
177
|
+
"description": "This option is no longer supported, please remove it from your configuration file."
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"additionalProperties": false
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
184
|
+
}
|
package/src/__e2e__/runTests.js
CHANGED
|
@@ -18,6 +18,7 @@ async function main() {
|
|
|
18
18
|
const TEST_PORT = 7096;
|
|
19
19
|
process.env.APOLLO_ENGINE_ENDPOINT = "http://localhost:7096/apollo";
|
|
20
20
|
process.env.MOCK_SERVER_PORT = String(TEST_PORT);
|
|
21
|
+
process.env.APOLLO_FEATURE_FLAGS = "rover";
|
|
21
22
|
disposables.push(
|
|
22
23
|
...(await Promise.all([
|
|
23
24
|
runMockServer(TEST_PORT, false, loadDefaultMocks),
|