@backstage-community/plugin-graphql-voyager 0.1.17

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 ADDED
@@ -0,0 +1,568 @@
1
+ # @backstage-community/plugin-graphql-voyager
2
+
3
+ ## 0.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 193a2a3: Migrated from the [backstage/backstage](https://github.com/backstage/backstage) monorepo.
8
+
9
+ ## 0.1.16
10
+
11
+ ### Patch Changes
12
+
13
+ - abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`.
14
+ - cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`.
15
+ - Updated dependencies
16
+ - @backstage/core-components@0.14.4
17
+ - @backstage/core-plugin-api@1.9.2
18
+
19
+ ## 0.1.16-next.0
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+ - @backstage/core-components@0.14.4-next.0
25
+ - @backstage/core-plugin-api@1.9.1
26
+
27
+ ## 0.1.15
28
+
29
+ ### Patch Changes
30
+
31
+ - 813f99d: Added ESLint rule `no-top-level-material-ui-4-imports` in the `graphql-voyager` plugin to migrate the Material UI imports.
32
+ - e8f026a: Use ESM exports of react-use library
33
+ - Updated dependencies
34
+ - @backstage/core-components@0.14.3
35
+ - @backstage/core-plugin-api@1.9.1
36
+
37
+ ## 0.1.14
38
+
39
+ ### Patch Changes
40
+
41
+ - 813f99d: Added ESLint rule `no-top-level-material-ui-4-imports` in the `graphql-voyager` plugin to migrate the Material UI imports.
42
+ - e8f026a: Use ESM exports of react-use library
43
+ - Updated dependencies
44
+ - @backstage/core-components@0.14.2
45
+ - @backstage/core-plugin-api@1.9.1
46
+
47
+ ## 0.1.13
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies
52
+ - @backstage/core-components@0.14.1
53
+ - @backstage/core-plugin-api@1.9.1
54
+
55
+ ## 0.1.13-next.2
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies
60
+ - @backstage/core-components@0.14.1-next.2
61
+ - @backstage/core-plugin-api@1.9.1-next.1
62
+
63
+ ## 0.1.13-next.1
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies
68
+ - @backstage/core-components@0.14.1-next.1
69
+ - @backstage/core-plugin-api@1.9.1-next.1
70
+
71
+ ## 0.1.13-next.0
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies
76
+ - @backstage/core-components@0.14.1-next.0
77
+ - @backstage/core-plugin-api@1.9.1-next.0
78
+
79
+ ## 0.1.12
80
+
81
+ ### Patch Changes
82
+
83
+ - 9aac2b0: Use `--cwd` as the first `yarn` argument
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.12-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.12-next.1
98
+
99
+ ### Patch Changes
100
+
101
+ - 9aac2b0: Use `--cwd` as the first `yarn` argument
102
+ - 8fe56a8: Widen `@types/react` dependency range to include version 18.
103
+ - Updated dependencies
104
+ - @backstage/core-components@0.14.0-next.1
105
+ - @backstage/core-plugin-api@1.9.0-next.1
106
+
107
+ ## 0.1.12-next.0
108
+
109
+ ### Patch Changes
110
+
111
+ - Updated dependencies
112
+ - @backstage/core-components@0.14.0-next.0
113
+ - @backstage/core-plugin-api@1.8.3-next.0
114
+
115
+ ## 0.1.11
116
+
117
+ ### Patch Changes
118
+
119
+ - 4016f21: Remove some unused dependencies
120
+ - Updated dependencies
121
+ - @backstage/core-components@0.13.10
122
+ - @backstage/core-plugin-api@1.8.2
123
+
124
+ ## 0.1.11-next.1
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies
129
+ - @backstage/core-plugin-api@1.8.2-next.0
130
+ - @backstage/core-components@0.13.10-next.1
131
+
132
+ ## 0.1.11-next.0
133
+
134
+ ### Patch Changes
135
+
136
+ - 4016f21: Remove some unused dependencies
137
+ - Updated dependencies
138
+ - @backstage/core-components@0.13.10-next.0
139
+ - @backstage/core-plugin-api@1.8.1
140
+
141
+ ## 0.1.10
142
+
143
+ ### Patch Changes
144
+
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.10-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.10-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.10-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.10-next.0
178
+
179
+ ### Patch Changes
180
+
181
+ - Updated dependencies
182
+ - @backstage/core-plugin-api@1.8.1-next.0
183
+ - @backstage/core-components@0.13.9-next.0
184
+ - @backstage/theme@0.5.0-next.0
185
+
186
+ ## 0.1.9
187
+
188
+ ### Patch Changes
189
+
190
+ - 6c2b872153: Add official support for React 18.
191
+ - Updated dependencies
192
+ - @backstage/core-components@0.13.8
193
+ - @backstage/core-plugin-api@1.8.0
194
+ - @backstage/theme@0.4.4
195
+
196
+ ## 0.1.9-next.2
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies
201
+ - @backstage/core-components@0.13.8-next.2
202
+
203
+ ## 0.1.9-next.1
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies
208
+ - @backstage/core-components@0.13.8-next.1
209
+ - @backstage/core-plugin-api@1.8.0-next.0
210
+ - @backstage/theme@0.4.4-next.0
211
+
212
+ ## 0.1.9-next.0
213
+
214
+ ### Patch Changes
215
+
216
+ - 6c2b872153: Add official support for React 18.
217
+ - Updated dependencies
218
+ - @backstage/core-components@0.13.7-next.0
219
+ - @backstage/core-plugin-api@1.8.0-next.0
220
+ - @backstage/theme@0.4.4-next.0
221
+
222
+ ## 0.1.8
223
+
224
+ ### Patch Changes
225
+
226
+ - 9a1fce352e: Updated dependency `@testing-library/jest-dom` to `^6.0.0`.
227
+ - f95af4e540: Updated dependency `@testing-library/dom` to `^9.0.0`.
228
+ - Updated dependencies
229
+ - @backstage/core-plugin-api@1.7.0
230
+ - @backstage/core-components@0.13.6
231
+ - @backstage/theme@0.4.3
232
+
233
+ ## 0.1.8-next.2
234
+
235
+ ### Patch Changes
236
+
237
+ - Updated dependencies
238
+ - @backstage/core-components@0.13.6-next.2
239
+ - @backstage/core-plugin-api@1.7.0-next.1
240
+ - @backstage/theme@0.4.3-next.0
241
+
242
+ ## 0.1.8-next.1
243
+
244
+ ### Patch Changes
245
+
246
+ - Updated dependencies
247
+ - @backstage/core-components@0.13.6-next.1
248
+ - @backstage/core-plugin-api@1.7.0-next.0
249
+ - @backstage/theme@0.4.2
250
+
251
+ ## 0.1.8-next.0
252
+
253
+ ### Patch Changes
254
+
255
+ - Updated dependencies
256
+ - @backstage/core-plugin-api@1.7.0-next.0
257
+ - @backstage/core-components@0.13.6-next.0
258
+ - @backstage/theme@0.4.2
259
+
260
+ ## 0.1.7
261
+
262
+ ### Patch Changes
263
+
264
+ - 482bb5c0bbf8: Moved `@types/react` to be a regular dependency
265
+ - 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
266
+ - 8cec7664e146: Removed `@types/node` dependency
267
+ - Updated dependencies
268
+ - @backstage/core-components@0.13.5
269
+ - @backstage/core-plugin-api@1.6.0
270
+ - @backstage/theme@0.4.2
271
+
272
+ ## 0.1.7-next.3
273
+
274
+ ### Patch Changes
275
+
276
+ - 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
277
+ - Updated dependencies
278
+ - @backstage/core-components@0.13.5-next.3
279
+ - @backstage/core-plugin-api@1.6.0-next.3
280
+ - @backstage/theme@0.4.2-next.0
281
+
282
+ ## 0.1.7-next.2
283
+
284
+ ### Patch Changes
285
+
286
+ - 8cec7664e146: Removed `@types/node` dependency
287
+ - Updated dependencies
288
+ - @backstage/core-components@0.13.5-next.2
289
+ - @backstage/core-plugin-api@1.6.0-next.2
290
+ - @backstage/theme@0.4.1
291
+
292
+ ## 0.1.7-next.1
293
+
294
+ ### Patch Changes
295
+
296
+ - Updated dependencies
297
+ - @backstage/core-components@0.13.5-next.1
298
+ - @backstage/core-plugin-api@1.6.0-next.1
299
+ - @backstage/theme@0.4.1
300
+
301
+ ## 0.1.7-next.0
302
+
303
+ ### Patch Changes
304
+
305
+ - 482bb5c0bbf8: Moved `@types/react` to be a regular dependency
306
+ - Updated dependencies
307
+ - @backstage/core-plugin-api@1.6.0-next.0
308
+ - @backstage/core-components@0.13.5-next.0
309
+ - @backstage/theme@0.4.1
310
+
311
+ ## 0.1.6
312
+
313
+ ### Patch Changes
314
+
315
+ - bb1e1c2b26cc: Fix typo in install instructions.
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.6-next.2
323
+
324
+ ### Patch Changes
325
+
326
+ - bb1e1c2b26cc: Fix typo in install instructions.
327
+
328
+ ## 0.1.6-next.1
329
+
330
+ ### Patch Changes
331
+
332
+ - 12a8c94eda8d: Add package repository and homepage metadata
333
+ - Updated dependencies
334
+ - @backstage/core-components@0.13.4-next.0
335
+ - @backstage/core-plugin-api@1.5.3
336
+ - @backstage/theme@0.4.1
337
+
338
+ ## 0.1.6-next.0
339
+
340
+ ### Patch Changes
341
+
342
+ - Updated dependencies
343
+ - @backstage/core-components@0.13.4-next.0
344
+ - @backstage/core-plugin-api@1.5.3
345
+ - @backstage/theme@0.4.1
346
+
347
+ ## 0.1.5
348
+
349
+ ### Patch Changes
350
+
351
+ - Updated dependencies
352
+ - @backstage/theme@0.4.1
353
+ - @backstage/core-components@0.13.3
354
+ - @backstage/core-plugin-api@1.5.3
355
+
356
+ ## 0.1.5-next.2
357
+
358
+ ### Patch Changes
359
+
360
+ - Updated dependencies
361
+ - @backstage/theme@0.4.1-next.1
362
+ - @backstage/core-plugin-api@1.5.3-next.1
363
+ - @backstage/core-components@0.13.3-next.2
364
+
365
+ ## 0.1.5-next.1
366
+
367
+ ### Patch Changes
368
+
369
+ - Updated dependencies
370
+ - @backstage/theme@0.4.1-next.0
371
+ - @backstage/core-components@0.13.3-next.1
372
+ - @backstage/core-plugin-api@1.5.3-next.0
373
+
374
+ ## 0.1.5-next.0
375
+
376
+ ### Patch Changes
377
+
378
+ - Updated dependencies
379
+ - @backstage/core-components@0.13.3-next.0
380
+ - @backstage/core-plugin-api@1.5.2
381
+ - @backstage/theme@0.4.0
382
+
383
+ ## 0.1.4
384
+
385
+ ### Patch Changes
386
+
387
+ - Updated dependencies
388
+ - @backstage/core-plugin-api@1.5.2
389
+ - @backstage/core-components@0.13.2
390
+ - @backstage/theme@0.4.0
391
+
392
+ ## 0.1.4-next.3
393
+
394
+ ### Patch Changes
395
+
396
+ - Updated dependencies
397
+ - @backstage/core-components@0.13.2-next.3
398
+ - @backstage/core-plugin-api@1.5.2-next.0
399
+ - @backstage/theme@0.4.0-next.1
400
+
401
+ ## 0.1.4-next.2
402
+
403
+ ### Patch Changes
404
+
405
+ - Updated dependencies
406
+ - @backstage/theme@0.4.0-next.1
407
+ - @backstage/core-components@0.13.2-next.2
408
+ - @backstage/core-plugin-api@1.5.2-next.0
409
+
410
+ ## 0.1.4-next.1
411
+
412
+ ### Patch Changes
413
+
414
+ - Updated dependencies
415
+ - @backstage/core-components@0.13.2-next.1
416
+ - @backstage/core-plugin-api@1.5.2-next.0
417
+ - @backstage/theme@0.4.0-next.0
418
+
419
+ ## 0.1.4-next.0
420
+
421
+ ### Patch Changes
422
+
423
+ - Updated dependencies
424
+ - @backstage/theme@0.4.0-next.0
425
+ - @backstage/core-components@0.13.2-next.0
426
+ - @backstage/core-plugin-api@1.5.1
427
+
428
+ ## 0.1.3
429
+
430
+ ### Patch Changes
431
+
432
+ - Updated dependencies
433
+ - @backstage/theme@0.3.0
434
+ - @backstage/core-components@0.13.1
435
+ - @backstage/core-plugin-api@1.5.1
436
+
437
+ ## 0.1.3-next.1
438
+
439
+ ### Patch Changes
440
+
441
+ - Updated dependencies
442
+ - @backstage/theme@0.3.0-next.0
443
+ - @backstage/core-components@0.13.1-next.1
444
+ - @backstage/core-plugin-api@1.5.1
445
+
446
+ ## 0.1.3-next.0
447
+
448
+ ### Patch Changes
449
+
450
+ - Updated dependencies
451
+ - @backstage/core-components@0.13.1-next.0
452
+ - @backstage/core-plugin-api@1.5.1
453
+
454
+ ## 0.1.2
455
+
456
+ ### Patch Changes
457
+
458
+ - 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs)
459
+ - e0c6e8b9c3c: Update peer dependencies
460
+ - Updated dependencies
461
+ - @backstage/core-components@0.13.0
462
+ - @backstage/theme@0.2.19
463
+ - @backstage/core-plugin-api@1.5.1
464
+
465
+ ## 0.1.2-next.3
466
+
467
+ ### Patch Changes
468
+
469
+ - Updated dependencies
470
+ - @backstage/core-components@0.13.0-next.3
471
+ - @backstage/core-plugin-api@1.5.1-next.1
472
+ - @backstage/theme@0.2.19-next.0
473
+
474
+ ## 0.1.2-next.2
475
+
476
+ ### Patch Changes
477
+
478
+ - Updated dependencies
479
+ - @backstage/core-components@0.12.6-next.2
480
+ - @backstage/core-plugin-api@1.5.1-next.1
481
+ - @backstage/theme@0.2.19-next.0
482
+
483
+ ## 0.1.2-next.1
484
+
485
+ ### Patch Changes
486
+
487
+ - e0c6e8b9c3c: Update peer dependencies
488
+ - Updated dependencies
489
+ - @backstage/core-components@0.12.6-next.1
490
+ - @backstage/core-plugin-api@1.5.1-next.0
491
+ - @backstage/theme@0.2.19-next.0
492
+
493
+ ## 0.1.2-next.0
494
+
495
+ ### Patch Changes
496
+
497
+ - 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs)
498
+ - Updated dependencies
499
+ - @backstage/core-components@0.12.6-next.0
500
+ - @backstage/core-plugin-api@1.5.0
501
+ - @backstage/theme@0.2.18
502
+
503
+ ## 0.1.1
504
+
505
+ ### Patch Changes
506
+
507
+ - 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
508
+ - Updated dependencies
509
+ - @backstage/core-components@0.12.5
510
+ - @backstage/core-plugin-api@1.5.0
511
+ - @backstage/theme@0.2.18
512
+
513
+ ## 0.1.1-next.2
514
+
515
+ ### Patch Changes
516
+
517
+ - Updated dependencies
518
+ - @backstage/core-components@0.12.5-next.2
519
+ - @backstage/core-plugin-api@1.5.0-next.2
520
+
521
+ ## 0.1.1-next.1
522
+
523
+ ### Patch Changes
524
+
525
+ - 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
526
+ - Updated dependencies
527
+ - @backstage/core-components@0.12.5-next.1
528
+ - @backstage/core-plugin-api@1.4.1-next.1
529
+ - @backstage/theme@0.2.18-next.0
530
+
531
+ ## 0.1.1-next.0
532
+
533
+ ### Patch Changes
534
+
535
+ - Updated dependencies
536
+ - @backstage/core-plugin-api@1.4.1-next.0
537
+ - @backstage/core-components@0.12.5-next.0
538
+ - @backstage/theme@0.2.17
539
+
540
+ ## 0.1.0
541
+
542
+ ### Minor Changes
543
+
544
+ - d1fb4b7bf1: Add the new GraphQL Voyager tool as a plugin for backstage, expose necessary API and components needed for it.
545
+
546
+ For more information on how to use this plugin and configure it, please navigate to the [README](https://github.com/backstage/backstage/tree/master/plugins/graphql-voyager/README.md) of the plugin.
547
+
548
+ ### Patch Changes
549
+
550
+ - Updated dependencies
551
+ - @backstage/core-components@0.12.4
552
+ - @backstage/theme@0.2.17
553
+ - @backstage/core-plugin-api@1.4.0
554
+
555
+ ## 0.1.0-next.0
556
+
557
+ ### Minor Changes
558
+
559
+ - d1fb4b7bf1: Add the new GraphQL Voyager tool as a plugin for backstage, expose necessary API and components needed for it.
560
+
561
+ For more information on how to use this plugin and configure it, please navigate to the [README](https://github.com/backstage/backstage/tree/master/plugins/graphql-voyager/README.md) of the plugin.
562
+
563
+ ### Patch Changes
564
+
565
+ - Updated dependencies
566
+ - @backstage/core-components@0.12.4-next.1
567
+ - @backstage/core-plugin-api@1.3.0
568
+ - @backstage/theme@0.2.16
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # graphql-voyager
2
+
3
+ Welcome to the graphql-voyager plugin!
4
+
5
+ Presents a graph structure of your entire GraphQL API, with tabs for multiple API urls:
6
+ ![](./src/assets/plugin.png)
7
+
8
+ ## Getting started
9
+
10
+ ### Installing
11
+
12
+ To get started, first install the plugin with the following command:
13
+
14
+ ```bash
15
+ # From your Backstage root directory
16
+ yarn --cwd packages/app add @backstage-community/plugin-graphql-voyager
17
+ ```
18
+
19
+ ### Adding the page
20
+
21
+ In order to be able to navigate to the graphQL voyager page, a new route needs to be added to the app. This can be done in the following way:
22
+
23
+ ```tsx
24
+ // packages/app/App.tsx
25
+
26
+ import { GraphQLVoyagerPage } from '@backstage-community/plugin-graphql-voyager';
27
+
28
+ const routes = (
29
+ <FlatRoutes>
30
+ <Route path="/graphql-voyager" element={<GraphQLVoyagerPage title="This is Voyager!"/>}/>
31
+ ```
32
+
33
+ ### Configuration
34
+
35
+ In order for the plugin to function correctly. GraphQL endpoints need to be added / configured through the GraphQLVoyager API. This can be done by implementing the `graphQlVoyagerApiRef` exported by this plugin.
36
+
37
+ Add your own configuration to the `packages/app/src/apis.ts` file the following way:
38
+
39
+ ```ts
40
+ import { identityApiRef } from '@backstage/core-plugin-api';
41
+ import { GraphQLVoyagerEndpoints } from '@backstage-community/plugin-graphql-voyager';
42
+
43
+ export const apis: AnyApiFactory[] = [
44
+ createApiFactory({
45
+ api: graphQlVoyagerApiRef,
46
+ deps: { identityApi: identityApiRef },
47
+ factory: ({ identityApiRef }) => {
48
+ return GraphQLVoyagerEndpoints.from([
49
+ {
50
+ id: `graphql-voyager-endpoint-id`,
51
+ title: 'endpoint-title',
52
+ introspectionErrorMessage:
53
+ 'Unable to perform introspection, make sure you are on the correct environment.',
54
+ introspection: async (query: any) => {
55
+ const token = 'someSecretJWTComingFromIdentityApiRef';
56
+
57
+ const res = await fetch('graphQLEndpoint', {
58
+ method: 'POST',
59
+ body: JSON.stringify({ query }),
60
+ headers: {
61
+ 'Content-Type': 'application/json',
62
+ Authorization: token,
63
+ },
64
+ });
65
+
66
+ return res.json();
67
+ },
68
+ voyagerProps: {
69
+ hideDocs: true,
70
+ },
71
+ },
72
+ ]);
73
+ },
74
+ }),
75
+ ];
76
+ ```
@@ -0,0 +1,210 @@
1
+ import { createRouteRef, createPlugin, createRoutableExtension, createApiRef, useApi } from '@backstage/core-plugin-api';
2
+ import React, { useState, Suspense } from 'react';
3
+ import { Progress, Content, ErrorPanel, Page, Header } from '@backstage/core-components';
4
+ import 'graphql-voyager/dist/voyager.css';
5
+ import useAsync from 'react-use/esm/useAsync';
6
+ import Tab from '@material-ui/core/Tab';
7
+ import Tabs from '@material-ui/core/Tabs';
8
+ import Typography from '@material-ui/core/Typography';
9
+ import { makeStyles } from '@material-ui/core/styles';
10
+ import { Voyager } from 'graphql-voyager';
11
+
12
+ const rootRouteRef = createRouteRef({
13
+ id: "graphql-voyager"
14
+ });
15
+
16
+ const graphqlVoyagerPlugin = createPlugin({
17
+ id: "graphql-voyager",
18
+ routes: {
19
+ root: rootRouteRef
20
+ }
21
+ });
22
+ const GraphqlVoyagerPage = graphqlVoyagerPlugin.provide(
23
+ createRoutableExtension({
24
+ name: "GraphqlVoyagerPage",
25
+ component: () => import('./index-DfFlOE_s.esm.js').then((m) => m.GraphQLVoyagerPage),
26
+ mountPoint: rootRouteRef
27
+ })
28
+ );
29
+
30
+ class GraphQLVoyagerEndpoints {
31
+ constructor(endpoints) {
32
+ this.endpoints = endpoints;
33
+ }
34
+ static from(endpoints) {
35
+ return new GraphQLVoyagerEndpoints(endpoints);
36
+ }
37
+ async getEndpoints() {
38
+ return this.endpoints;
39
+ }
40
+ }
41
+
42
+ const graphQlVoyagerApiRef = createApiRef({
43
+ id: "plugin.graphqlvoyager.api"
44
+ });
45
+ const introspectionQuery = `query IntrospectionQuery {
46
+ __schema {
47
+
48
+ queryType { name }
49
+ mutationType { name }
50
+ subscriptionType { name }
51
+ types {
52
+ ...FullType
53
+ }
54
+ directives {
55
+ name
56
+ description
57
+
58
+ locations
59
+ args {
60
+ ...InputValue
61
+ }
62
+ }
63
+ }
64
+ }
65
+
66
+ fragment FullType on __Type {
67
+ kind
68
+ name
69
+ description
70
+
71
+ fields(includeDeprecated: true) {
72
+ name
73
+ description
74
+ args {
75
+ ...InputValue
76
+ }
77
+ type {
78
+ ...TypeRef
79
+ }
80
+ isDeprecated
81
+ deprecationReason
82
+ }
83
+ inputFields {
84
+ ...InputValue
85
+ }
86
+ interfaces {
87
+ ...TypeRef
88
+ }
89
+ enumValues(includeDeprecated: true) {
90
+ name
91
+ description
92
+ isDeprecated
93
+ deprecationReason
94
+ }
95
+ possibleTypes {
96
+ ...TypeRef
97
+ }
98
+ }
99
+
100
+ fragment InputValue on __InputValue {
101
+ name
102
+ description
103
+ type { ...TypeRef }
104
+ defaultValue
105
+
106
+
107
+ }
108
+
109
+ fragment TypeRef on __Type {
110
+ kind
111
+ name
112
+ ofType {
113
+ kind
114
+ name
115
+ ofType {
116
+ kind
117
+ name
118
+ ofType {
119
+ kind
120
+ name
121
+ ofType {
122
+ kind
123
+ name
124
+ ofType {
125
+ kind
126
+ name
127
+ ofType {
128
+ kind
129
+ name
130
+ ofType {
131
+ kind
132
+ name
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }`;
141
+
142
+ const useStyles = makeStyles({
143
+ root: {
144
+ height: "100%",
145
+ display: "flex",
146
+ flexFlow: "column nowrap"
147
+ }
148
+ });
149
+ const NoEndpoints = () => {
150
+ return /* @__PURE__ */ React.createElement(Typography, { variant: "h4" }, "No endpoints available");
151
+ };
152
+ const VoyagerBrowserContent = ({
153
+ endpoint
154
+ }) => {
155
+ const { id, introspection, introspectionErrorMessage, voyagerProps } = endpoint;
156
+ const { value, loading, error } = useAsync(
157
+ () => introspection(introspectionQuery),
158
+ [endpoint]
159
+ );
160
+ if (loading) {
161
+ return /* @__PURE__ */ React.createElement(Progress, null);
162
+ } else if (error) {
163
+ return /* @__PURE__ */ React.createElement(ErrorPanel, { error });
164
+ }
165
+ return value.data ? /* @__PURE__ */ React.createElement(Voyager, { key: id, introspection: value, ...voyagerProps }) : /* @__PURE__ */ React.createElement(Typography, { variant: "h4", color: "error" }, introspectionErrorMessage);
166
+ };
167
+ const VoyagerBrowser = (props) => {
168
+ const { endpoints } = props;
169
+ const [tabIndex, setTabIndex] = useState(0);
170
+ const classes = useStyles();
171
+ return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement(Suspense, { fallback: /* @__PURE__ */ React.createElement(Progress, null) }, /* @__PURE__ */ React.createElement(
172
+ Tabs,
173
+ {
174
+ value: tabIndex,
175
+ onChange: (_, value) => setTabIndex(value),
176
+ indicatorColor: "primary"
177
+ },
178
+ endpoints.map(({ title, id }, index) => /* @__PURE__ */ React.createElement(Tab, { key: id, label: title, value: index }))
179
+ ), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(VoyagerBrowserContent, { endpoint: endpoints[tabIndex] }))));
180
+ };
181
+ const GraphQLVoyagerBrowser = (props) => {
182
+ const hasEndpoints = checkEndpoints(props);
183
+ if (!hasEndpoints) {
184
+ return /* @__PURE__ */ React.createElement(NoEndpoints, null);
185
+ }
186
+ return /* @__PURE__ */ React.createElement(VoyagerBrowser, { ...props });
187
+ };
188
+ function checkEndpoints(props) {
189
+ return props.endpoints.length;
190
+ }
191
+
192
+ const VoyagerContent = () => {
193
+ const graphQLVoyagerApi = useApi(graphQlVoyagerApiRef);
194
+ const { value, loading, error } = useAsync(
195
+ () => graphQLVoyagerApi.getEndpoints()
196
+ );
197
+ if (loading) {
198
+ return /* @__PURE__ */ React.createElement(Progress, null);
199
+ } else if (error) {
200
+ return /* @__PURE__ */ React.createElement(ErrorPanel, { error });
201
+ }
202
+ return /* @__PURE__ */ React.createElement(GraphQLVoyagerBrowser, { endpoints: value });
203
+ };
204
+ const GraphQLVoyagerPage = (props) => {
205
+ const { title = "Welcome to Voyager!" } = props;
206
+ return /* @__PURE__ */ React.createElement(Page, { themeId: "tool" }, /* @__PURE__ */ React.createElement(Header, { title }), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(VoyagerContent, null)));
207
+ };
208
+
209
+ export { GraphQLVoyagerPage as G, GraphQLVoyagerBrowser as a, GraphqlVoyagerPage as b, GraphQLVoyagerEndpoints as c, graphQlVoyagerApiRef as d, graphqlVoyagerPlugin as g, introspectionQuery as i };
210
+ //# sourceMappingURL=index-DR0gwXc7.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DR0gwXc7.esm.js","sources":["../../src/routes.ts","../../src/plugin.ts","../../src/lib/api/GraphQLVoyagerEndpoints.ts","../../src/lib/api/types.ts","../../src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx","../../src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx"],"sourcesContent":["/*\n * Copyright 2023 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: 'graphql-voyager',\n});\n","/*\n * Copyright 2023 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/** @public */\nexport const graphqlVoyagerPlugin = createPlugin({\n id: 'graphql-voyager',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/** @public */\nexport const GraphqlVoyagerPage = graphqlVoyagerPlugin.provide(\n createRoutableExtension({\n name: 'GraphqlVoyagerPage',\n component: () => import('./components').then(m => m.GraphQLVoyagerPage),\n mountPoint: rootRouteRef,\n }),\n);\n","/*\n * Copyright 2023 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 { GraphQLVoyagerApi, GraphQLVoyagerEndpoint } from './types';\n\n/** @public */\nexport class GraphQLVoyagerEndpoints implements GraphQLVoyagerApi {\n private constructor(private readonly endpoints: GraphQLVoyagerEndpoint[]) {}\n\n static from(endpoints: GraphQLVoyagerEndpoint[]) {\n return new GraphQLVoyagerEndpoints(endpoints);\n }\n\n async getEndpoints() {\n return this.endpoints;\n }\n}\n","/*\n * Copyright 2023 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 { createApiRef } from '@backstage/core-plugin-api';\nimport { VoyagerDisplayOptions } from 'graphql-voyager/typings/components/Voyager';\nimport { WorkerCallback } from 'graphql-voyager/typings/utils/types';\n\n/** @public */\nexport type GraphQLVoyagerEndpoint = {\n id: string;\n title: string;\n introspection: (body: any) => Promise<any>;\n introspectionErrorMessage: string;\n voyagerProps?: {\n displayOptions?: VoyagerDisplayOptions;\n hideDocs?: boolean;\n hideSettings?: boolean;\n workerURI?: string;\n loadWorker?: WorkerCallback;\n };\n};\n\n/** @public */\nexport type GraphQLVoyagerApi = {\n getEndpoints(): Promise<GraphQLVoyagerEndpoint[]>;\n};\n\n/** @public */\nexport const graphQlVoyagerApiRef = createApiRef<GraphQLVoyagerApi>({\n id: 'plugin.graphqlvoyager.api',\n});\n\n/** @public */\nexport const introspectionQuery: string = `query IntrospectionQuery {\n __schema {\n \n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n \n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n \n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n description\n type { ...TypeRef }\n defaultValue\n \n \n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }`;\n","/*\n * Copyright 2023 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 {\n GraphQLVoyagerEndpoint,\n introspectionQuery,\n} from '../../lib/api/types';\nimport { useState } from 'react';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { Suspense } from 'react';\nimport { Content, ErrorPanel, Progress } from '@backstage/core-components';\nimport { Voyager } from 'graphql-voyager';\nimport useAsync from 'react-use/esm/useAsync';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n});\n\ntype GraphQLVoyagerBrowserProps = {\n endpoints: GraphQLVoyagerEndpoint[];\n};\n\nconst NoEndpoints = () => {\n return <Typography variant=\"h4\">No endpoints available</Typography>;\n};\n\nconst VoyagerBrowserContent = ({\n endpoint,\n}: {\n endpoint: GraphQLVoyagerEndpoint;\n}) => {\n const { id, introspection, introspectionErrorMessage, voyagerProps } =\n endpoint;\n const { value, loading, error } = useAsync(\n () => introspection(introspectionQuery),\n [endpoint],\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ErrorPanel error={error} />;\n }\n return value.data ? (\n <Voyager key={id} introspection={value} {...voyagerProps} />\n ) : (\n <Typography variant=\"h4\" color=\"error\">\n {introspectionErrorMessage}\n </Typography>\n );\n};\n\nconst VoyagerBrowser = (props: GraphQLVoyagerBrowserProps) => {\n const { endpoints } = props;\n const [tabIndex, setTabIndex] = useState(0);\n const classes = useStyles();\n\n return (\n <div className={classes.root}>\n <Suspense fallback={<Progress />}>\n <Tabs\n value={tabIndex}\n onChange={(_, value) => setTabIndex(value)}\n indicatorColor=\"primary\"\n >\n {endpoints.map(({ title, id }, index) => (\n <Tab key={id} label={title} value={index} />\n ))}\n </Tabs>\n <Content>\n <VoyagerBrowserContent endpoint={endpoints[tabIndex]} />\n </Content>\n </Suspense>\n </div>\n );\n};\n\n/** @public */\nexport const GraphQLVoyagerBrowser = (props: GraphQLVoyagerBrowserProps) => {\n const hasEndpoints = checkEndpoints(props);\n\n if (!hasEndpoints) {\n return <NoEndpoints />;\n }\n return <VoyagerBrowser {...props} />;\n};\n\nfunction checkEndpoints(props: GraphQLVoyagerBrowserProps) {\n return props.endpoints.length;\n}\n","/*\n * Copyright 2023 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 React from 'react';\nimport {\n Header,\n Page,\n Content,\n Progress,\n ErrorPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport 'graphql-voyager/dist/voyager.css';\nimport { graphQlVoyagerApiRef } from '../../lib/api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { GraphQLVoyagerBrowser } from '../GraphQLVoyagerBrowser';\n\n/** @public */\nexport type GraphQLVoyagerPageProps = {\n title?: string;\n};\n\nconst VoyagerContent = () => {\n const graphQLVoyagerApi = useApi(graphQlVoyagerApiRef);\n\n const { value, loading, error } = useAsync(() =>\n graphQLVoyagerApi.getEndpoints(),\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ErrorPanel error={error} />;\n }\n return <GraphQLVoyagerBrowser endpoints={value!} />;\n};\n\n/** @public */\nexport const GraphQLVoyagerPage = (props: GraphQLVoyagerPageProps) => {\n const { title = 'Welcome to Voyager!' } = props;\n\n return (\n <Page themeId=\"tool\">\n <Header title={title} />\n <Content>\n <VoyagerContent />\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,iBAAA;AACN,CAAC,CAAA;;ACIM,MAAM,uBAAuB,YAAa,CAAA;AAAA,EAC/C,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,GACR;AACF,CAAC,EAAA;AAGM,MAAM,qBAAqB,oBAAqB,CAAA,OAAA;AAAA,EACrD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,yBAAc,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,kBAAkB,CAAA;AAAA,IACtE,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH;;ACnBO,MAAM,uBAAqD,CAAA;AAAA,EACxD,YAA6B,SAAqC,EAAA;AAArC,IAAA,IAAA,CAAA,SAAA,GAAA,SAAA,CAAA;AAAA,GAAsC;AAAA,EAE3E,OAAO,KAAK,SAAqC,EAAA;AAC/C,IAAO,OAAA,IAAI,wBAAwB,SAAS,CAAA,CAAA;AAAA,GAC9C;AAAA,EAEA,MAAM,YAAe,GAAA;AACnB,IAAA,OAAO,IAAK,CAAA,SAAA,CAAA;AAAA,GACd;AACF;;ACYO,MAAM,uBAAuB,YAAgC,CAAA;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,CAAC,KAAmC,KAAA;AACpE,EAAM,MAAA,EAAE,KAAQ,GAAA,qBAAA,EAA0B,GAAA,KAAA,CAAA;AAE1C,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,MAAA,EAAA,kBACX,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,KAAc,EAAA,CAAA,kBACrB,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAe,CAClB,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,12 @@
1
+ export { a as GraphQLVoyagerBrowser, G as GraphQLVoyagerPage } from './index-DR0gwXc7.esm.js';
2
+ import '@backstage/core-plugin-api';
3
+ import 'react';
4
+ import '@backstage/core-components';
5
+ import 'graphql-voyager/dist/voyager.css';
6
+ import 'react-use/esm/useAsync';
7
+ import '@material-ui/core/Tab';
8
+ import '@material-ui/core/Tabs';
9
+ import '@material-ui/core/Typography';
10
+ import '@material-ui/core/styles';
11
+ import 'graphql-voyager';
12
+ //# sourceMappingURL=index-DfFlOE_s.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DfFlOE_s.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
+ import { VoyagerDisplayOptions } from 'graphql-voyager/typings/components/Voyager';
6
+ import { WorkerCallback } from 'graphql-voyager/typings/utils/types';
7
+
8
+ /** @public */
9
+ type GraphQLVoyagerPageProps = {
10
+ title?: string;
11
+ };
12
+ /** @public */
13
+ declare const GraphQLVoyagerPage: (props: GraphQLVoyagerPageProps) => React__default.JSX.Element;
14
+
15
+ /** @public */
16
+ type GraphQLVoyagerEndpoint = {
17
+ id: string;
18
+ title: string;
19
+ introspection: (body: any) => Promise<any>;
20
+ introspectionErrorMessage: string;
21
+ voyagerProps?: {
22
+ displayOptions?: VoyagerDisplayOptions;
23
+ hideDocs?: boolean;
24
+ hideSettings?: boolean;
25
+ workerURI?: string;
26
+ loadWorker?: WorkerCallback;
27
+ };
28
+ };
29
+ /** @public */
30
+ type GraphQLVoyagerApi = {
31
+ getEndpoints(): Promise<GraphQLVoyagerEndpoint[]>;
32
+ };
33
+ /** @public */
34
+ declare const graphQlVoyagerApiRef: _backstage_core_plugin_api.ApiRef<GraphQLVoyagerApi>;
35
+ /** @public */
36
+ declare const introspectionQuery: string;
37
+
38
+ /** @public */
39
+ declare const graphqlVoyagerPlugin: _backstage_core_plugin_api.BackstagePlugin<{
40
+ root: _backstage_core_plugin_api.RouteRef<undefined>;
41
+ }, {}, {}>;
42
+ /** @public */
43
+ declare const GraphqlVoyagerPage: (props: GraphQLVoyagerPageProps) => React.JSX.Element;
44
+
45
+ /** @public */
46
+ declare class GraphQLVoyagerEndpoints implements GraphQLVoyagerApi {
47
+ private readonly endpoints;
48
+ private constructor();
49
+ static from(endpoints: GraphQLVoyagerEndpoint[]): GraphQLVoyagerEndpoints;
50
+ getEndpoints(): Promise<GraphQLVoyagerEndpoint[]>;
51
+ }
52
+
53
+ export { type GraphQLVoyagerApi, type GraphQLVoyagerEndpoint, GraphQLVoyagerEndpoints, type GraphQLVoyagerPageProps, GraphqlVoyagerPage, GraphQLVoyagerPage as Router, graphQlVoyagerApiRef, graphqlVoyagerPlugin, introspectionQuery };
@@ -0,0 +1,12 @@
1
+ export { c as GraphQLVoyagerEndpoints, b as GraphqlVoyagerPage, G as Router, d as graphQlVoyagerApiRef, g as graphqlVoyagerPlugin, i as introspectionQuery } from './esm/index-DR0gwXc7.esm.js';
2
+ import '@backstage/core-plugin-api';
3
+ import 'react';
4
+ import '@backstage/core-components';
5
+ import 'graphql-voyager/dist/voyager.css';
6
+ import 'react-use/esm/useAsync';
7
+ import '@material-ui/core/Tab';
8
+ import '@material-ui/core/Tabs';
9
+ import '@material-ui/core/Typography';
10
+ import '@material-ui/core/styles';
11
+ import 'graphql-voyager';
12
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@backstage-community/plugin-graphql-voyager",
3
+ "description": "Backstage plugin for GraphQL Voyager",
4
+ "version": "0.1.17",
5
+ "main": "dist/index.esm.js",
6
+ "types": "dist/index.d.ts",
7
+ "license": "Apache-2.0",
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "main": "dist/index.esm.js",
11
+ "types": "dist/index.d.ts"
12
+ },
13
+ "backstage": {
14
+ "role": "frontend-plugin"
15
+ },
16
+ "homepage": "https://backstage.io",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/backstage/community-plugins",
20
+ "directory": "workspaces/graphql-voyager/plugins/graphql-voyager"
21
+ },
22
+ "sideEffects": false,
23
+ "scripts": {
24
+ "start": "backstage-cli package start",
25
+ "build": "backstage-cli package build",
26
+ "lint": "backstage-cli package lint",
27
+ "test": "backstage-cli package test",
28
+ "clean": "backstage-cli package clean",
29
+ "prepack": "backstage-cli package prepack",
30
+ "postpack": "backstage-cli package postpack"
31
+ },
32
+ "dependencies": {
33
+ "@backstage/core-components": "^0.14.4",
34
+ "@backstage/core-plugin-api": "^1.9.2",
35
+ "@material-ui/core": "^4.12.2",
36
+ "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
37
+ "graphql-voyager": "^1.0.0-rc.31",
38
+ "react-use": "^17.2.4"
39
+ },
40
+ "peerDependencies": {
41
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
42
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
43
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
44
+ },
45
+ "devDependencies": {
46
+ "@backstage/cli": "^0.26.3",
47
+ "@backstage/test-utils": "^1.5.4",
48
+ "@testing-library/dom": "^10.0.0",
49
+ "@testing-library/jest-dom": "^6.0.0",
50
+ "@testing-library/react": "^15.0.0",
51
+ "@types/react-dom": "^18.2.19",
52
+ "canvas": "^2.11.2",
53
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
54
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
55
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
56
+ },
57
+ "files": [
58
+ "dist"
59
+ ],
60
+ "module": "./dist/index.esm.js"
61
+ }