@graphql-eslint/eslint-plugin 4.0.0-alpha.15 → 4.0.0-alpha.16
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/cache.js +1 -2
- package/cjs/configs/index.d.cts +427 -10
- package/cjs/configs/index.js +1 -2
- package/cjs/configs/operations-all.d.cts +8 -8
- package/cjs/configs/operations-all.js +30 -33
- package/cjs/configs/operations-recommended.d.cts +35 -35
- package/cjs/configs/operations-recommended.js +56 -59
- package/cjs/configs/schema-all.d.cts +12 -12
- package/cjs/configs/schema-all.js +26 -29
- package/cjs/configs/schema-recommended.d.cts +23 -23
- package/cjs/configs/schema-recommended.js +70 -73
- package/cjs/configs/schema-relay.d.cts +5 -5
- package/cjs/configs/schema-relay.js +14 -17
- package/cjs/documents.js +1 -2
- package/cjs/estree-converter/converter.js +1 -2
- package/cjs/estree-converter/utils.js +1 -2
- package/cjs/graphql-config.js +1 -2
- package/cjs/index.d.cts +433 -15
- package/cjs/index.js +1 -2
- package/cjs/meta.js +1 -2
- package/cjs/parser.js +1 -2
- package/cjs/processor.js +1 -2
- package/cjs/rules/alphabetize/index.js +1 -2
- package/cjs/rules/description-style/index.js +1 -2
- package/cjs/rules/graphql-js-validation.js +1 -2
- package/cjs/rules/index.d.cts +4 -4
- package/cjs/rules/index.js +1 -2
- package/cjs/rules/input-name/index.js +1 -2
- package/cjs/rules/lone-executable-definition/index.js +1 -2
- package/cjs/rules/match-document-filename/index.js +1 -2
- package/cjs/rules/naming-convention/index.js +1 -2
- package/cjs/rules/no-anonymous-operations/index.js +1 -2
- package/cjs/rules/no-deprecated/index.js +1 -2
- package/cjs/rules/no-duplicate-fields/index.js +1 -2
- package/cjs/rules/no-hashtag-description/index.js +1 -2
- package/cjs/rules/no-one-place-fragments/index.js +1 -2
- package/cjs/rules/no-root-type/index.js +1 -2
- package/cjs/rules/no-scalar-result-type-on-mutation/index.js +1 -2
- package/cjs/rules/no-typename-prefix/index.js +1 -2
- package/cjs/rules/no-unreachable-types/index.js +1 -2
- package/cjs/rules/no-unused-fields/index.js +1 -2
- package/cjs/rules/relay-arguments/index.js +1 -2
- package/cjs/rules/relay-connection-types/index.js +1 -2
- package/cjs/rules/relay-edge-types/index.js +1 -2
- package/cjs/rules/relay-page-info/index.js +1 -2
- package/cjs/rules/require-deprecation-date/index.js +1 -2
- package/cjs/rules/require-deprecation-reason/index.js +1 -2
- package/cjs/rules/require-description/index.js +1 -2
- package/cjs/rules/require-field-of-type-query-in-mutation-result/index.js +1 -2
- package/cjs/rules/require-import-fragment/index.js +1 -2
- package/cjs/rules/require-nullable-fields-with-oneof/index.js +1 -2
- package/cjs/rules/require-nullable-result-in-root/index.js +1 -2
- package/cjs/rules/require-selections/index.js +1 -2
- package/cjs/rules/require-type-pattern-with-oneof/index.js +1 -2
- package/cjs/rules/selection-set-depth/index.js +1 -2
- package/cjs/rules/strict-id-in-types/index.js +1 -2
- package/cjs/rules/unique-enum-value-names/index.js +1 -2
- package/cjs/rules/unique-fragment-name/index.js +1 -2
- package/cjs/rules/unique-operation-name/index.js +1 -2
- package/cjs/schema.js +1 -2
- package/cjs/siblings.js +1 -2
- package/cjs/utils.js +1 -2
- package/esm/cache.js +0 -1
- package/esm/configs/index.d.ts +427 -10
- package/esm/configs/index.js +0 -1
- package/esm/configs/operations-all.d.ts +7 -7
- package/esm/configs/operations-all.js +28 -33
- package/esm/configs/operations-recommended.d.ts +34 -34
- package/esm/configs/operations-recommended.js +54 -59
- package/esm/configs/schema-all.d.ts +11 -11
- package/esm/configs/schema-all.js +24 -29
- package/esm/configs/schema-recommended.d.ts +22 -22
- package/esm/configs/schema-recommended.js +68 -73
- package/esm/configs/schema-relay.d.ts +4 -4
- package/esm/configs/schema-relay.js +12 -17
- package/esm/documents.js +0 -1
- package/esm/estree-converter/converter.js +0 -1
- package/esm/estree-converter/utils.js +0 -1
- package/esm/graphql-config.js +0 -1
- package/esm/index.d.ts +433 -15
- package/esm/index.js +0 -1
- package/esm/meta.js +1 -2
- package/esm/parser.js +0 -1
- package/esm/processor.js +0 -1
- package/esm/rules/alphabetize/index.js +0 -1
- package/esm/rules/description-style/index.js +0 -1
- package/esm/rules/graphql-js-validation.js +0 -1
- package/esm/rules/index.d.ts +4 -4
- package/esm/rules/index.js +0 -1
- package/esm/rules/input-name/index.js +0 -1
- package/esm/rules/lone-executable-definition/index.js +0 -1
- package/esm/rules/match-document-filename/index.js +0 -1
- package/esm/rules/naming-convention/index.js +0 -1
- package/esm/rules/no-anonymous-operations/index.js +0 -1
- package/esm/rules/no-deprecated/index.js +0 -1
- package/esm/rules/no-duplicate-fields/index.js +0 -1
- package/esm/rules/no-hashtag-description/index.js +0 -1
- package/esm/rules/no-one-place-fragments/index.js +0 -1
- package/esm/rules/no-root-type/index.js +0 -1
- package/esm/rules/no-scalar-result-type-on-mutation/index.js +0 -1
- package/esm/rules/no-typename-prefix/index.js +0 -1
- package/esm/rules/no-unreachable-types/index.js +0 -1
- package/esm/rules/no-unused-fields/index.js +0 -1
- package/esm/rules/relay-arguments/index.js +0 -1
- package/esm/rules/relay-connection-types/index.js +0 -1
- package/esm/rules/relay-edge-types/index.js +0 -1
- package/esm/rules/relay-page-info/index.js +0 -1
- package/esm/rules/require-deprecation-date/index.js +0 -1
- package/esm/rules/require-deprecation-reason/index.js +0 -1
- package/esm/rules/require-description/index.js +0 -1
- package/esm/rules/require-field-of-type-query-in-mutation-result/index.js +0 -1
- package/esm/rules/require-import-fragment/index.js +0 -1
- package/esm/rules/require-nullable-fields-with-oneof/index.js +0 -1
- package/esm/rules/require-nullable-result-in-root/index.js +0 -1
- package/esm/rules/require-selections/index.js +0 -1
- package/esm/rules/require-type-pattern-with-oneof/index.js +0 -1
- package/esm/rules/selection-set-depth/index.js +0 -1
- package/esm/rules/strict-id-in-types/index.js +0 -1
- package/esm/rules/unique-enum-value-names/index.js +0 -1
- package/esm/rules/unique-fragment-name/index.js +0 -1
- package/esm/rules/unique-operation-name/index.js +0 -1
- package/esm/schema.js +0 -1
- package/esm/siblings.js +0 -1
- package/esm/utils.js +0 -1
- package/index.browser.js +203 -251
- package/package.json +1 -1
- package/cjs/chunk-UIAXBAMD.js +0 -8
- package/esm/chunk-UIAXBAMD.js +0 -8
package/cjs/index.d.cts
CHANGED
@@ -10,11 +10,12 @@ export { configs } from './configs/index.cjs';
|
|
10
10
|
import { parseForESLint } from './parser.cjs';
|
11
11
|
export { parser } from './parser.cjs';
|
12
12
|
export { rules } from './rules/index.cjs';
|
13
|
+
export { IGraphQLConfig } from 'graphql-config';
|
14
|
+
export { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck';
|
13
15
|
export { GraphQLESTreeNode } from './estree-converter/types.cjs';
|
14
16
|
import 'estree';
|
15
17
|
import './siblings.cjs';
|
16
18
|
import '@graphql-tools/utils';
|
17
|
-
import 'graphql-config';
|
18
19
|
import 'json-schema-to-ts';
|
19
20
|
|
20
21
|
declare const processors: {
|
@@ -48,10 +49,10 @@ declare const _default: {
|
|
48
49
|
};
|
49
50
|
rules: {
|
50
51
|
alphabetize: GraphQLESLintRule<{
|
52
|
+
values?: boolean | undefined;
|
51
53
|
definitions?: boolean | undefined;
|
52
54
|
selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined;
|
53
55
|
arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined;
|
54
|
-
values?: boolean | undefined;
|
55
56
|
fields?: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[] | undefined;
|
56
57
|
variables?: boolean | undefined;
|
57
58
|
groups?: string[] | undefined;
|
@@ -74,17 +75,17 @@ declare const _default: {
|
|
74
75
|
suffix?: string | undefined;
|
75
76
|
prefix?: string | undefined;
|
76
77
|
} | undefined;
|
77
|
-
|
78
|
+
query?: (CaseStyle | "matchDocumentStyle") | {
|
78
79
|
style?: (CaseStyle | "matchDocumentStyle") | undefined;
|
79
80
|
suffix?: string | undefined;
|
80
81
|
prefix?: string | undefined;
|
81
82
|
} | undefined;
|
82
|
-
|
83
|
+
mutation?: (CaseStyle | "matchDocumentStyle") | {
|
83
84
|
style?: (CaseStyle | "matchDocumentStyle") | undefined;
|
84
85
|
suffix?: string | undefined;
|
85
86
|
prefix?: string | undefined;
|
86
87
|
} | undefined;
|
87
|
-
|
88
|
+
subscription?: (CaseStyle | "matchDocumentStyle") | {
|
88
89
|
style?: (CaseStyle | "matchDocumentStyle") | undefined;
|
89
90
|
suffix?: string | undefined;
|
90
91
|
prefix?: string | undefined;
|
@@ -160,25 +161,442 @@ declare const _default: {
|
|
160
161
|
'unique-operation-name': GraphQLESLintRule;
|
161
162
|
};
|
162
163
|
configs: {
|
163
|
-
'schema-recommended':
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
164
|
+
'schema-recommended': {
|
165
|
+
parser: string;
|
166
|
+
plugins: string[];
|
167
|
+
rules: {
|
168
|
+
'@graphql-eslint/description-style': "error";
|
169
|
+
'@graphql-eslint/known-argument-names': "error";
|
170
|
+
'@graphql-eslint/known-directives': "error";
|
171
|
+
'@graphql-eslint/known-type-names': "error";
|
172
|
+
'@graphql-eslint/lone-schema-definition': "error";
|
173
|
+
'@graphql-eslint/naming-convention': ["error", {
|
174
|
+
types: string;
|
175
|
+
FieldDefinition: string;
|
176
|
+
InputValueDefinition: string;
|
177
|
+
Argument: string;
|
178
|
+
DirectiveDefinition: string;
|
179
|
+
EnumValueDefinition: string;
|
180
|
+
'FieldDefinition[parent.name.value=Query]': {
|
181
|
+
forbiddenPrefixes: string[];
|
182
|
+
forbiddenSuffixes: string[];
|
183
|
+
};
|
184
|
+
'FieldDefinition[parent.name.value=Mutation]': {
|
185
|
+
forbiddenPrefixes: string[];
|
186
|
+
forbiddenSuffixes: string[];
|
187
|
+
};
|
188
|
+
'FieldDefinition[parent.name.value=Subscription]': {
|
189
|
+
forbiddenPrefixes: string[];
|
190
|
+
forbiddenSuffixes: string[];
|
191
|
+
};
|
192
|
+
'EnumTypeDefinition,EnumTypeExtension': {
|
193
|
+
forbiddenPrefixes: string[];
|
194
|
+
forbiddenSuffixes: string[];
|
195
|
+
};
|
196
|
+
'InterfaceTypeDefinition,InterfaceTypeExtension': {
|
197
|
+
forbiddenPrefixes: string[];
|
198
|
+
forbiddenSuffixes: string[];
|
199
|
+
};
|
200
|
+
'UnionTypeDefinition,UnionTypeExtension': {
|
201
|
+
forbiddenPrefixes: string[];
|
202
|
+
forbiddenSuffixes: string[];
|
203
|
+
};
|
204
|
+
'ObjectTypeDefinition,ObjectTypeExtension': {
|
205
|
+
forbiddenPrefixes: string[];
|
206
|
+
forbiddenSuffixes: string[];
|
207
|
+
};
|
208
|
+
}];
|
209
|
+
'@graphql-eslint/no-hashtag-description': "error";
|
210
|
+
'@graphql-eslint/no-typename-prefix': "error";
|
211
|
+
'@graphql-eslint/no-unreachable-types': "error";
|
212
|
+
'@graphql-eslint/possible-type-extension': "error";
|
213
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
214
|
+
'@graphql-eslint/require-deprecation-reason': "error";
|
215
|
+
'@graphql-eslint/require-description': ["error", {
|
216
|
+
types: boolean;
|
217
|
+
DirectiveDefinition: boolean;
|
218
|
+
rootField: boolean;
|
219
|
+
}];
|
220
|
+
'@graphql-eslint/strict-id-in-types': "error";
|
221
|
+
'@graphql-eslint/unique-directive-names': "error";
|
222
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
223
|
+
'@graphql-eslint/unique-enum-value-names': "error";
|
224
|
+
'@graphql-eslint/unique-field-definition-names': "error";
|
225
|
+
'@graphql-eslint/unique-operation-types': "error";
|
226
|
+
'@graphql-eslint/unique-type-names': "error";
|
227
|
+
};
|
228
|
+
};
|
229
|
+
'schema-all': {
|
230
|
+
extends: string;
|
231
|
+
rules: {
|
232
|
+
'@graphql-eslint/alphabetize': ["error", {
|
233
|
+
definitions: boolean;
|
234
|
+
fields: string[];
|
235
|
+
values: boolean;
|
236
|
+
arguments: string[];
|
237
|
+
groups: string[];
|
238
|
+
}];
|
239
|
+
'@graphql-eslint/input-name': "error";
|
240
|
+
'@graphql-eslint/no-root-type': ["error", {
|
241
|
+
disallow: string[];
|
242
|
+
}];
|
243
|
+
'@graphql-eslint/no-scalar-result-type-on-mutation': "error";
|
244
|
+
'@graphql-eslint/require-deprecation-date': "error";
|
245
|
+
'@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
|
246
|
+
'@graphql-eslint/require-nullable-fields-with-oneof': "error";
|
247
|
+
'@graphql-eslint/require-nullable-result-in-root': "error";
|
248
|
+
'@graphql-eslint/require-type-pattern-with-oneof': "error";
|
249
|
+
};
|
250
|
+
};
|
251
|
+
'schema-relay': {
|
252
|
+
parser: string;
|
253
|
+
plugins: string[];
|
254
|
+
rules: {
|
255
|
+
'@graphql-eslint/relay-arguments': "error";
|
256
|
+
'@graphql-eslint/relay-connection-types': "error";
|
257
|
+
'@graphql-eslint/relay-edge-types': "error";
|
258
|
+
'@graphql-eslint/relay-page-info': "error";
|
259
|
+
};
|
260
|
+
};
|
261
|
+
'operations-recommended': {
|
262
|
+
parser: string;
|
263
|
+
plugins: string[];
|
264
|
+
rules: {
|
265
|
+
'@graphql-eslint/executable-definitions': "error";
|
266
|
+
'@graphql-eslint/fields-on-correct-type': "error";
|
267
|
+
'@graphql-eslint/fragments-on-composite-type': "error";
|
268
|
+
'@graphql-eslint/known-argument-names': "error";
|
269
|
+
'@graphql-eslint/known-directives': "error";
|
270
|
+
'@graphql-eslint/known-fragment-names': "error";
|
271
|
+
'@graphql-eslint/known-type-names': "error";
|
272
|
+
'@graphql-eslint/lone-anonymous-operation': "error";
|
273
|
+
'@graphql-eslint/naming-convention': ["error", {
|
274
|
+
VariableDefinition: string;
|
275
|
+
OperationDefinition: {
|
276
|
+
style: string;
|
277
|
+
forbiddenPrefixes: string[];
|
278
|
+
forbiddenSuffixes: string[];
|
279
|
+
};
|
280
|
+
FragmentDefinition: {
|
281
|
+
style: string;
|
282
|
+
forbiddenPrefixes: string[];
|
283
|
+
forbiddenSuffixes: string[];
|
284
|
+
};
|
285
|
+
}];
|
286
|
+
'@graphql-eslint/no-anonymous-operations': "error";
|
287
|
+
'@graphql-eslint/no-deprecated': "error";
|
288
|
+
'@graphql-eslint/no-duplicate-fields': "error";
|
289
|
+
'@graphql-eslint/no-fragment-cycles': "error";
|
290
|
+
'@graphql-eslint/no-undefined-variables': "error";
|
291
|
+
'@graphql-eslint/no-unused-fragments': "error";
|
292
|
+
'@graphql-eslint/no-unused-variables': "error";
|
293
|
+
'@graphql-eslint/one-field-subscriptions': "error";
|
294
|
+
'@graphql-eslint/overlapping-fields-can-be-merged': "error";
|
295
|
+
'@graphql-eslint/possible-fragment-spread': "error";
|
296
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
297
|
+
'@graphql-eslint/require-selections': "error";
|
298
|
+
'@graphql-eslint/scalar-leafs': "error";
|
299
|
+
'@graphql-eslint/selection-set-depth': ["error", {
|
300
|
+
maxDepth: number;
|
301
|
+
}];
|
302
|
+
'@graphql-eslint/unique-argument-names': "error";
|
303
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
304
|
+
'@graphql-eslint/unique-fragment-name': "error";
|
305
|
+
'@graphql-eslint/unique-input-field-names': "error";
|
306
|
+
'@graphql-eslint/unique-operation-name': "error";
|
307
|
+
'@graphql-eslint/unique-variable-names': "error";
|
308
|
+
'@graphql-eslint/value-literals-of-correct-type': "error";
|
309
|
+
'@graphql-eslint/variables-are-input-types': "error";
|
310
|
+
'@graphql-eslint/variables-in-allowed-position': "error";
|
311
|
+
};
|
312
|
+
};
|
313
|
+
'operations-all': {
|
314
|
+
extends: string;
|
315
|
+
rules: {
|
316
|
+
'@graphql-eslint/alphabetize': ["error", {
|
317
|
+
definitions: boolean;
|
318
|
+
selections: string[];
|
319
|
+
variables: boolean;
|
320
|
+
arguments: string[];
|
321
|
+
groups: string[];
|
322
|
+
}];
|
323
|
+
'@graphql-eslint/lone-executable-definition': "error";
|
324
|
+
'@graphql-eslint/match-document-filename': ["error", {
|
325
|
+
query: string;
|
326
|
+
mutation: string;
|
327
|
+
subscription: string;
|
328
|
+
fragment: string;
|
329
|
+
}];
|
330
|
+
'@graphql-eslint/no-one-place-fragments': "error";
|
331
|
+
'@graphql-eslint/require-import-fragment': "error";
|
332
|
+
};
|
333
|
+
};
|
168
334
|
'flat/schema-recommended': {
|
169
|
-
rules:
|
335
|
+
rules: {
|
336
|
+
'@graphql-eslint/description-style': "error";
|
337
|
+
'@graphql-eslint/known-argument-names': "error";
|
338
|
+
'@graphql-eslint/known-directives': "error";
|
339
|
+
'@graphql-eslint/known-type-names': "error";
|
340
|
+
'@graphql-eslint/lone-schema-definition': "error";
|
341
|
+
'@graphql-eslint/naming-convention': ["error", {
|
342
|
+
types: string;
|
343
|
+
FieldDefinition: string;
|
344
|
+
InputValueDefinition: string;
|
345
|
+
Argument: string;
|
346
|
+
DirectiveDefinition: string;
|
347
|
+
EnumValueDefinition: string;
|
348
|
+
'FieldDefinition[parent.name.value=Query]': {
|
349
|
+
forbiddenPrefixes: string[];
|
350
|
+
forbiddenSuffixes: string[];
|
351
|
+
};
|
352
|
+
'FieldDefinition[parent.name.value=Mutation]': {
|
353
|
+
forbiddenPrefixes: string[];
|
354
|
+
forbiddenSuffixes: string[];
|
355
|
+
};
|
356
|
+
'FieldDefinition[parent.name.value=Subscription]': {
|
357
|
+
forbiddenPrefixes: string[];
|
358
|
+
forbiddenSuffixes: string[];
|
359
|
+
};
|
360
|
+
'EnumTypeDefinition,EnumTypeExtension': {
|
361
|
+
forbiddenPrefixes: string[];
|
362
|
+
forbiddenSuffixes: string[];
|
363
|
+
};
|
364
|
+
'InterfaceTypeDefinition,InterfaceTypeExtension': {
|
365
|
+
forbiddenPrefixes: string[];
|
366
|
+
forbiddenSuffixes: string[];
|
367
|
+
};
|
368
|
+
'UnionTypeDefinition,UnionTypeExtension': {
|
369
|
+
forbiddenPrefixes: string[];
|
370
|
+
forbiddenSuffixes: string[];
|
371
|
+
};
|
372
|
+
'ObjectTypeDefinition,ObjectTypeExtension': {
|
373
|
+
forbiddenPrefixes: string[];
|
374
|
+
forbiddenSuffixes: string[];
|
375
|
+
};
|
376
|
+
}];
|
377
|
+
'@graphql-eslint/no-hashtag-description': "error";
|
378
|
+
'@graphql-eslint/no-typename-prefix': "error";
|
379
|
+
'@graphql-eslint/no-unreachable-types': "error";
|
380
|
+
'@graphql-eslint/possible-type-extension': "error";
|
381
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
382
|
+
'@graphql-eslint/require-deprecation-reason': "error";
|
383
|
+
'@graphql-eslint/require-description': ["error", {
|
384
|
+
types: boolean;
|
385
|
+
DirectiveDefinition: boolean;
|
386
|
+
rootField: boolean;
|
387
|
+
}];
|
388
|
+
'@graphql-eslint/strict-id-in-types': "error";
|
389
|
+
'@graphql-eslint/unique-directive-names': "error";
|
390
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
391
|
+
'@graphql-eslint/unique-enum-value-names': "error";
|
392
|
+
'@graphql-eslint/unique-field-definition-names': "error";
|
393
|
+
'@graphql-eslint/unique-operation-types': "error";
|
394
|
+
'@graphql-eslint/unique-type-names': "error";
|
395
|
+
};
|
170
396
|
};
|
171
397
|
'flat/schema-all': {
|
172
|
-
rules:
|
398
|
+
rules: {
|
399
|
+
'@graphql-eslint/alphabetize': ["error", {
|
400
|
+
definitions: boolean;
|
401
|
+
fields: string[];
|
402
|
+
values: boolean;
|
403
|
+
arguments: string[];
|
404
|
+
groups: string[];
|
405
|
+
}];
|
406
|
+
'@graphql-eslint/input-name': "error";
|
407
|
+
'@graphql-eslint/no-root-type': ["error", {
|
408
|
+
disallow: string[];
|
409
|
+
}];
|
410
|
+
'@graphql-eslint/no-scalar-result-type-on-mutation': "error";
|
411
|
+
'@graphql-eslint/require-deprecation-date': "error";
|
412
|
+
'@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
|
413
|
+
'@graphql-eslint/require-nullable-fields-with-oneof': "error";
|
414
|
+
'@graphql-eslint/require-nullable-result-in-root': "error";
|
415
|
+
'@graphql-eslint/require-type-pattern-with-oneof': "error";
|
416
|
+
'@graphql-eslint/description-style': "error";
|
417
|
+
'@graphql-eslint/known-argument-names': "error";
|
418
|
+
'@graphql-eslint/known-directives': "error";
|
419
|
+
'@graphql-eslint/known-type-names': "error";
|
420
|
+
'@graphql-eslint/lone-schema-definition': "error";
|
421
|
+
'@graphql-eslint/naming-convention': ["error", {
|
422
|
+
types: string;
|
423
|
+
FieldDefinition: string;
|
424
|
+
InputValueDefinition: string;
|
425
|
+
Argument: string;
|
426
|
+
DirectiveDefinition: string;
|
427
|
+
EnumValueDefinition: string;
|
428
|
+
'FieldDefinition[parent.name.value=Query]': {
|
429
|
+
forbiddenPrefixes: string[];
|
430
|
+
forbiddenSuffixes: string[];
|
431
|
+
};
|
432
|
+
'FieldDefinition[parent.name.value=Mutation]': {
|
433
|
+
forbiddenPrefixes: string[];
|
434
|
+
forbiddenSuffixes: string[];
|
435
|
+
};
|
436
|
+
'FieldDefinition[parent.name.value=Subscription]': {
|
437
|
+
forbiddenPrefixes: string[];
|
438
|
+
forbiddenSuffixes: string[];
|
439
|
+
};
|
440
|
+
'EnumTypeDefinition,EnumTypeExtension': {
|
441
|
+
forbiddenPrefixes: string[];
|
442
|
+
forbiddenSuffixes: string[];
|
443
|
+
};
|
444
|
+
'InterfaceTypeDefinition,InterfaceTypeExtension': {
|
445
|
+
forbiddenPrefixes: string[];
|
446
|
+
forbiddenSuffixes: string[];
|
447
|
+
};
|
448
|
+
'UnionTypeDefinition,UnionTypeExtension': {
|
449
|
+
forbiddenPrefixes: string[];
|
450
|
+
forbiddenSuffixes: string[];
|
451
|
+
};
|
452
|
+
'ObjectTypeDefinition,ObjectTypeExtension': {
|
453
|
+
forbiddenPrefixes: string[];
|
454
|
+
forbiddenSuffixes: string[];
|
455
|
+
};
|
456
|
+
}];
|
457
|
+
'@graphql-eslint/no-hashtag-description': "error";
|
458
|
+
'@graphql-eslint/no-typename-prefix': "error";
|
459
|
+
'@graphql-eslint/no-unreachable-types': "error";
|
460
|
+
'@graphql-eslint/possible-type-extension': "error";
|
461
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
462
|
+
'@graphql-eslint/require-deprecation-reason': "error";
|
463
|
+
'@graphql-eslint/require-description': ["error", {
|
464
|
+
types: boolean;
|
465
|
+
DirectiveDefinition: boolean;
|
466
|
+
rootField: boolean;
|
467
|
+
}];
|
468
|
+
'@graphql-eslint/strict-id-in-types': "error";
|
469
|
+
'@graphql-eslint/unique-directive-names': "error";
|
470
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
471
|
+
'@graphql-eslint/unique-enum-value-names': "error";
|
472
|
+
'@graphql-eslint/unique-field-definition-names': "error";
|
473
|
+
'@graphql-eslint/unique-operation-types': "error";
|
474
|
+
'@graphql-eslint/unique-type-names': "error";
|
475
|
+
};
|
173
476
|
};
|
174
477
|
'flat/schema-relay': {
|
175
|
-
rules:
|
478
|
+
rules: {
|
479
|
+
'@graphql-eslint/relay-arguments': "error";
|
480
|
+
'@graphql-eslint/relay-connection-types': "error";
|
481
|
+
'@graphql-eslint/relay-edge-types': "error";
|
482
|
+
'@graphql-eslint/relay-page-info': "error";
|
483
|
+
};
|
176
484
|
};
|
177
485
|
'flat/operations-recommended': {
|
178
|
-
rules:
|
486
|
+
rules: {
|
487
|
+
'@graphql-eslint/executable-definitions': "error";
|
488
|
+
'@graphql-eslint/fields-on-correct-type': "error";
|
489
|
+
'@graphql-eslint/fragments-on-composite-type': "error";
|
490
|
+
'@graphql-eslint/known-argument-names': "error";
|
491
|
+
'@graphql-eslint/known-directives': "error";
|
492
|
+
'@graphql-eslint/known-fragment-names': "error";
|
493
|
+
'@graphql-eslint/known-type-names': "error";
|
494
|
+
'@graphql-eslint/lone-anonymous-operation': "error";
|
495
|
+
'@graphql-eslint/naming-convention': ["error", {
|
496
|
+
VariableDefinition: string;
|
497
|
+
OperationDefinition: {
|
498
|
+
style: string;
|
499
|
+
forbiddenPrefixes: string[];
|
500
|
+
forbiddenSuffixes: string[];
|
501
|
+
};
|
502
|
+
FragmentDefinition: {
|
503
|
+
style: string;
|
504
|
+
forbiddenPrefixes: string[];
|
505
|
+
forbiddenSuffixes: string[];
|
506
|
+
};
|
507
|
+
}];
|
508
|
+
'@graphql-eslint/no-anonymous-operations': "error";
|
509
|
+
'@graphql-eslint/no-deprecated': "error";
|
510
|
+
'@graphql-eslint/no-duplicate-fields': "error";
|
511
|
+
'@graphql-eslint/no-fragment-cycles': "error";
|
512
|
+
'@graphql-eslint/no-undefined-variables': "error";
|
513
|
+
'@graphql-eslint/no-unused-fragments': "error";
|
514
|
+
'@graphql-eslint/no-unused-variables': "error";
|
515
|
+
'@graphql-eslint/one-field-subscriptions': "error";
|
516
|
+
'@graphql-eslint/overlapping-fields-can-be-merged': "error";
|
517
|
+
'@graphql-eslint/possible-fragment-spread': "error";
|
518
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
519
|
+
'@graphql-eslint/require-selections': "error";
|
520
|
+
'@graphql-eslint/scalar-leafs': "error";
|
521
|
+
'@graphql-eslint/selection-set-depth': ["error", {
|
522
|
+
maxDepth: number;
|
523
|
+
}];
|
524
|
+
'@graphql-eslint/unique-argument-names': "error";
|
525
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
526
|
+
'@graphql-eslint/unique-fragment-name': "error";
|
527
|
+
'@graphql-eslint/unique-input-field-names': "error";
|
528
|
+
'@graphql-eslint/unique-operation-name': "error";
|
529
|
+
'@graphql-eslint/unique-variable-names': "error";
|
530
|
+
'@graphql-eslint/value-literals-of-correct-type': "error";
|
531
|
+
'@graphql-eslint/variables-are-input-types': "error";
|
532
|
+
'@graphql-eslint/variables-in-allowed-position': "error";
|
533
|
+
};
|
179
534
|
};
|
180
535
|
'flat/operations-all': {
|
181
|
-
rules:
|
536
|
+
rules: {
|
537
|
+
'@graphql-eslint/alphabetize': ["error", {
|
538
|
+
definitions: boolean;
|
539
|
+
selections: string[];
|
540
|
+
variables: boolean;
|
541
|
+
arguments: string[];
|
542
|
+
groups: string[];
|
543
|
+
}];
|
544
|
+
'@graphql-eslint/lone-executable-definition': "error";
|
545
|
+
'@graphql-eslint/match-document-filename': ["error", {
|
546
|
+
query: string;
|
547
|
+
mutation: string;
|
548
|
+
subscription: string;
|
549
|
+
fragment: string;
|
550
|
+
}];
|
551
|
+
'@graphql-eslint/no-one-place-fragments': "error";
|
552
|
+
'@graphql-eslint/require-import-fragment': "error";
|
553
|
+
'@graphql-eslint/executable-definitions': "error";
|
554
|
+
'@graphql-eslint/fields-on-correct-type': "error";
|
555
|
+
'@graphql-eslint/fragments-on-composite-type': "error";
|
556
|
+
'@graphql-eslint/known-argument-names': "error";
|
557
|
+
'@graphql-eslint/known-directives': "error";
|
558
|
+
'@graphql-eslint/known-fragment-names': "error";
|
559
|
+
'@graphql-eslint/known-type-names': "error";
|
560
|
+
'@graphql-eslint/lone-anonymous-operation': "error";
|
561
|
+
'@graphql-eslint/naming-convention': ["error", {
|
562
|
+
VariableDefinition: string;
|
563
|
+
OperationDefinition: {
|
564
|
+
style: string;
|
565
|
+
forbiddenPrefixes: string[];
|
566
|
+
forbiddenSuffixes: string[];
|
567
|
+
};
|
568
|
+
FragmentDefinition: {
|
569
|
+
style: string;
|
570
|
+
forbiddenPrefixes: string[];
|
571
|
+
forbiddenSuffixes: string[];
|
572
|
+
};
|
573
|
+
}];
|
574
|
+
'@graphql-eslint/no-anonymous-operations': "error";
|
575
|
+
'@graphql-eslint/no-deprecated': "error";
|
576
|
+
'@graphql-eslint/no-duplicate-fields': "error";
|
577
|
+
'@graphql-eslint/no-fragment-cycles': "error";
|
578
|
+
'@graphql-eslint/no-undefined-variables': "error";
|
579
|
+
'@graphql-eslint/no-unused-fragments': "error";
|
580
|
+
'@graphql-eslint/no-unused-variables': "error";
|
581
|
+
'@graphql-eslint/one-field-subscriptions': "error";
|
582
|
+
'@graphql-eslint/overlapping-fields-can-be-merged': "error";
|
583
|
+
'@graphql-eslint/possible-fragment-spread': "error";
|
584
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
585
|
+
'@graphql-eslint/require-selections': "error";
|
586
|
+
'@graphql-eslint/scalar-leafs': "error";
|
587
|
+
'@graphql-eslint/selection-set-depth': ["error", {
|
588
|
+
maxDepth: number;
|
589
|
+
}];
|
590
|
+
'@graphql-eslint/unique-argument-names': "error";
|
591
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
592
|
+
'@graphql-eslint/unique-fragment-name': "error";
|
593
|
+
'@graphql-eslint/unique-input-field-names': "error";
|
594
|
+
'@graphql-eslint/unique-operation-name': "error";
|
595
|
+
'@graphql-eslint/unique-variable-names': "error";
|
596
|
+
'@graphql-eslint/value-literals-of-correct-type': "error";
|
597
|
+
'@graphql-eslint/variables-are-input-types': "error";
|
598
|
+
'@graphql-eslint/variables-in-allowed-position': "error";
|
599
|
+
};
|
182
600
|
};
|
183
601
|
};
|
184
602
|
};
|
package/cjs/index.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }require('./
|
2
|
-
var _indexjs = require('./configs/index.js');
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _indexjs = require('./configs/index.js');
|
3
2
|
var _parserjs = require('./parser.js');
|
4
3
|
var _processorjs = require('./processor.js');
|
5
4
|
var _indexjs3 = require('./rules/index.js');
|
package/cjs/meta.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2
|
-
const version = "4.0.0-alpha.15";
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});const version = "4.0.0-alpha.16";
|
3
2
|
|
4
3
|
|
5
4
|
exports.version = version;
|
package/cjs/parser.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('
|
2
|
-
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
3
2
|
var _graphql = require('graphql');
|
4
3
|
var _utils = require('@graphql-tools/utils');
|
5
4
|
var _documentsjs = require('./documents.js');
|
package/cjs/processor.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('
|
2
|
-
var _nodepath = require('node:path');
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _nodepath = require('node:path');
|
3
2
|
|
4
3
|
|
5
4
|
var _graphqltagpluck = require('@graphql-tools/graphql-tag-pluck');
|
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
2
|
-
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
3
2
|
|
4
3
|
var _graphql = require('graphql');
|
5
4
|
var _lodashlowercase = require('lodash.lowercase'); var _lodashlowercase2 = _interopRequireDefault(_lodashlowercase);
|
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../
|
2
|
-
var _utilsjs = require('../../utils.js');
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utilsjs = require('../../utils.js');
|
3
2
|
const schema = {
|
4
3
|
type: "array",
|
5
4
|
maxItems: 1,
|
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
2
|
-
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
3
2
|
|
4
3
|
|
5
4
|
|
package/cjs/rules/index.d.cts
CHANGED
@@ -12,10 +12,10 @@ import 'json-schema-to-ts';
|
|
12
12
|
|
13
13
|
declare const rules: {
|
14
14
|
alphabetize: GraphQLESLintRule<{
|
15
|
+
values?: boolean | undefined;
|
15
16
|
definitions?: boolean | undefined;
|
16
17
|
selections?: ("OperationDefinition" | "FragmentDefinition")[] | undefined;
|
17
18
|
arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[] | undefined;
|
18
|
-
values?: boolean | undefined;
|
19
19
|
fields?: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[] | undefined;
|
20
20
|
variables?: boolean | undefined;
|
21
21
|
groups?: string[] | undefined;
|
@@ -38,17 +38,17 @@ declare const rules: {
|
|
38
38
|
suffix?: string | undefined;
|
39
39
|
prefix?: string | undefined;
|
40
40
|
} | undefined;
|
41
|
-
|
41
|
+
query?: (CaseStyle | "matchDocumentStyle") | {
|
42
42
|
style?: (CaseStyle | "matchDocumentStyle") | undefined;
|
43
43
|
suffix?: string | undefined;
|
44
44
|
prefix?: string | undefined;
|
45
45
|
} | undefined;
|
46
|
-
|
46
|
+
mutation?: (CaseStyle | "matchDocumentStyle") | {
|
47
47
|
style?: (CaseStyle | "matchDocumentStyle") | undefined;
|
48
48
|
suffix?: string | undefined;
|
49
49
|
prefix?: string | undefined;
|
50
50
|
} | undefined;
|
51
|
-
|
51
|
+
subscription?: (CaseStyle | "matchDocumentStyle") | {
|
52
52
|
style?: (CaseStyle | "matchDocumentStyle") | undefined;
|
53
53
|
suffix?: string | undefined;
|
54
54
|
prefix?: string | undefined;
|
package/cjs/rules/index.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('
|
2
|
-
var _indexjs = require('./alphabetize/index.js');
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _indexjs = require('./alphabetize/index.js');
|
3
2
|
var _indexjs3 = require('./description-style/index.js');
|
4
3
|
var _graphqljsvalidationjs = require('./graphql-js-validation.js');
|
5
4
|
var _indexjs5 = require('./input-name/index.js');
|
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('
|
2
|
-
var _graphql = require('graphql');
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _graphql = require('graphql');
|
3
2
|
var _utilsjs = require('../../utils.js');
|
4
3
|
const RULE_ID = "lone-executable-definition", definitionTypes = ["fragment", ...Object.values(_graphql.OperationTypeNode)], schema = {
|
5
4
|
type: "array",
|
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('
|
2
|
-
var _nodepath = require('node:path');
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _nodepath = require('node:path');
|
3
2
|
var _graphql = require('graphql');
|
4
3
|
|
5
4
|
|