@graphiql/plugin-doc-explorer 1.0.0-beta.1 → 1.0.0-beta.2
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/LICENSE +21 -0
- package/dist/components/argument.js +88 -92
- package/dist/components/argument.js.map +1 -1
- package/dist/components/arguments-list.js +226 -237
- package/dist/components/arguments-list.js.map +1 -1
- package/dist/components/breadcrumb.js +59 -52
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/default-value.js +63 -74
- package/dist/components/default-value.js.map +1 -1
- package/dist/components/deprecation-reason.js +27 -21
- package/dist/components/deprecation-reason.js.map +1 -1
- package/dist/components/directive.js +20 -23
- package/dist/components/directive.js.map +1 -1
- package/dist/components/doc-explorer.js +219 -259
- package/dist/components/doc-explorer.js.map +1 -1
- package/dist/components/field-card.js +103 -97
- package/dist/components/field-card.js.map +1 -1
- package/dist/components/field-documentation.js +118 -135
- package/dist/components/field-documentation.js.map +1 -1
- package/dist/components/field-link.js +37 -39
- package/dist/components/field-link.js.map +1 -1
- package/dist/components/fields-list.js +216 -226
- package/dist/components/fields-list.js.map +1 -1
- package/dist/components/schema-documentation.js +263 -224
- package/dist/components/schema-documentation.js.map +1 -1
- package/dist/components/search-row.js +287 -268
- package/dist/components/search-row.js.map +1 -1
- package/dist/components/search.js +342 -345
- package/dist/components/search.js.map +1 -1
- package/dist/components/section.js +59 -69
- package/dist/components/section.js.map +1 -1
- package/dist/components/type-card.js +104 -107
- package/dist/components/type-card.js.map +1 -1
- package/dist/components/type-documentation.js +340 -363
- package/dist/components/type-documentation.js.map +1 -1
- package/dist/components/type-link.js +38 -39
- package/dist/components/type-link.js.map +1 -1
- package/dist/components/utils.js +15 -20
- package/dist/components/utils.js.map +1 -1
- package/dist/context.js +205 -285
- package/dist/context.js.map +1 -1
- package/dist/index.js +7 -31
- package/dist/schema-reference.js +48 -54
- package/dist/schema-reference.js.map +1 -1
- package/dist/style.css +24 -28
- package/package.json +25 -19
- package/dist/index.js.map +0 -1
|
@@ -1,391 +1,368 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { isNamedType, isObjectType, isInterfaceType, isInputObjectType, isEnumType, isAbstractType } from "graphql";
|
|
5
|
-
import { MarkdownContent, Button, useGraphiQL } from "@graphiql/react";
|
|
6
|
-
import { Argument } from "./argument.js";
|
|
7
1
|
import { DefaultValue } from "./default-value.js";
|
|
2
|
+
import { TypeLink } from "./type-link.js";
|
|
3
|
+
import { Argument } from "./argument.js";
|
|
8
4
|
import { DeprecationReason } from "./deprecation-reason.js";
|
|
9
5
|
import { FieldLink } from "./field-link.js";
|
|
10
6
|
import { ExplorerSection } from "./section.js";
|
|
11
|
-
import { TypeLink } from "./type-link.js";
|
|
12
7
|
/* empty css */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
8
|
+
import { c } from "react-compiler-runtime";
|
|
9
|
+
import { Button, MarkdownContent, useGraphiQL } from "@graphiql/react";
|
|
10
|
+
import { isAbstractType, isEnumType, isInputObjectType, isInterfaceType, isNamedType, isObjectType } from "graphql";
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
//#region src/components/type-documentation.tsx
|
|
14
|
+
var TypeDocumentation = (t0) => {
|
|
15
|
+
const $ = c(3);
|
|
16
|
+
const { type, hideHeader } = t0;
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== hideHeader || $[1] !== type) {
|
|
19
|
+
t1 = isNamedType(type) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
!hideHeader && type.description ? /* @__PURE__ */ jsx(MarkdownContent, {
|
|
21
|
+
type: "description",
|
|
22
|
+
children: type.description
|
|
23
|
+
}) : null,
|
|
24
|
+
!hideHeader && /* @__PURE__ */ jsx(ImplementsInterfaces, { type }),
|
|
25
|
+
!hideHeader && /* @__PURE__ */ jsx(Fields, { type }),
|
|
26
|
+
/* @__PURE__ */ jsx(EnumValues, { type }),
|
|
27
|
+
/* @__PURE__ */ jsx(PossibleTypes, { type })
|
|
28
|
+
] }) : null;
|
|
29
|
+
$[0] = hideHeader;
|
|
30
|
+
$[1] = type;
|
|
31
|
+
$[2] = t1;
|
|
32
|
+
} else t1 = $[2];
|
|
33
|
+
return t1;
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
$[4] = t2;
|
|
59
|
-
} else {
|
|
60
|
-
t2 = $[4];
|
|
61
|
-
}
|
|
62
|
-
return t2;
|
|
35
|
+
var ImplementsInterfaces = (t0) => {
|
|
36
|
+
const $ = c(5);
|
|
37
|
+
const { type } = t0;
|
|
38
|
+
if (!isObjectType(type)) return null;
|
|
39
|
+
let t1;
|
|
40
|
+
if ($[0] !== type) {
|
|
41
|
+
t1 = type.getInterfaces();
|
|
42
|
+
$[0] = type;
|
|
43
|
+
$[1] = t1;
|
|
44
|
+
} else t1 = $[1];
|
|
45
|
+
const interfaces = t1;
|
|
46
|
+
let t2;
|
|
47
|
+
if ($[2] !== interfaces.length || $[3] !== type) {
|
|
48
|
+
t2 = interfaces.length > 0 ? /* @__PURE__ */ jsx(ExplorerSection, {
|
|
49
|
+
title: "Implements",
|
|
50
|
+
children: type.getInterfaces().map(_temp)
|
|
51
|
+
}) : null;
|
|
52
|
+
$[2] = interfaces.length;
|
|
53
|
+
$[3] = type;
|
|
54
|
+
$[4] = t2;
|
|
55
|
+
} else t2 = $[4];
|
|
56
|
+
return t2;
|
|
63
57
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
] });
|
|
123
|
-
$[9] = t2;
|
|
124
|
-
$[10] = t3;
|
|
125
|
-
$[11] = t4;
|
|
126
|
-
} else {
|
|
127
|
-
t4 = $[11];
|
|
128
|
-
}
|
|
129
|
-
return t4;
|
|
58
|
+
var Fields = (t0) => {
|
|
59
|
+
const $ = c(12);
|
|
60
|
+
const { type } = t0;
|
|
61
|
+
const [showDeprecated, setShowDeprecated] = useState(false);
|
|
62
|
+
let t1;
|
|
63
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
64
|
+
t1 = () => {
|
|
65
|
+
setShowDeprecated(true);
|
|
66
|
+
};
|
|
67
|
+
$[0] = t1;
|
|
68
|
+
} else t1 = $[0];
|
|
69
|
+
const handleShowDeprecated = t1;
|
|
70
|
+
if (!isObjectType(type) && !isInterfaceType(type) && !isInputObjectType(type)) return null;
|
|
71
|
+
let deprecatedFields;
|
|
72
|
+
let fields;
|
|
73
|
+
let t2;
|
|
74
|
+
if ($[1] !== type) {
|
|
75
|
+
const fieldMap = type.getFields();
|
|
76
|
+
fields = [];
|
|
77
|
+
deprecatedFields = [];
|
|
78
|
+
for (const field of Object.keys(fieldMap).map((name) => fieldMap[name])) if (field.deprecationReason) deprecatedFields.push(field);
|
|
79
|
+
else fields.push(field);
|
|
80
|
+
t2 = fields.length > 0 ? /* @__PURE__ */ jsx(ExplorerSection, {
|
|
81
|
+
title: "Fields",
|
|
82
|
+
children: fields.map(_temp2)
|
|
83
|
+
}) : null;
|
|
84
|
+
$[1] = type;
|
|
85
|
+
$[2] = deprecatedFields;
|
|
86
|
+
$[3] = fields;
|
|
87
|
+
$[4] = t2;
|
|
88
|
+
} else {
|
|
89
|
+
deprecatedFields = $[2];
|
|
90
|
+
fields = $[3];
|
|
91
|
+
t2 = $[4];
|
|
92
|
+
}
|
|
93
|
+
let t3;
|
|
94
|
+
if ($[5] !== deprecatedFields || $[6] !== fields.length || $[7] !== showDeprecated) {
|
|
95
|
+
t3 = deprecatedFields.length > 0 ? showDeprecated || fields.length === 0 ? /* @__PURE__ */ jsx(ExplorerSection, {
|
|
96
|
+
title: "Deprecated Fields",
|
|
97
|
+
children: deprecatedFields.map(_temp3)
|
|
98
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
99
|
+
type: "button",
|
|
100
|
+
onClick: handleShowDeprecated,
|
|
101
|
+
children: "Show Deprecated Fields"
|
|
102
|
+
}) : null;
|
|
103
|
+
$[5] = deprecatedFields;
|
|
104
|
+
$[6] = fields.length;
|
|
105
|
+
$[7] = showDeprecated;
|
|
106
|
+
$[8] = t3;
|
|
107
|
+
} else t3 = $[8];
|
|
108
|
+
let t4;
|
|
109
|
+
if ($[9] !== t2 || $[10] !== t3) {
|
|
110
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
111
|
+
$[9] = t2;
|
|
112
|
+
$[10] = t3;
|
|
113
|
+
$[11] = t4;
|
|
114
|
+
} else t4 = $[11];
|
|
115
|
+
return t4;
|
|
130
116
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
117
|
+
var Field = (t0) => {
|
|
118
|
+
const $ = c(22);
|
|
119
|
+
const { field } = t0;
|
|
120
|
+
let t1;
|
|
121
|
+
let t2;
|
|
122
|
+
let t3;
|
|
123
|
+
if ($[0] !== field) {
|
|
124
|
+
const args = "args" in field ? field.args.filter(_temp4) : [];
|
|
125
|
+
t3 = "graphiql-doc-explorer-item";
|
|
126
|
+
t1 = /* @__PURE__ */ jsx(FieldLink, { field });
|
|
127
|
+
t2 = args.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
128
|
+
"(",
|
|
129
|
+
/* @__PURE__ */ jsx("span", { children: args.map((arg_0) => args.length === 1 ? /* @__PURE__ */ jsx(Argument, {
|
|
130
|
+
arg: arg_0,
|
|
131
|
+
inline: true
|
|
132
|
+
}, arg_0.name) : /* @__PURE__ */ jsx("div", {
|
|
133
|
+
className: "graphiql-doc-explorer-argument-multiple",
|
|
134
|
+
children: /* @__PURE__ */ jsx(Argument, {
|
|
135
|
+
arg: arg_0,
|
|
136
|
+
inline: true
|
|
137
|
+
})
|
|
138
|
+
}, arg_0.name)) }),
|
|
139
|
+
")"
|
|
140
|
+
] }) : null;
|
|
141
|
+
$[0] = field;
|
|
142
|
+
$[1] = t1;
|
|
143
|
+
$[2] = t2;
|
|
144
|
+
$[3] = t3;
|
|
145
|
+
} else {
|
|
146
|
+
t1 = $[1];
|
|
147
|
+
t2 = $[2];
|
|
148
|
+
t3 = $[3];
|
|
149
|
+
}
|
|
150
|
+
let t4;
|
|
151
|
+
if ($[4] !== field.type) {
|
|
152
|
+
t4 = /* @__PURE__ */ jsx(TypeLink, { type: field.type });
|
|
153
|
+
$[4] = field.type;
|
|
154
|
+
$[5] = t4;
|
|
155
|
+
} else t4 = $[5];
|
|
156
|
+
let t5;
|
|
157
|
+
if ($[6] !== field) {
|
|
158
|
+
t5 = /* @__PURE__ */ jsx(DefaultValue, { field });
|
|
159
|
+
$[6] = field;
|
|
160
|
+
$[7] = t5;
|
|
161
|
+
} else t5 = $[7];
|
|
162
|
+
let t6;
|
|
163
|
+
if ($[8] !== t1 || $[9] !== t2 || $[10] !== t4 || $[11] !== t5) {
|
|
164
|
+
t6 = /* @__PURE__ */ jsxs("div", { children: [
|
|
165
|
+
t1,
|
|
166
|
+
t2,
|
|
167
|
+
": ",
|
|
168
|
+
t4,
|
|
169
|
+
t5
|
|
170
|
+
] });
|
|
171
|
+
$[8] = t1;
|
|
172
|
+
$[9] = t2;
|
|
173
|
+
$[10] = t4;
|
|
174
|
+
$[11] = t5;
|
|
175
|
+
$[12] = t6;
|
|
176
|
+
} else t6 = $[12];
|
|
177
|
+
let t7;
|
|
178
|
+
if ($[13] !== field.description) {
|
|
179
|
+
t7 = field.description ? /* @__PURE__ */ jsx(MarkdownContent, {
|
|
180
|
+
type: "description",
|
|
181
|
+
onlyShowFirstChild: true,
|
|
182
|
+
children: field.description
|
|
183
|
+
}) : null;
|
|
184
|
+
$[13] = field.description;
|
|
185
|
+
$[14] = t7;
|
|
186
|
+
} else t7 = $[14];
|
|
187
|
+
let t8;
|
|
188
|
+
if ($[15] !== field.deprecationReason) {
|
|
189
|
+
t8 = /* @__PURE__ */ jsx(DeprecationReason, { children: field.deprecationReason });
|
|
190
|
+
$[15] = field.deprecationReason;
|
|
191
|
+
$[16] = t8;
|
|
192
|
+
} else t8 = $[16];
|
|
193
|
+
let t9;
|
|
194
|
+
if ($[17] !== t3 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8) {
|
|
195
|
+
t9 = /* @__PURE__ */ jsxs("div", {
|
|
196
|
+
className: t3,
|
|
197
|
+
children: [
|
|
198
|
+
t6,
|
|
199
|
+
t7,
|
|
200
|
+
t8
|
|
201
|
+
]
|
|
202
|
+
});
|
|
203
|
+
$[17] = t3;
|
|
204
|
+
$[18] = t6;
|
|
205
|
+
$[19] = t7;
|
|
206
|
+
$[20] = t8;
|
|
207
|
+
$[21] = t9;
|
|
208
|
+
} else t9 = $[21];
|
|
209
|
+
return t9;
|
|
222
210
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
] });
|
|
281
|
-
$[9] = t2;
|
|
282
|
-
$[10] = t3;
|
|
283
|
-
$[11] = t4;
|
|
284
|
-
} else {
|
|
285
|
-
t4 = $[11];
|
|
286
|
-
}
|
|
287
|
-
return t4;
|
|
211
|
+
var EnumValues = (t0) => {
|
|
212
|
+
const $ = c(12);
|
|
213
|
+
const { type } = t0;
|
|
214
|
+
const [showDeprecated, setShowDeprecated] = useState(false);
|
|
215
|
+
let t1;
|
|
216
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
217
|
+
t1 = () => {
|
|
218
|
+
setShowDeprecated(true);
|
|
219
|
+
};
|
|
220
|
+
$[0] = t1;
|
|
221
|
+
} else t1 = $[0];
|
|
222
|
+
const handleShowDeprecated = t1;
|
|
223
|
+
if (!isEnumType(type)) return null;
|
|
224
|
+
let deprecatedValues;
|
|
225
|
+
let t2;
|
|
226
|
+
let values;
|
|
227
|
+
if ($[1] !== type) {
|
|
228
|
+
values = [];
|
|
229
|
+
deprecatedValues = [];
|
|
230
|
+
for (const value of type.getValues()) if (value.deprecationReason) deprecatedValues.push(value);
|
|
231
|
+
else values.push(value);
|
|
232
|
+
t2 = values.length > 0 && /* @__PURE__ */ jsx(ExplorerSection, {
|
|
233
|
+
title: "Enum Values",
|
|
234
|
+
children: values.map(_temp5)
|
|
235
|
+
});
|
|
236
|
+
$[1] = type;
|
|
237
|
+
$[2] = deprecatedValues;
|
|
238
|
+
$[3] = t2;
|
|
239
|
+
$[4] = values;
|
|
240
|
+
} else {
|
|
241
|
+
deprecatedValues = $[2];
|
|
242
|
+
t2 = $[3];
|
|
243
|
+
values = $[4];
|
|
244
|
+
}
|
|
245
|
+
let t3;
|
|
246
|
+
if ($[5] !== deprecatedValues || $[6] !== showDeprecated || $[7] !== values.length) {
|
|
247
|
+
t3 = deprecatedValues.length > 0 && (showDeprecated || !values.length ? /* @__PURE__ */ jsx(ExplorerSection, {
|
|
248
|
+
title: "Deprecated Enum Values",
|
|
249
|
+
children: deprecatedValues.map(_temp6)
|
|
250
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
251
|
+
type: "button",
|
|
252
|
+
onClick: handleShowDeprecated,
|
|
253
|
+
children: "Show Deprecated Values"
|
|
254
|
+
}));
|
|
255
|
+
$[5] = deprecatedValues;
|
|
256
|
+
$[6] = showDeprecated;
|
|
257
|
+
$[7] = values.length;
|
|
258
|
+
$[8] = t3;
|
|
259
|
+
} else t3 = $[8];
|
|
260
|
+
let t4;
|
|
261
|
+
if ($[9] !== t2 || $[10] !== t3) {
|
|
262
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
263
|
+
$[9] = t2;
|
|
264
|
+
$[10] = t3;
|
|
265
|
+
$[11] = t4;
|
|
266
|
+
} else t4 = $[11];
|
|
267
|
+
return t4;
|
|
288
268
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
269
|
+
var EnumValue = (t0) => {
|
|
270
|
+
const $ = c(10);
|
|
271
|
+
const { value } = t0;
|
|
272
|
+
let t1;
|
|
273
|
+
if ($[0] !== value.name) {
|
|
274
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
275
|
+
className: "graphiql-doc-explorer-enum-value",
|
|
276
|
+
children: value.name
|
|
277
|
+
});
|
|
278
|
+
$[0] = value.name;
|
|
279
|
+
$[1] = t1;
|
|
280
|
+
} else t1 = $[1];
|
|
281
|
+
let t2;
|
|
282
|
+
if ($[2] !== value.description) {
|
|
283
|
+
t2 = value.description && /* @__PURE__ */ jsx(MarkdownContent, {
|
|
284
|
+
type: "description",
|
|
285
|
+
children: value.description
|
|
286
|
+
});
|
|
287
|
+
$[2] = value.description;
|
|
288
|
+
$[3] = t2;
|
|
289
|
+
} else t2 = $[3];
|
|
290
|
+
let t3;
|
|
291
|
+
if ($[4] !== value.deprecationReason) {
|
|
292
|
+
t3 = value.deprecationReason && /* @__PURE__ */ jsx(MarkdownContent, {
|
|
293
|
+
type: "deprecation",
|
|
294
|
+
children: value.deprecationReason
|
|
295
|
+
});
|
|
296
|
+
$[4] = value.deprecationReason;
|
|
297
|
+
$[5] = t3;
|
|
298
|
+
} else t3 = $[5];
|
|
299
|
+
let t4;
|
|
300
|
+
if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
|
|
301
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
302
|
+
className: "graphiql-doc-explorer-item",
|
|
303
|
+
children: [
|
|
304
|
+
t1,
|
|
305
|
+
t2,
|
|
306
|
+
t3
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
$[6] = t1;
|
|
310
|
+
$[7] = t2;
|
|
311
|
+
$[8] = t3;
|
|
312
|
+
$[9] = t4;
|
|
313
|
+
} else t4 = $[9];
|
|
314
|
+
return t4;
|
|
333
315
|
};
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
$[5] = t3;
|
|
359
|
-
} else {
|
|
360
|
-
t3 = $[5];
|
|
361
|
-
}
|
|
362
|
-
return t3;
|
|
316
|
+
var PossibleTypes = (t0) => {
|
|
317
|
+
const $ = c(6);
|
|
318
|
+
const { type } = t0;
|
|
319
|
+
const schema = useGraphiQL(_temp7);
|
|
320
|
+
if (!schema || !isAbstractType(type)) return null;
|
|
321
|
+
const t1 = isInterfaceType(type) ? "Implementations" : "Possible Types";
|
|
322
|
+
let t2;
|
|
323
|
+
if ($[0] !== schema || $[1] !== type) {
|
|
324
|
+
t2 = schema.getPossibleTypes(type).map(_temp8);
|
|
325
|
+
$[0] = schema;
|
|
326
|
+
$[1] = type;
|
|
327
|
+
$[2] = t2;
|
|
328
|
+
} else t2 = $[2];
|
|
329
|
+
let t3;
|
|
330
|
+
if ($[3] !== t1 || $[4] !== t2) {
|
|
331
|
+
t3 = /* @__PURE__ */ jsx(ExplorerSection, {
|
|
332
|
+
title: t1,
|
|
333
|
+
children: t2
|
|
334
|
+
});
|
|
335
|
+
$[3] = t1;
|
|
336
|
+
$[4] = t2;
|
|
337
|
+
$[5] = t3;
|
|
338
|
+
} else t3 = $[5];
|
|
339
|
+
return t3;
|
|
363
340
|
};
|
|
364
341
|
function _temp(implementedInterface) {
|
|
365
|
-
|
|
342
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TypeLink, { type: implementedInterface }) }, implementedInterface.name);
|
|
366
343
|
}
|
|
367
344
|
function _temp2(field_0) {
|
|
368
|
-
|
|
345
|
+
return /* @__PURE__ */ jsx(Field, { field: field_0 }, field_0.name);
|
|
369
346
|
}
|
|
370
347
|
function _temp3(field_1) {
|
|
371
|
-
|
|
348
|
+
return /* @__PURE__ */ jsx(Field, { field: field_1 }, field_1.name);
|
|
372
349
|
}
|
|
373
350
|
function _temp4(arg) {
|
|
374
|
-
|
|
351
|
+
return !arg.deprecationReason;
|
|
375
352
|
}
|
|
376
353
|
function _temp5(value_0) {
|
|
377
|
-
|
|
354
|
+
return /* @__PURE__ */ jsx(EnumValue, { value: value_0 }, value_0.name);
|
|
378
355
|
}
|
|
379
356
|
function _temp6(value_1) {
|
|
380
|
-
|
|
357
|
+
return /* @__PURE__ */ jsx(EnumValue, { value: value_1 }, value_1.name);
|
|
381
358
|
}
|
|
382
359
|
function _temp7(state) {
|
|
383
|
-
|
|
360
|
+
return state.schema;
|
|
384
361
|
}
|
|
385
362
|
function _temp8(possibleType) {
|
|
386
|
-
|
|
363
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TypeLink, { type: possibleType }) }, possibleType.name);
|
|
387
364
|
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
//# sourceMappingURL=type-documentation.js.map
|
|
365
|
+
//#endregion
|
|
366
|
+
export { TypeDocumentation };
|
|
367
|
+
|
|
368
|
+
//# sourceMappingURL=type-documentation.js.map
|