@backstage-community/plugin-apollo-explorer 0.2.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/CHANGELOG.md +805 -0
- package/README.md +104 -0
- package/dist/esm/index-BgwBzs82.esm.js +77 -0
- package/dist/esm/index-BgwBzs82.esm.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.esm.js +22 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +62 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,805 @@
|
|
|
1
|
+
# @backstage-community/plugin-apollo-explorer
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 193a2a3: Migrated from the [backstage/backstage](https://github.com/backstage/backstage) monorepo.
|
|
8
|
+
|
|
9
|
+
## 0.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c664b15: feat(apollo-explorer): allow callbacks using apiholder
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`.
|
|
18
|
+
- cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/core-components@0.14.4
|
|
21
|
+
- @backstage/core-plugin-api@1.9.2
|
|
22
|
+
|
|
23
|
+
## 0.1.24-next.0
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/core-components@0.14.4-next.0
|
|
29
|
+
- @backstage/core-plugin-api@1.9.1
|
|
30
|
+
|
|
31
|
+
## 0.1.23
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies
|
|
36
|
+
- @backstage/core-components@0.14.3
|
|
37
|
+
- @backstage/core-plugin-api@1.9.1
|
|
38
|
+
|
|
39
|
+
## 0.1.22
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
- @backstage/core-components@0.14.2
|
|
45
|
+
- @backstage/core-plugin-api@1.9.1
|
|
46
|
+
|
|
47
|
+
## 0.1.21
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- bb9e31e: Added an optional ESLint rule - no-top-level-material-ui-4-imports -in apollo-explorer plugin which has an auto fix function to migrate the imports and used it to migrate the Material UI imports for plugins/apollo-explorer.
|
|
52
|
+
- Updated dependencies
|
|
53
|
+
- @backstage/core-components@0.14.1
|
|
54
|
+
- @backstage/core-plugin-api@1.9.1
|
|
55
|
+
|
|
56
|
+
## 0.1.21-next.2
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies
|
|
61
|
+
- @backstage/core-components@0.14.1-next.2
|
|
62
|
+
- @backstage/core-plugin-api@1.9.1-next.1
|
|
63
|
+
|
|
64
|
+
## 0.1.21-next.1
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- Updated dependencies
|
|
69
|
+
- @backstage/core-components@0.14.1-next.1
|
|
70
|
+
- @backstage/core-plugin-api@1.9.1-next.1
|
|
71
|
+
|
|
72
|
+
## 0.1.21-next.0
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- Updated dependencies
|
|
77
|
+
- @backstage/core-components@0.14.1-next.0
|
|
78
|
+
- @backstage/core-plugin-api@1.9.1-next.0
|
|
79
|
+
|
|
80
|
+
## 0.1.20
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- 8fe56a8: Widen `@types/react` dependency range to include version 18.
|
|
85
|
+
- Updated dependencies
|
|
86
|
+
- @backstage/core-components@0.14.0
|
|
87
|
+
- @backstage/core-plugin-api@1.9.0
|
|
88
|
+
|
|
89
|
+
## 0.1.20-next.2
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies
|
|
94
|
+
- @backstage/core-components@0.14.0-next.2
|
|
95
|
+
- @backstage/core-plugin-api@1.9.0-next.1
|
|
96
|
+
|
|
97
|
+
## 0.1.20-next.1
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- 8fe56a8: Widen `@types/react` dependency range to include version 18.
|
|
102
|
+
- Updated dependencies
|
|
103
|
+
- @backstage/core-components@0.14.0-next.1
|
|
104
|
+
- @backstage/core-plugin-api@1.9.0-next.1
|
|
105
|
+
|
|
106
|
+
## 0.1.20-next.0
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- Updated dependencies
|
|
111
|
+
- @backstage/core-components@0.14.0-next.0
|
|
112
|
+
- @backstage/core-plugin-api@1.8.3-next.0
|
|
113
|
+
|
|
114
|
+
## 0.1.19
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- 4016f21: Remove some unused dependencies
|
|
119
|
+
- Updated dependencies
|
|
120
|
+
- @backstage/core-components@0.13.10
|
|
121
|
+
- @backstage/core-plugin-api@1.8.2
|
|
122
|
+
|
|
123
|
+
## 0.1.19-next.1
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies
|
|
128
|
+
- @backstage/core-plugin-api@1.8.2-next.0
|
|
129
|
+
- @backstage/core-components@0.13.10-next.1
|
|
130
|
+
|
|
131
|
+
## 0.1.19-next.0
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- 4016f21: Remove some unused dependencies
|
|
136
|
+
- Updated dependencies
|
|
137
|
+
- @backstage/core-components@0.13.10-next.0
|
|
138
|
+
- @backstage/core-plugin-api@1.8.1
|
|
139
|
+
|
|
140
|
+
## 0.1.18
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- e296b94: Updated dependency `@apollo/explorer` to `^3.0.0`.
|
|
145
|
+
- Updated dependencies
|
|
146
|
+
- @backstage/core-plugin-api@1.8.1
|
|
147
|
+
- @backstage/core-components@0.13.9
|
|
148
|
+
- @backstage/theme@0.5.0
|
|
149
|
+
|
|
150
|
+
## 0.1.18-next.3
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- Updated dependencies
|
|
155
|
+
- @backstage/core-components@0.13.9-next.3
|
|
156
|
+
- @backstage/core-plugin-api@1.8.1-next.1
|
|
157
|
+
- @backstage/theme@0.5.0-next.1
|
|
158
|
+
|
|
159
|
+
## 0.1.18-next.2
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- Updated dependencies
|
|
164
|
+
- @backstage/theme@0.5.0-next.1
|
|
165
|
+
- @backstage/core-components@0.13.9-next.2
|
|
166
|
+
- @backstage/core-plugin-api@1.8.1-next.1
|
|
167
|
+
|
|
168
|
+
## 0.1.18-next.1
|
|
169
|
+
|
|
170
|
+
### Patch Changes
|
|
171
|
+
|
|
172
|
+
- Updated dependencies
|
|
173
|
+
- @backstage/core-components@0.13.9-next.1
|
|
174
|
+
- @backstage/core-plugin-api@1.8.1-next.1
|
|
175
|
+
- @backstage/theme@0.5.0-next.0
|
|
176
|
+
|
|
177
|
+
## 0.1.18-next.0
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- e296b94128: Updated dependency `@apollo/explorer` to `^3.0.0`.
|
|
182
|
+
- Updated dependencies
|
|
183
|
+
- @backstage/core-plugin-api@1.8.1-next.0
|
|
184
|
+
- @backstage/core-components@0.13.9-next.0
|
|
185
|
+
- @backstage/theme@0.5.0-next.0
|
|
186
|
+
|
|
187
|
+
## 0.1.17
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- 6c2b872153: Add official support for React 18.
|
|
192
|
+
- Updated dependencies
|
|
193
|
+
- @backstage/core-components@0.13.8
|
|
194
|
+
- @backstage/core-plugin-api@1.8.0
|
|
195
|
+
- @backstage/theme@0.4.4
|
|
196
|
+
|
|
197
|
+
## 0.1.17-next.2
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies
|
|
202
|
+
- @backstage/core-components@0.13.8-next.2
|
|
203
|
+
|
|
204
|
+
## 0.1.17-next.1
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated dependencies
|
|
209
|
+
- @backstage/core-components@0.13.8-next.1
|
|
210
|
+
- @backstage/core-plugin-api@1.8.0-next.0
|
|
211
|
+
- @backstage/theme@0.4.4-next.0
|
|
212
|
+
|
|
213
|
+
## 0.1.17-next.0
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- 6c2b872153: Add official support for React 18.
|
|
218
|
+
- Updated dependencies
|
|
219
|
+
- @backstage/core-components@0.13.7-next.0
|
|
220
|
+
- @backstage/core-plugin-api@1.8.0-next.0
|
|
221
|
+
- @backstage/theme@0.4.4-next.0
|
|
222
|
+
|
|
223
|
+
## 0.1.16
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- 9a1fce352e: Updated dependency `@testing-library/jest-dom` to `^6.0.0`.
|
|
228
|
+
- f95af4e540: Updated dependency `@testing-library/dom` to `^9.0.0`.
|
|
229
|
+
- Updated dependencies
|
|
230
|
+
- @backstage/core-plugin-api@1.7.0
|
|
231
|
+
- @backstage/core-components@0.13.6
|
|
232
|
+
- @backstage/theme@0.4.3
|
|
233
|
+
|
|
234
|
+
## 0.1.16-next.2
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- Updated dependencies
|
|
239
|
+
- @backstage/core-components@0.13.6-next.2
|
|
240
|
+
- @backstage/core-plugin-api@1.7.0-next.1
|
|
241
|
+
- @backstage/theme@0.4.3-next.0
|
|
242
|
+
|
|
243
|
+
## 0.1.16-next.1
|
|
244
|
+
|
|
245
|
+
### Patch Changes
|
|
246
|
+
|
|
247
|
+
- Updated dependencies
|
|
248
|
+
- @backstage/core-components@0.13.6-next.1
|
|
249
|
+
- @backstage/core-plugin-api@1.7.0-next.0
|
|
250
|
+
- @backstage/theme@0.4.2
|
|
251
|
+
|
|
252
|
+
## 0.1.16-next.0
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- Updated dependencies
|
|
257
|
+
- @backstage/core-plugin-api@1.7.0-next.0
|
|
258
|
+
- @backstage/core-components@0.13.6-next.0
|
|
259
|
+
- @backstage/theme@0.4.2
|
|
260
|
+
|
|
261
|
+
## 0.1.15
|
|
262
|
+
|
|
263
|
+
### Patch Changes
|
|
264
|
+
|
|
265
|
+
- 482bb5c0bbf8: Moved `@types/react` to be a regular dependency
|
|
266
|
+
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
|
|
267
|
+
- 8cec7664e146: Removed `@types/node` dependency
|
|
268
|
+
- Updated dependencies
|
|
269
|
+
- @backstage/core-components@0.13.5
|
|
270
|
+
- @backstage/core-plugin-api@1.6.0
|
|
271
|
+
- @backstage/theme@0.4.2
|
|
272
|
+
|
|
273
|
+
## 0.1.15-next.3
|
|
274
|
+
|
|
275
|
+
### Patch Changes
|
|
276
|
+
|
|
277
|
+
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
|
|
278
|
+
- Updated dependencies
|
|
279
|
+
- @backstage/core-components@0.13.5-next.3
|
|
280
|
+
- @backstage/core-plugin-api@1.6.0-next.3
|
|
281
|
+
- @backstage/theme@0.4.2-next.0
|
|
282
|
+
|
|
283
|
+
## 0.1.15-next.2
|
|
284
|
+
|
|
285
|
+
### Patch Changes
|
|
286
|
+
|
|
287
|
+
- 8cec7664e146: Removed `@types/node` dependency
|
|
288
|
+
- Updated dependencies
|
|
289
|
+
- @backstage/core-components@0.13.5-next.2
|
|
290
|
+
- @backstage/core-plugin-api@1.6.0-next.2
|
|
291
|
+
- @backstage/theme@0.4.1
|
|
292
|
+
|
|
293
|
+
## 0.1.15-next.1
|
|
294
|
+
|
|
295
|
+
### Patch Changes
|
|
296
|
+
|
|
297
|
+
- Updated dependencies
|
|
298
|
+
- @backstage/core-components@0.13.5-next.1
|
|
299
|
+
- @backstage/core-plugin-api@1.6.0-next.1
|
|
300
|
+
- @backstage/theme@0.4.1
|
|
301
|
+
|
|
302
|
+
## 0.1.15-next.0
|
|
303
|
+
|
|
304
|
+
### Patch Changes
|
|
305
|
+
|
|
306
|
+
- 482bb5c0bbf8: Moved `@types/react` to be a regular dependency
|
|
307
|
+
- Updated dependencies
|
|
308
|
+
- @backstage/core-plugin-api@1.6.0-next.0
|
|
309
|
+
- @backstage/core-components@0.13.5-next.0
|
|
310
|
+
- @backstage/theme@0.4.1
|
|
311
|
+
|
|
312
|
+
## 0.1.14
|
|
313
|
+
|
|
314
|
+
### Patch Changes
|
|
315
|
+
|
|
316
|
+
- 12a8c94eda8d: Add package repository and homepage metadata
|
|
317
|
+
- Updated dependencies
|
|
318
|
+
- @backstage/core-components@0.13.4
|
|
319
|
+
- @backstage/core-plugin-api@1.5.3
|
|
320
|
+
- @backstage/theme@0.4.1
|
|
321
|
+
|
|
322
|
+
## 0.1.14-next.1
|
|
323
|
+
|
|
324
|
+
### Patch Changes
|
|
325
|
+
|
|
326
|
+
- 12a8c94eda8d: Add package repository and homepage metadata
|
|
327
|
+
- Updated dependencies
|
|
328
|
+
- @backstage/core-components@0.13.4-next.0
|
|
329
|
+
- @backstage/core-plugin-api@1.5.3
|
|
330
|
+
- @backstage/theme@0.4.1
|
|
331
|
+
|
|
332
|
+
## 0.1.14-next.0
|
|
333
|
+
|
|
334
|
+
### Patch Changes
|
|
335
|
+
|
|
336
|
+
- Updated dependencies
|
|
337
|
+
- @backstage/core-components@0.13.4-next.0
|
|
338
|
+
- @backstage/core-plugin-api@1.5.3
|
|
339
|
+
- @backstage/theme@0.4.1
|
|
340
|
+
|
|
341
|
+
## 0.1.13
|
|
342
|
+
|
|
343
|
+
### Patch Changes
|
|
344
|
+
|
|
345
|
+
- Updated dependencies
|
|
346
|
+
- @backstage/theme@0.4.1
|
|
347
|
+
- @backstage/core-components@0.13.3
|
|
348
|
+
- @backstage/core-plugin-api@1.5.3
|
|
349
|
+
|
|
350
|
+
## 0.1.13-next.2
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- Updated dependencies
|
|
355
|
+
- @backstage/theme@0.4.1-next.1
|
|
356
|
+
- @backstage/core-plugin-api@1.5.3-next.1
|
|
357
|
+
- @backstage/core-components@0.13.3-next.2
|
|
358
|
+
|
|
359
|
+
## 0.1.13-next.1
|
|
360
|
+
|
|
361
|
+
### Patch Changes
|
|
362
|
+
|
|
363
|
+
- Updated dependencies
|
|
364
|
+
- @backstage/theme@0.4.1-next.0
|
|
365
|
+
- @backstage/core-components@0.13.3-next.1
|
|
366
|
+
- @backstage/core-plugin-api@1.5.3-next.0
|
|
367
|
+
|
|
368
|
+
## 0.1.13-next.0
|
|
369
|
+
|
|
370
|
+
### Patch Changes
|
|
371
|
+
|
|
372
|
+
- Updated dependencies
|
|
373
|
+
- @backstage/core-components@0.13.3-next.0
|
|
374
|
+
- @backstage/core-plugin-api@1.5.2
|
|
375
|
+
- @backstage/theme@0.4.0
|
|
376
|
+
|
|
377
|
+
## 0.1.12
|
|
378
|
+
|
|
379
|
+
### Patch Changes
|
|
380
|
+
|
|
381
|
+
- Updated dependencies
|
|
382
|
+
- @backstage/core-plugin-api@1.5.2
|
|
383
|
+
- @backstage/core-components@0.13.2
|
|
384
|
+
- @backstage/theme@0.4.0
|
|
385
|
+
|
|
386
|
+
## 0.1.12-next.3
|
|
387
|
+
|
|
388
|
+
### Patch Changes
|
|
389
|
+
|
|
390
|
+
- Updated dependencies
|
|
391
|
+
- @backstage/core-components@0.13.2-next.3
|
|
392
|
+
- @backstage/core-plugin-api@1.5.2-next.0
|
|
393
|
+
- @backstage/theme@0.4.0-next.1
|
|
394
|
+
|
|
395
|
+
## 0.1.12-next.2
|
|
396
|
+
|
|
397
|
+
### Patch Changes
|
|
398
|
+
|
|
399
|
+
- Updated dependencies
|
|
400
|
+
- @backstage/theme@0.4.0-next.1
|
|
401
|
+
- @backstage/core-components@0.13.2-next.2
|
|
402
|
+
- @backstage/core-plugin-api@1.5.2-next.0
|
|
403
|
+
|
|
404
|
+
## 0.1.12-next.1
|
|
405
|
+
|
|
406
|
+
### Patch Changes
|
|
407
|
+
|
|
408
|
+
- Updated dependencies
|
|
409
|
+
- @backstage/core-components@0.13.2-next.1
|
|
410
|
+
- @backstage/core-plugin-api@1.5.2-next.0
|
|
411
|
+
- @backstage/theme@0.4.0-next.0
|
|
412
|
+
|
|
413
|
+
## 0.1.12-next.0
|
|
414
|
+
|
|
415
|
+
### Patch Changes
|
|
416
|
+
|
|
417
|
+
- Updated dependencies
|
|
418
|
+
- @backstage/theme@0.4.0-next.0
|
|
419
|
+
- @backstage/core-components@0.13.2-next.0
|
|
420
|
+
- @backstage/core-plugin-api@1.5.1
|
|
421
|
+
|
|
422
|
+
## 0.1.11
|
|
423
|
+
|
|
424
|
+
### Patch Changes
|
|
425
|
+
|
|
426
|
+
- Updated dependencies
|
|
427
|
+
- @backstage/theme@0.3.0
|
|
428
|
+
- @backstage/core-components@0.13.1
|
|
429
|
+
- @backstage/core-plugin-api@1.5.1
|
|
430
|
+
|
|
431
|
+
## 0.1.11-next.1
|
|
432
|
+
|
|
433
|
+
### Patch Changes
|
|
434
|
+
|
|
435
|
+
- Updated dependencies
|
|
436
|
+
- @backstage/theme@0.3.0-next.0
|
|
437
|
+
- @backstage/core-components@0.13.1-next.1
|
|
438
|
+
- @backstage/core-plugin-api@1.5.1
|
|
439
|
+
|
|
440
|
+
## 0.1.11-next.0
|
|
441
|
+
|
|
442
|
+
### Patch Changes
|
|
443
|
+
|
|
444
|
+
- Updated dependencies
|
|
445
|
+
- @backstage/core-components@0.13.1-next.0
|
|
446
|
+
- @backstage/core-plugin-api@1.5.1
|
|
447
|
+
|
|
448
|
+
## 0.1.10
|
|
449
|
+
|
|
450
|
+
### Patch Changes
|
|
451
|
+
|
|
452
|
+
- 7d75f6d9b8f: chore: Improve API Reference documentation
|
|
453
|
+
- 29ba8267d69: Updated dependency `@material-ui/lab` to `4.0.0-alpha.61`.
|
|
454
|
+
- e0c6e8b9c3c: Update peer dependencies
|
|
455
|
+
- Updated dependencies
|
|
456
|
+
- @backstage/core-components@0.13.0
|
|
457
|
+
- @backstage/theme@0.2.19
|
|
458
|
+
- @backstage/core-plugin-api@1.5.1
|
|
459
|
+
|
|
460
|
+
## 0.1.10-next.3
|
|
461
|
+
|
|
462
|
+
### Patch Changes
|
|
463
|
+
|
|
464
|
+
- Updated dependencies
|
|
465
|
+
- @backstage/core-components@0.13.0-next.3
|
|
466
|
+
- @backstage/core-plugin-api@1.5.1-next.1
|
|
467
|
+
- @backstage/theme@0.2.19-next.0
|
|
468
|
+
|
|
469
|
+
## 0.1.10-next.2
|
|
470
|
+
|
|
471
|
+
### Patch Changes
|
|
472
|
+
|
|
473
|
+
- Updated dependencies
|
|
474
|
+
- @backstage/core-components@0.12.6-next.2
|
|
475
|
+
- @backstage/core-plugin-api@1.5.1-next.1
|
|
476
|
+
- @backstage/theme@0.2.19-next.0
|
|
477
|
+
|
|
478
|
+
## 0.1.10-next.1
|
|
479
|
+
|
|
480
|
+
### Patch Changes
|
|
481
|
+
|
|
482
|
+
- 7d75f6d9b8f: chore: Improve API Reference documentation
|
|
483
|
+
- 29ba8267d69: Updated dependency `@material-ui/lab` to `4.0.0-alpha.61`.
|
|
484
|
+
- e0c6e8b9c3c: Update peer dependencies
|
|
485
|
+
- Updated dependencies
|
|
486
|
+
- @backstage/core-components@0.12.6-next.1
|
|
487
|
+
- @backstage/core-plugin-api@1.5.1-next.0
|
|
488
|
+
- @backstage/theme@0.2.19-next.0
|
|
489
|
+
|
|
490
|
+
## 0.1.10-next.0
|
|
491
|
+
|
|
492
|
+
### Patch Changes
|
|
493
|
+
|
|
494
|
+
- Updated dependencies
|
|
495
|
+
- @backstage/core-components@0.12.6-next.0
|
|
496
|
+
- @backstage/core-plugin-api@1.5.0
|
|
497
|
+
- @backstage/theme@0.2.18
|
|
498
|
+
|
|
499
|
+
## 0.1.9
|
|
500
|
+
|
|
501
|
+
### Patch Changes
|
|
502
|
+
|
|
503
|
+
- 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
|
|
504
|
+
- Updated dependencies
|
|
505
|
+
- @backstage/core-components@0.12.5
|
|
506
|
+
- @backstage/core-plugin-api@1.5.0
|
|
507
|
+
- @backstage/theme@0.2.18
|
|
508
|
+
|
|
509
|
+
## 0.1.9-next.2
|
|
510
|
+
|
|
511
|
+
### Patch Changes
|
|
512
|
+
|
|
513
|
+
- Updated dependencies
|
|
514
|
+
- @backstage/core-components@0.12.5-next.2
|
|
515
|
+
- @backstage/core-plugin-api@1.5.0-next.2
|
|
516
|
+
|
|
517
|
+
## 0.1.9-next.1
|
|
518
|
+
|
|
519
|
+
### Patch Changes
|
|
520
|
+
|
|
521
|
+
- 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
|
|
522
|
+
- Updated dependencies
|
|
523
|
+
- @backstage/core-components@0.12.5-next.1
|
|
524
|
+
- @backstage/core-plugin-api@1.4.1-next.1
|
|
525
|
+
- @backstage/theme@0.2.18-next.0
|
|
526
|
+
|
|
527
|
+
## 0.1.9-next.0
|
|
528
|
+
|
|
529
|
+
### Patch Changes
|
|
530
|
+
|
|
531
|
+
- Updated dependencies
|
|
532
|
+
- @backstage/core-plugin-api@1.4.1-next.0
|
|
533
|
+
- @backstage/core-components@0.12.5-next.0
|
|
534
|
+
- @backstage/theme@0.2.17
|
|
535
|
+
|
|
536
|
+
## 0.1.8
|
|
537
|
+
|
|
538
|
+
### Patch Changes
|
|
539
|
+
|
|
540
|
+
- d950d3e217: Depend on `@material-ui/core` version `^4.12.2` like all other in-repo packages
|
|
541
|
+
- Updated dependencies
|
|
542
|
+
- @backstage/core-components@0.12.4
|
|
543
|
+
- @backstage/theme@0.2.17
|
|
544
|
+
- @backstage/core-plugin-api@1.4.0
|
|
545
|
+
|
|
546
|
+
## 0.1.8-next.1
|
|
547
|
+
|
|
548
|
+
### Patch Changes
|
|
549
|
+
|
|
550
|
+
- Updated dependencies
|
|
551
|
+
- @backstage/core-components@0.12.4-next.1
|
|
552
|
+
- @backstage/core-plugin-api@1.3.0
|
|
553
|
+
- @backstage/theme@0.2.16
|
|
554
|
+
|
|
555
|
+
## 0.1.8-next.0
|
|
556
|
+
|
|
557
|
+
### Patch Changes
|
|
558
|
+
|
|
559
|
+
- d950d3e217: Depend on `@material-ui/core` version `^4.12.2` like all other in-repo packages
|
|
560
|
+
- Updated dependencies
|
|
561
|
+
- @backstage/core-components@0.12.4-next.0
|
|
562
|
+
- @backstage/core-plugin-api@1.3.0
|
|
563
|
+
- @backstage/theme@0.2.16
|
|
564
|
+
|
|
565
|
+
## 0.1.7
|
|
566
|
+
|
|
567
|
+
### Patch Changes
|
|
568
|
+
|
|
569
|
+
- e8269bca15: Updated dependency `@apollo/explorer` to `^2.0.0`.
|
|
570
|
+
- Updated dependencies
|
|
571
|
+
- @backstage/core-components@0.12.3
|
|
572
|
+
- @backstage/core-plugin-api@1.3.0
|
|
573
|
+
- @backstage/theme@0.2.16
|
|
574
|
+
|
|
575
|
+
## 0.1.7-next.2
|
|
576
|
+
|
|
577
|
+
### Patch Changes
|
|
578
|
+
|
|
579
|
+
- e8269bca15: Updated dependency `@apollo/explorer` to `^2.0.0`.
|
|
580
|
+
- Updated dependencies
|
|
581
|
+
- @backstage/core-plugin-api@1.3.0-next.1
|
|
582
|
+
- @backstage/core-components@0.12.3-next.2
|
|
583
|
+
- @backstage/theme@0.2.16
|
|
584
|
+
|
|
585
|
+
## 0.1.7-next.1
|
|
586
|
+
|
|
587
|
+
### Patch Changes
|
|
588
|
+
|
|
589
|
+
- Updated dependencies
|
|
590
|
+
- @backstage/core-components@0.12.3-next.1
|
|
591
|
+
- @backstage/core-plugin-api@1.2.1-next.0
|
|
592
|
+
- @backstage/theme@0.2.16
|
|
593
|
+
|
|
594
|
+
## 0.1.7-next.0
|
|
595
|
+
|
|
596
|
+
### Patch Changes
|
|
597
|
+
|
|
598
|
+
- Updated dependencies
|
|
599
|
+
- @backstage/core-components@0.12.3-next.0
|
|
600
|
+
- @backstage/core-plugin-api@1.2.0
|
|
601
|
+
- @backstage/theme@0.2.16
|
|
602
|
+
|
|
603
|
+
## 0.1.6
|
|
604
|
+
|
|
605
|
+
### Patch Changes
|
|
606
|
+
|
|
607
|
+
- Updated dependencies
|
|
608
|
+
- @backstage/core-components@0.12.2
|
|
609
|
+
|
|
610
|
+
## 0.1.5
|
|
611
|
+
|
|
612
|
+
### Patch Changes
|
|
613
|
+
|
|
614
|
+
- 3280711113: Updated dependency `msw` to `^0.49.0`.
|
|
615
|
+
- Updated dependencies
|
|
616
|
+
- @backstage/core-plugin-api@1.2.0
|
|
617
|
+
- @backstage/core-components@0.12.1
|
|
618
|
+
- @backstage/theme@0.2.16
|
|
619
|
+
|
|
620
|
+
## 0.1.5-next.4
|
|
621
|
+
|
|
622
|
+
### Patch Changes
|
|
623
|
+
|
|
624
|
+
- Updated dependencies
|
|
625
|
+
- @backstage/core-components@0.12.1-next.4
|
|
626
|
+
- @backstage/core-plugin-api@1.2.0-next.2
|
|
627
|
+
- @backstage/theme@0.2.16
|
|
628
|
+
|
|
629
|
+
## 0.1.5-next.3
|
|
630
|
+
|
|
631
|
+
### Patch Changes
|
|
632
|
+
|
|
633
|
+
- Updated dependencies
|
|
634
|
+
- @backstage/core-components@0.12.1-next.3
|
|
635
|
+
- @backstage/core-plugin-api@1.2.0-next.2
|
|
636
|
+
- @backstage/theme@0.2.16
|
|
637
|
+
|
|
638
|
+
## 0.1.5-next.2
|
|
639
|
+
|
|
640
|
+
### Patch Changes
|
|
641
|
+
|
|
642
|
+
- Updated dependencies
|
|
643
|
+
- @backstage/core-plugin-api@1.2.0-next.2
|
|
644
|
+
- @backstage/core-components@0.12.1-next.2
|
|
645
|
+
- @backstage/theme@0.2.16
|
|
646
|
+
|
|
647
|
+
## 0.1.5-next.1
|
|
648
|
+
|
|
649
|
+
### Patch Changes
|
|
650
|
+
|
|
651
|
+
- Updated dependencies
|
|
652
|
+
- @backstage/core-components@0.12.1-next.1
|
|
653
|
+
- @backstage/core-plugin-api@1.1.1-next.1
|
|
654
|
+
- @backstage/theme@0.2.16
|
|
655
|
+
|
|
656
|
+
## 0.1.5-next.0
|
|
657
|
+
|
|
658
|
+
### Patch Changes
|
|
659
|
+
|
|
660
|
+
- 3280711113: Updated dependency `msw` to `^0.49.0`.
|
|
661
|
+
- Updated dependencies
|
|
662
|
+
- @backstage/core-components@0.12.1-next.0
|
|
663
|
+
- @backstage/core-plugin-api@1.1.1-next.0
|
|
664
|
+
- @backstage/theme@0.2.16
|
|
665
|
+
|
|
666
|
+
## 0.1.4
|
|
667
|
+
|
|
668
|
+
### Patch Changes
|
|
669
|
+
|
|
670
|
+
- Updated dependencies
|
|
671
|
+
- @backstage/core-components@0.12.0
|
|
672
|
+
- @backstage/core-plugin-api@1.1.0
|
|
673
|
+
- @backstage/theme@0.2.16
|
|
674
|
+
|
|
675
|
+
## 0.1.4-next.1
|
|
676
|
+
|
|
677
|
+
### Patch Changes
|
|
678
|
+
|
|
679
|
+
- Updated dependencies
|
|
680
|
+
- @backstage/core-components@0.12.0-next.1
|
|
681
|
+
- @backstage/core-plugin-api@1.1.0-next.0
|
|
682
|
+
- @backstage/theme@0.2.16
|
|
683
|
+
|
|
684
|
+
## 0.1.4-next.0
|
|
685
|
+
|
|
686
|
+
### Patch Changes
|
|
687
|
+
|
|
688
|
+
- Updated dependencies
|
|
689
|
+
- @backstage/core-components@0.12.0-next.0
|
|
690
|
+
- @backstage/core-plugin-api@1.1.0-next.0
|
|
691
|
+
- @backstage/theme@0.2.16
|
|
692
|
+
|
|
693
|
+
## 0.1.3
|
|
694
|
+
|
|
695
|
+
### Patch Changes
|
|
696
|
+
|
|
697
|
+
- Updated dependencies
|
|
698
|
+
- @backstage/core-components@0.11.2
|
|
699
|
+
- @backstage/core-plugin-api@1.0.7
|
|
700
|
+
- @backstage/theme@0.2.16
|
|
701
|
+
|
|
702
|
+
## 0.1.3-next.2
|
|
703
|
+
|
|
704
|
+
### Patch Changes
|
|
705
|
+
|
|
706
|
+
- Updated dependencies
|
|
707
|
+
- @backstage/core-components@0.11.2-next.2
|
|
708
|
+
- @backstage/core-plugin-api@1.0.7-next.2
|
|
709
|
+
- @backstage/theme@0.2.16
|
|
710
|
+
|
|
711
|
+
## 0.1.3-next.1
|
|
712
|
+
|
|
713
|
+
### Patch Changes
|
|
714
|
+
|
|
715
|
+
- Updated dependencies
|
|
716
|
+
- @backstage/core-components@0.11.2-next.1
|
|
717
|
+
- @backstage/core-plugin-api@1.0.7-next.1
|
|
718
|
+
- @backstage/theme@0.2.16
|
|
719
|
+
|
|
720
|
+
## 0.1.3-next.0
|
|
721
|
+
|
|
722
|
+
### Patch Changes
|
|
723
|
+
|
|
724
|
+
- Updated dependencies
|
|
725
|
+
- @backstage/core-components@0.11.2-next.0
|
|
726
|
+
- @backstage/core-plugin-api@1.0.7-next.0
|
|
727
|
+
- @backstage/theme@0.2.16
|
|
728
|
+
|
|
729
|
+
## 0.1.2
|
|
730
|
+
|
|
731
|
+
### Patch Changes
|
|
732
|
+
|
|
733
|
+
- 7d47def9c4: Removed dependency on `@types/jest`.
|
|
734
|
+
- 667d917488: Updated dependency `msw` to `^0.47.0`.
|
|
735
|
+
- 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`.
|
|
736
|
+
- bf5e9030eb: Updated dependency `msw` to `^0.45.0`.
|
|
737
|
+
- ef9ab322de: Minor API signatures cleanup
|
|
738
|
+
- Updated dependencies
|
|
739
|
+
- @backstage/core-components@0.11.1
|
|
740
|
+
- @backstage/core-plugin-api@1.0.6
|
|
741
|
+
|
|
742
|
+
## 0.1.2-next.2
|
|
743
|
+
|
|
744
|
+
### Patch Changes
|
|
745
|
+
|
|
746
|
+
- 7d47def9c4: Removed dependency on `@types/jest`.
|
|
747
|
+
- Updated dependencies
|
|
748
|
+
- @backstage/core-components@0.11.1-next.3
|
|
749
|
+
- @backstage/core-plugin-api@1.0.6-next.3
|
|
750
|
+
|
|
751
|
+
## 0.1.2-next.1
|
|
752
|
+
|
|
753
|
+
### Patch Changes
|
|
754
|
+
|
|
755
|
+
- 667d917488: Updated dependency `msw` to `^0.47.0`.
|
|
756
|
+
- 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`.
|
|
757
|
+
- Updated dependencies
|
|
758
|
+
- @backstage/core-components@0.11.1-next.2
|
|
759
|
+
- @backstage/core-plugin-api@1.0.6-next.2
|
|
760
|
+
|
|
761
|
+
## 0.1.2-next.0
|
|
762
|
+
|
|
763
|
+
### Patch Changes
|
|
764
|
+
|
|
765
|
+
- bf5e9030eb: Updated dependency `msw` to `^0.45.0`.
|
|
766
|
+
- ef9ab322de: Minor API signatures cleanup
|
|
767
|
+
- Updated dependencies
|
|
768
|
+
- @backstage/core-plugin-api@1.0.6-next.0
|
|
769
|
+
- @backstage/core-components@0.11.1-next.0
|
|
770
|
+
|
|
771
|
+
## 0.1.1
|
|
772
|
+
|
|
773
|
+
### Patch Changes
|
|
774
|
+
|
|
775
|
+
- Updated dependencies
|
|
776
|
+
- @backstage/core-components@0.11.0
|
|
777
|
+
- @backstage/core-plugin-api@1.0.5
|
|
778
|
+
|
|
779
|
+
## 0.1.1-next.1
|
|
780
|
+
|
|
781
|
+
### Patch Changes
|
|
782
|
+
|
|
783
|
+
- Updated dependencies
|
|
784
|
+
- @backstage/core-components@0.11.0-next.2
|
|
785
|
+
|
|
786
|
+
## 0.1.1-next.0
|
|
787
|
+
|
|
788
|
+
### Patch Changes
|
|
789
|
+
|
|
790
|
+
- Updated dependencies
|
|
791
|
+
- @backstage/core-plugin-api@1.0.5-next.0
|
|
792
|
+
- @backstage/core-components@0.10.1-next.0
|
|
793
|
+
|
|
794
|
+
## 0.1.0
|
|
795
|
+
|
|
796
|
+
### Minor Changes
|
|
797
|
+
|
|
798
|
+
- d8fec19542: Apollo Explorer plugin now available! Installation instructions can be found in the plugin README
|
|
799
|
+
|
|
800
|
+
### Patch Changes
|
|
801
|
+
|
|
802
|
+
- Updated dependencies
|
|
803
|
+
- @backstage/core-components@0.10.0
|
|
804
|
+
- @backstage/core-plugin-api@1.0.4
|
|
805
|
+
- @backstage/theme@0.2.16
|
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# apollo-explorer
|
|
2
|
+
|
|
3
|
+
Welcome to the Apollo Explorer plugin!
|
|
4
|
+
|
|
5
|
+
This plugin allows users to directly embed an [Apollo](https://www.apollographql.com) graph explorer directly into
|
|
6
|
+
Backstage!
|
|
7
|
+
|
|
8
|
+
## Getting started
|
|
9
|
+
|
|
10
|
+
### Getting an Apollo Graph Reference
|
|
11
|
+
|
|
12
|
+
First things first, you will need an Apollo account, and a graph imported into your account. This is beyond the scope of
|
|
13
|
+
this plugin, so if you are totally new to Apollo, please reference their official
|
|
14
|
+
documentation [here](https://www.apollographql.com/docs).
|
|
15
|
+
|
|
16
|
+
Once you have a graph set up in Apollo, we need to grab the graph reference. First, go to your Apollo graphs home page and choose the graph you wish to embed.
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
Once you are in your graph explorer, click the dropdown next to the share icon and select `Share as Embedded`
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
This modal contains a number of useful properties, all of which can be passed to the plugin via the component properties, but the only mandatory input we need from here is the `graphRef`.
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
Hold on to this snippet for a second while we set up the plugin ✨
|
|
29
|
+
|
|
30
|
+
### Installing the Backstage Plugin
|
|
31
|
+
|
|
32
|
+
First, add the plugin to your Backstage app
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
yarn --cwd packages/app add @backstage-community/plugin-apollo-explorer
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then, in `packages/app/src/App.tsx` add the plugin as a `Route`
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { ApolloExplorerPage } from '@backstage-community/plugin-apollo-explorer';
|
|
42
|
+
|
|
43
|
+
const routes = (
|
|
44
|
+
<FlatRoutes>
|
|
45
|
+
{/* other routes... */}
|
|
46
|
+
<Route
|
|
47
|
+
path="/apollo-explorer"
|
|
48
|
+
element={
|
|
49
|
+
<ApolloExplorerPage
|
|
50
|
+
endpoints={[
|
|
51
|
+
{ title: 'Github', graphRef: 'my-github-graph-ref@current' },
|
|
52
|
+
{ title: 'Linear', graphRef: 'my-linear-graph-ref@current' },
|
|
53
|
+
]}
|
|
54
|
+
/>
|
|
55
|
+
}
|
|
56
|
+
/>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Then, in `packages/app/src/components/Root/Root.tsx` add a sidebar item so users can find your beautiful plugin!
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
<SidebarItem icon={GraphiQLIcon} to="apollo-explorer" text="Apollo Explorer" />
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
That's it! You should now see an `Apollo Explorer` item in your sidebar, and if you click it, you should see your graph(s) load and direct you to authenticate via Apollo!
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
Once you authenticate, your graph is ready to use 🚀
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
### Authentication Tokens for Apollo Studio
|
|
74
|
+
|
|
75
|
+
If you need to utilize an ApiRef to supply a token to Apollo, you may do so using an ApiHolder.
|
|
76
|
+
|
|
77
|
+
In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example and **does not exist**.
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { ApolloExplorerPage, EndpointProps } from '@backstage-community/plugin-apollo-explorer';
|
|
81
|
+
import { ssoAuthApiRef } from '@companyxyz/devkit';
|
|
82
|
+
import { ApiHolder } from '@backstage/core-plugin-api';
|
|
83
|
+
|
|
84
|
+
async function authCallback(options: { apiHolder: ApiHolder }): Promise<{token: string}> {
|
|
85
|
+
const sso = options.apiHolder.get<any>(ssoAuthApiRef)
|
|
86
|
+
return await sso.getToken()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const routes = (
|
|
90
|
+
<FlatRoutes>
|
|
91
|
+
{/* other routes... */}
|
|
92
|
+
<Route
|
|
93
|
+
path="/apollo-explorer"
|
|
94
|
+
element={
|
|
95
|
+
<ApolloExplorerPage
|
|
96
|
+
endpoints={[{
|
|
97
|
+
title: 'Github',
|
|
98
|
+
graphRef: 'my-github-graph-ref@current',
|
|
99
|
+
authCallback: authCallback
|
|
100
|
+
}]}
|
|
101
|
+
/>
|
|
102
|
+
}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Content, Page, Header } from '@backstage/core-components';
|
|
3
|
+
import Divider from '@material-ui/core/Divider';
|
|
4
|
+
import Tab from '@material-ui/core/Tab';
|
|
5
|
+
import Tabs from '@material-ui/core/Tabs';
|
|
6
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
7
|
+
import { ApolloExplorer } from '@apollo/explorer/react';
|
|
8
|
+
import { useApiHolder } from '@backstage/core-plugin-api';
|
|
9
|
+
|
|
10
|
+
const useStyles = makeStyles((theme) => ({
|
|
11
|
+
tabs: {
|
|
12
|
+
background: theme.palette.background.paper
|
|
13
|
+
},
|
|
14
|
+
root: {
|
|
15
|
+
height: "100%"
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
height: "100%"
|
|
19
|
+
},
|
|
20
|
+
explorer: {
|
|
21
|
+
height: "95%"
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
const handleAuthRequest = ({
|
|
25
|
+
authCallback
|
|
26
|
+
}) => {
|
|
27
|
+
const handleRequest = async (endpointUrl, options) => fetch(endpointUrl, {
|
|
28
|
+
...options,
|
|
29
|
+
headers: {
|
|
30
|
+
...options.headers,
|
|
31
|
+
...authCallback && {
|
|
32
|
+
Authorization: `Bearer ${(await authCallback()).token}`
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return handleRequest;
|
|
37
|
+
};
|
|
38
|
+
const ApolloExplorerBrowser = ({ endpoints }) => {
|
|
39
|
+
const classes = useStyles();
|
|
40
|
+
const [tabIndex, setTabIndex] = useState(0);
|
|
41
|
+
const apiHolder = useApiHolder();
|
|
42
|
+
const getAuthCallback = (index) => {
|
|
43
|
+
const authCallback = endpoints[index].authCallback;
|
|
44
|
+
if (authCallback === void 0)
|
|
45
|
+
return void 0;
|
|
46
|
+
return () => authCallback({ apiHolder });
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement(
|
|
49
|
+
Tabs,
|
|
50
|
+
{
|
|
51
|
+
classes: { root: classes.tabs },
|
|
52
|
+
value: tabIndex,
|
|
53
|
+
onChange: (_, value) => setTabIndex(value),
|
|
54
|
+
indicatorColor: "primary"
|
|
55
|
+
},
|
|
56
|
+
endpoints.map(({ title }, index) => /* @__PURE__ */ React.createElement(Tab, { key: index, label: title, value: index }))
|
|
57
|
+
), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(Content, { className: classes.content }, /* @__PURE__ */ React.createElement(
|
|
58
|
+
ApolloExplorer,
|
|
59
|
+
{
|
|
60
|
+
className: classes.explorer,
|
|
61
|
+
graphRef: endpoints[tabIndex].graphRef,
|
|
62
|
+
handleRequest: handleAuthRequest({
|
|
63
|
+
authCallback: getAuthCallback(tabIndex)
|
|
64
|
+
}),
|
|
65
|
+
persistExplorerState: endpoints[tabIndex].persistExplorerState,
|
|
66
|
+
initialState: endpoints[tabIndex].initialState
|
|
67
|
+
}
|
|
68
|
+
)));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const ApolloExplorerPage = (props) => {
|
|
72
|
+
const { title, subtitle, endpoints } = props;
|
|
73
|
+
return /* @__PURE__ */ React.createElement(Page, { themeId: "tool" }, /* @__PURE__ */ React.createElement(Header, { title: title != null ? title : "Apollo Explorer \u{1F469}\u200D\u{1F680}", subtitle: subtitle != null ? subtitle : "" }), /* @__PURE__ */ React.createElement(Content, { noPadding: true }, /* @__PURE__ */ React.createElement(ApolloExplorerBrowser, { endpoints })));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { ApolloExplorerPage };
|
|
77
|
+
//# sourceMappingURL=index-BgwBzs82.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BgwBzs82.esm.js","sources":["../../src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx","../../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState } from 'react';\nimport Divider from '@material-ui/core/Divider';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ApolloExplorer } from '@apollo/explorer/react';\nimport { Content } from '@backstage/core-components';\nimport { HandleRequest } from '@apollo/explorer/src/helpers/postMessageRelayHelpers';\nimport { EndpointProps } from '../ApolloExplorerPage';\nimport { useApiHolder } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles(theme => ({\n tabs: {\n background: theme.palette.background.paper,\n },\n root: {\n height: '100%',\n },\n content: {\n height: '100%',\n },\n explorer: {\n height: '95%',\n },\n}));\n\ntype Props = {\n endpoints: EndpointProps[];\n authCallback?: () => Promise<{ token: string }>;\n};\n\nexport const handleAuthRequest = ({\n authCallback,\n}: {\n authCallback: Props['authCallback'];\n}): HandleRequest => {\n const handleRequest: HandleRequest = async (endpointUrl, options) =>\n fetch(endpointUrl, {\n ...options,\n headers: {\n ...options.headers,\n ...(authCallback && {\n Authorization: `Bearer ${(await authCallback()).token}`,\n }),\n },\n });\n return handleRequest;\n};\n\nexport const ApolloExplorerBrowser = ({ endpoints }: Props) => {\n const classes = useStyles();\n const [tabIndex, setTabIndex] = useState(0);\n\n const apiHolder = useApiHolder();\n\n const getAuthCallback = (index: number) => {\n const authCallback = endpoints[index].authCallback;\n if (authCallback === undefined) return undefined;\n return () => authCallback({ apiHolder });\n };\n\n return (\n <div className={classes.root}>\n <Tabs\n classes={{ root: classes.tabs }}\n value={tabIndex}\n onChange={(_, value) => setTabIndex(value)}\n indicatorColor=\"primary\"\n >\n {endpoints.map(({ title }, index) => (\n <Tab key={index} label={title} value={index} />\n ))}\n </Tabs>\n <Divider />\n <Content className={classes.content}>\n <ApolloExplorer\n className={classes.explorer}\n graphRef={endpoints[tabIndex].graphRef}\n handleRequest={handleAuthRequest({\n authCallback: getAuthCallback(tabIndex),\n })}\n persistExplorerState={endpoints[tabIndex].persistExplorerState}\n initialState={endpoints[tabIndex].initialState}\n />\n </Content>\n </div>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Content, Header, Page } from '@backstage/core-components';\nimport { ApolloExplorerBrowser } from '../ApolloExplorerBrowser';\nimport { JSONObject } from '@apollo/explorer/src/helpers/types';\nimport { ApiHolder } from '@backstage/core-plugin-api';\n\n/**\n * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.\n *\n * @public\n */\nexport type EndpointProps = {\n title: string;\n graphRef: string;\n authCallback?: AuthCallback;\n persistExplorerState?: boolean;\n initialState?: {\n document?: string;\n variables?: JSONObject;\n headers?: Record<string, string>;\n displayOptions: {\n docsPanelState?: 'open' | 'closed';\n showHeadersAndEnvVars?: boolean;\n theme?: 'dark' | 'light';\n };\n };\n};\n\n/**\n * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.\n *\n * @public\n */\nexport type AuthCallback = (options: {\n apiHolder: ApiHolder;\n}) => Promise<{ token: string }>;\n\ntype Props = {\n title?: string | undefined;\n subtitle?: string | undefined;\n endpoints: EndpointProps[];\n};\n\nexport const ApolloExplorerPage = (props: Props) => {\n const { title, subtitle, endpoints } = props;\n\n return (\n <Page themeId=\"tool\">\n <Header title={title ?? 'Apollo Explorer 👩🚀'} subtitle={subtitle ?? ''} />\n <Content noPadding>\n <ApolloExplorerBrowser endpoints={endpoints} />\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { JSONObject } from '@apollo/explorer/src/helpers/types';
|
|
4
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
5
|
+
import { ApiHolder } from '@backstage/core-plugin-api';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
type EndpointProps = {
|
|
13
|
+
title: string;
|
|
14
|
+
graphRef: string;
|
|
15
|
+
authCallback?: AuthCallback;
|
|
16
|
+
persistExplorerState?: boolean;
|
|
17
|
+
initialState?: {
|
|
18
|
+
document?: string;
|
|
19
|
+
variables?: JSONObject;
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
displayOptions: {
|
|
22
|
+
docsPanelState?: 'open' | 'closed';
|
|
23
|
+
showHeadersAndEnvVars?: boolean;
|
|
24
|
+
theme?: 'dark' | 'light';
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
type AuthCallback = (options: {
|
|
34
|
+
apiHolder: ApiHolder;
|
|
35
|
+
}) => Promise<{
|
|
36
|
+
token: string;
|
|
37
|
+
}>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Plugin that allows Apollo Explorer instances to be directly embedded into Backstage
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
declare const apolloExplorerPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
44
|
+
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
45
|
+
}, {}, {}>;
|
|
46
|
+
/**
|
|
47
|
+
* Main component that wraps the embedded graph(s)
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
declare const ApolloExplorerPage: (props: {
|
|
51
|
+
title?: string | undefined;
|
|
52
|
+
subtitle?: string | undefined;
|
|
53
|
+
endpoints: EndpointProps[];
|
|
54
|
+
}) => React.JSX.Element;
|
|
55
|
+
|
|
56
|
+
export { ApolloExplorerPage, type AuthCallback, type EndpointProps, apolloExplorerPlugin };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRouteRef, createPlugin, createRoutableExtension } from '@backstage/core-plugin-api';
|
|
2
|
+
|
|
3
|
+
const rootRouteRef = createRouteRef({
|
|
4
|
+
id: "apollo-explorer"
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const apolloExplorerPlugin = createPlugin({
|
|
8
|
+
id: "apollo-explorer",
|
|
9
|
+
routes: {
|
|
10
|
+
root: rootRouteRef
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const ApolloExplorerPage = apolloExplorerPlugin.provide(
|
|
14
|
+
createRoutableExtension({
|
|
15
|
+
name: "ApolloExplorerPage",
|
|
16
|
+
component: () => import('./esm/index-BgwBzs82.esm.js').then((m) => m.ApolloExplorerPage),
|
|
17
|
+
mountPoint: rootRouteRef
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export { ApolloExplorerPage, apolloExplorerPlugin };
|
|
22
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'apollo-explorer',\n});\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\n\n/**\n * Plugin that allows Apollo Explorer instances to be directly embedded into Backstage\n * @public\n */\nexport const apolloExplorerPlugin = createPlugin({\n id: 'apollo-explorer',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Main component that wraps the embedded graph(s)\n * @public\n */\nexport const ApolloExplorerPage = apolloExplorerPlugin.provide(\n createRoutableExtension({\n name: 'ApolloExplorerPage',\n component: () =>\n import('./components/ApolloExplorerPage').then(m => m.ApolloExplorerPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,iBAAA;AACN,CAAC,CAAA;;ACOM,MAAM,uBAAuB,YAAa,CAAA;AAAA,EAC/C,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,GACR;AACF,CAAC,EAAA;AAMM,MAAM,qBAAqB,oBAAqB,CAAA,OAAA;AAAA,EACrD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6BAAiC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,kBAAkB,CAAA;AAAA,IAC1E,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@backstage-community/plugin-apollo-explorer",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"backstage": {
|
|
5
|
+
"role": "frontend-plugin"
|
|
6
|
+
},
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public",
|
|
9
|
+
"main": "dist/index.esm.js",
|
|
10
|
+
"types": "dist/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://backstage.io",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/backstage/community-plugins",
|
|
16
|
+
"directory": "workspaces/apollo-explorer/plugins/apollo-explorer"
|
|
17
|
+
},
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"main": "dist/index.esm.js",
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "backstage-cli package build",
|
|
27
|
+
"clean": "backstage-cli package clean",
|
|
28
|
+
"lint": "backstage-cli package lint",
|
|
29
|
+
"prepack": "backstage-cli package prepack",
|
|
30
|
+
"postpack": "backstage-cli package postpack",
|
|
31
|
+
"start": "backstage-cli package start",
|
|
32
|
+
"test": "backstage-cli package test"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@apollo/explorer": "^3.0.0",
|
|
36
|
+
"@backstage/core-components": "^0.14.4",
|
|
37
|
+
"@backstage/core-plugin-api": "^1.9.2",
|
|
38
|
+
"@material-ui/core": "^4.12.2",
|
|
39
|
+
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
40
|
+
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
41
|
+
"react-use": "^17.5.0",
|
|
42
|
+
"use-deep-compare-effect": "^1.8.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@backstage/cli": "^0.26.3",
|
|
46
|
+
"@backstage/dev-utils": "^1.0.31",
|
|
47
|
+
"@testing-library/dom": "^10.0.0",
|
|
48
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
49
|
+
"@testing-library/react": "^15.0.0",
|
|
50
|
+
"@types/react-dom": "^18.2.19",
|
|
51
|
+
"canvas": "^2.11.2",
|
|
52
|
+
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
53
|
+
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
54
|
+
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
58
|
+
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
59
|
+
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
60
|
+
},
|
|
61
|
+
"module": "./dist/index.esm.js"
|
|
62
|
+
}
|