@osdk/client 2.2.0-beta.4 → 2.2.0-beta.6
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 +29 -0
- package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +7 -0
- package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
- package/build/browser/object/AttachmentUpload.js +3 -0
- package/build/browser/object/AttachmentUpload.js.map +1 -1
- package/build/browser/object/aggregate.test.js +12 -2
- package/build/browser/object/aggregate.test.js.map +1 -1
- package/build/browser/observable/OptimisticBuilder.js.map +1 -1
- package/build/browser/observable/internal/Store.js +1 -1
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/Store.test.js +2 -2
- package/build/browser/observable/internal/Store.test.js.map +1 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.js +0 -2
- package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/toDataValue.js +10 -2
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/browser/util/toDataValueQueries.js +10 -2
- package/build/browser/util/toDataValueQueries.js.map +1 -1
- package/build/cjs/{chunk-T5UE6BI7.cjs → chunk-2FVV5A63.cjs} +41 -34
- package/build/cjs/chunk-2FVV5A63.cjs.map +1 -0
- package/build/cjs/chunk-X7WGNFZ4.cjs +5 -5
- package/build/cjs/chunk-X7WGNFZ4.cjs.map +1 -1
- package/build/cjs/graphql-JJX5MZPQ.cjs +263 -263
- package/build/cjs/graphql-JJX5MZPQ.cjs.map +1 -1
- package/build/cjs/index.cjs +85 -66
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/public/internal.cjs +4 -4
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +64 -35
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +1 -1
- package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +7 -0
- package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -1
- package/build/esm/object/AttachmentUpload.js +3 -0
- package/build/esm/object/AttachmentUpload.js.map +1 -1
- package/build/esm/object/aggregate.test.js +12 -2
- package/build/esm/object/aggregate.test.js.map +1 -1
- package/build/esm/observable/OptimisticBuilder.js.map +1 -1
- package/build/esm/observable/internal/Store.js +1 -1
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/Store.test.js +2 -2
- package/build/esm/observable/internal/Store.test.js.map +1 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.js +0 -2
- package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/toDataValue.js +10 -2
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/esm/util/toDataValueQueries.js +10 -2
- package/build/esm/util/toDataValueQueries.js.map +1 -1
- package/build/types/object/AttachmentUpload.d.ts +3 -0
- package/build/types/object/AttachmentUpload.d.ts.map +1 -1
- package/build/types/observable/OptimisticBuilder.d.ts +1 -1
- package/build/types/observable/OptimisticBuilder.d.ts.map +1 -1
- package/package.json +7 -7
- package/build/cjs/chunk-T5UE6BI7.cjs.map +0 -1
|
@@ -21,7 +21,7 @@ function devAssert(condition, message) {
|
|
|
21
21
|
|
|
22
22
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isPromise.mjs
|
|
23
23
|
function isPromise(value) {
|
|
24
|
-
return typeof (value === null || value ===
|
|
24
|
+
return typeof (value === null || value === void 0 ? void 0 : value.then) === "function";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.mjs
|
|
@@ -90,7 +90,7 @@ function printSourceLocation(source, sourceLocation) {
|
|
|
90
90
|
]);
|
|
91
91
|
}
|
|
92
92
|
function printPrefixedLines(lines) {
|
|
93
|
-
const existingLines = lines.filter(([_, line]) => line !==
|
|
93
|
+
const existingLines = lines.filter(([_, line]) => line !== void 0);
|
|
94
94
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
95
95
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n");
|
|
96
96
|
}
|
|
@@ -161,15 +161,15 @@ var GraphQLError = class _GraphQLError extends Error {
|
|
|
161
161
|
} = toNormalizedOptions(rawArgs);
|
|
162
162
|
super(message);
|
|
163
163
|
this.name = "GraphQLError";
|
|
164
|
-
this.path = path !== null && path !==
|
|
165
|
-
this.originalError = originalError !== null && originalError !==
|
|
166
|
-
this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] :
|
|
167
|
-
const nodeLocations = undefinedIfEmpty((_this$nodes = this.nodes) === null || _this$nodes ===
|
|
168
|
-
this.source = source !== null && source !==
|
|
169
|
-
this.positions = positions !== null && positions !==
|
|
170
|
-
this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations ===
|
|
171
|
-
const originalExtensions = isObjectLike(originalError === null || originalError ===
|
|
172
|
-
this.extensions = (_ref = extensions !== null && extensions !==
|
|
164
|
+
this.path = path !== null && path !== void 0 ? path : void 0;
|
|
165
|
+
this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0;
|
|
166
|
+
this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0);
|
|
167
|
+
const nodeLocations = undefinedIfEmpty((_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null));
|
|
168
|
+
this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source;
|
|
169
|
+
this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start);
|
|
170
|
+
this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => getLocation(loc.source, loc.start));
|
|
171
|
+
const originalExtensions = isObjectLike(originalError === null || originalError === void 0 ? void 0 : originalError.extensions) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0;
|
|
172
|
+
this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null);
|
|
173
173
|
Object.defineProperties(this, {
|
|
174
174
|
message: {
|
|
175
175
|
writable: true,
|
|
@@ -191,7 +191,7 @@ var GraphQLError = class _GraphQLError extends Error {
|
|
|
191
191
|
enumerable: false
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
if (originalError !== null && originalError !==
|
|
194
|
+
if (originalError !== null && originalError !== void 0 && originalError.stack) {
|
|
195
195
|
Object.defineProperty(this, "stack", {
|
|
196
196
|
value: originalError.stack,
|
|
197
197
|
writable: true,
|
|
@@ -242,7 +242,7 @@ var GraphQLError = class _GraphQLError extends Error {
|
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
244
|
function undefinedIfEmpty(array) {
|
|
245
|
-
return array ===
|
|
245
|
+
return array === void 0 || array.length === 0 ? void 0 : array;
|
|
246
246
|
}
|
|
247
247
|
function printError(error) {
|
|
248
248
|
return error.toString();
|
|
@@ -396,7 +396,7 @@ var QueryDocumentKeys = {
|
|
|
396
396
|
};
|
|
397
397
|
var kindValues = new Set(Object.keys(QueryDocumentKeys));
|
|
398
398
|
function isNode(maybeNode) {
|
|
399
|
-
const maybeKind = maybeNode === null || maybeNode ===
|
|
399
|
+
const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
|
|
400
400
|
return typeof maybeKind === "string" && kindValues.has(maybeKind);
|
|
401
401
|
}
|
|
402
402
|
exports.OperationTypeNode = void 0;
|
|
@@ -509,13 +509,13 @@ function dedentBlockStringLines(lines) {
|
|
|
509
509
|
if (indent2 === line.length) {
|
|
510
510
|
continue;
|
|
511
511
|
}
|
|
512
|
-
firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !==
|
|
512
|
+
firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i;
|
|
513
513
|
lastNonEmptyLine = i;
|
|
514
514
|
if (i !== 0 && indent2 < commonIndent) {
|
|
515
515
|
commonIndent = indent2;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !==
|
|
518
|
+
return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
|
519
519
|
}
|
|
520
520
|
function leadingWhitespace(str) {
|
|
521
521
|
let i = 0;
|
|
@@ -584,7 +584,7 @@ function printBlockString(value, options) {
|
|
|
584
584
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
|
585
585
|
const hasTrailingSlash = value.endsWith("\\");
|
|
586
586
|
const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;
|
|
587
|
-
const printAsMultipleLines = !(options !== null && options !==
|
|
587
|
+
const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability
|
|
588
588
|
(!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes);
|
|
589
589
|
let result = "";
|
|
590
590
|
const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));
|
|
@@ -696,7 +696,7 @@ function isTrailingSurrogate(code) {
|
|
|
696
696
|
}
|
|
697
697
|
function printCodePointAt(lexer, location) {
|
|
698
698
|
const code = lexer.source.body.codePointAt(location);
|
|
699
|
-
if (code ===
|
|
699
|
+
if (code === void 0) {
|
|
700
700
|
return exports.TokenKind.EOF;
|
|
701
701
|
} else if (code >= 32 && code <= 126) {
|
|
702
702
|
const char = String.fromCodePoint(code);
|
|
@@ -1147,7 +1147,7 @@ var instanceOf = (
|
|
|
1147
1147
|
const className = constructor.prototype[Symbol.toStringTag];
|
|
1148
1148
|
const valueClassName = (
|
|
1149
1149
|
// We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
1150
|
-
Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor ===
|
|
1150
|
+
Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name
|
|
1151
1151
|
);
|
|
1152
1152
|
if (className === valueClassName) {
|
|
1153
1153
|
const stringifiedValue = inspect(value);
|
|
@@ -1319,7 +1319,7 @@ var Parser = class {
|
|
|
1319
1319
|
return this.node(start, {
|
|
1320
1320
|
kind: exports.Kind.OPERATION_DEFINITION,
|
|
1321
1321
|
operation: exports.OperationTypeNode.QUERY,
|
|
1322
|
-
name:
|
|
1322
|
+
name: void 0,
|
|
1323
1323
|
variableDefinitions: [],
|
|
1324
1324
|
directives: [],
|
|
1325
1325
|
selectionSet: this.parseSelectionSet()
|
|
@@ -1368,7 +1368,7 @@ var Parser = class {
|
|
|
1368
1368
|
kind: exports.Kind.VARIABLE_DEFINITION,
|
|
1369
1369
|
variable: this.parseVariable(),
|
|
1370
1370
|
type: (this.expectToken(exports.TokenKind.COLON), this.parseTypeReference()),
|
|
1371
|
-
defaultValue: this.expectOptionalToken(exports.TokenKind.EQUALS) ? this.parseConstValueLiteral() :
|
|
1371
|
+
defaultValue: this.expectOptionalToken(exports.TokenKind.EQUALS) ? this.parseConstValueLiteral() : void 0,
|
|
1372
1372
|
directives: this.parseConstDirectives()
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
@@ -1425,7 +1425,7 @@ var Parser = class {
|
|
|
1425
1425
|
name,
|
|
1426
1426
|
arguments: this.parseArguments(false),
|
|
1427
1427
|
directives: this.parseDirectives(false),
|
|
1428
|
-
selectionSet: this.peek(exports.TokenKind.BRACE_L) ? this.parseSelectionSet() :
|
|
1428
|
+
selectionSet: this.peek(exports.TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0
|
|
1429
1429
|
});
|
|
1430
1430
|
}
|
|
1431
1431
|
/**
|
|
@@ -1472,7 +1472,7 @@ var Parser = class {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
return this.node(start, {
|
|
1474
1474
|
kind: exports.Kind.INLINE_FRAGMENT,
|
|
1475
|
-
typeCondition: hasTypeCondition ? this.parseNamedType() :
|
|
1475
|
+
typeCondition: hasTypeCondition ? this.parseNamedType() : void 0,
|
|
1476
1476
|
directives: this.parseDirectives(false),
|
|
1477
1477
|
selectionSet: this.parseSelectionSet()
|
|
1478
1478
|
});
|
|
@@ -2313,7 +2313,7 @@ var Parser = class {
|
|
|
2313
2313
|
* Helper function for creating an error when an unexpected lexed token is encountered.
|
|
2314
2314
|
*/
|
|
2315
2315
|
unexpected(atToken) {
|
|
2316
|
-
const token = atToken !== null && atToken !==
|
|
2316
|
+
const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
|
|
2317
2317
|
return syntaxError(this._lexer.source, token.start, `Unexpected ${getTokenDesc(token)}.`);
|
|
2318
2318
|
}
|
|
2319
2319
|
/**
|
|
@@ -2376,7 +2376,7 @@ var Parser = class {
|
|
|
2376
2376
|
maxTokens
|
|
2377
2377
|
} = this._options;
|
|
2378
2378
|
const token = this._lexer.advance();
|
|
2379
|
-
if (maxTokens !==
|
|
2379
|
+
if (maxTokens !== void 0 && token.kind !== exports.TokenKind.EOF) {
|
|
2380
2380
|
++this._tokenCounter;
|
|
2381
2381
|
if (this._tokenCounter > maxTokens) {
|
|
2382
2382
|
throw syntaxError(this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`);
|
|
@@ -2395,7 +2395,7 @@ function getTokenKindDesc(kind) {
|
|
|
2395
2395
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/didYouMean.mjs
|
|
2396
2396
|
var MAX_SUGGESTIONS = 5;
|
|
2397
2397
|
function didYouMean(firstArg, secondArg) {
|
|
2398
|
-
const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [
|
|
2398
|
+
const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg];
|
|
2399
2399
|
let message = " Did you mean ";
|
|
2400
2400
|
if (subMessage) {
|
|
2401
2401
|
message += subMessage + " ";
|
|
@@ -2498,7 +2498,7 @@ function suggestionList(input, options) {
|
|
|
2498
2498
|
const threshold = Math.floor(input.length * 0.4) + 1;
|
|
2499
2499
|
for (const option of options) {
|
|
2500
2500
|
const distance = lexicalDistance.measure(option, threshold);
|
|
2501
|
-
if (distance !==
|
|
2501
|
+
if (distance !== void 0) {
|
|
2502
2502
|
optionsByDistance[option] = distance;
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
@@ -2532,7 +2532,7 @@ var LexicalDistance = class {
|
|
|
2532
2532
|
const aLength = a.length;
|
|
2533
2533
|
const bLength = b.length;
|
|
2534
2534
|
if (aLength - bLength > threshold) {
|
|
2535
|
-
return
|
|
2535
|
+
return void 0;
|
|
2536
2536
|
}
|
|
2537
2537
|
const rows = this._rows;
|
|
2538
2538
|
for (let j = 0; j <= bLength; j++) {
|
|
@@ -2562,11 +2562,11 @@ var LexicalDistance = class {
|
|
|
2562
2562
|
currentRow[j] = currentCell;
|
|
2563
2563
|
}
|
|
2564
2564
|
if (smallestCell > threshold) {
|
|
2565
|
-
return
|
|
2565
|
+
return void 0;
|
|
2566
2566
|
}
|
|
2567
2567
|
}
|
|
2568
2568
|
const distance = rows[aLength % 3][bLength];
|
|
2569
|
-
return distance <= threshold ? distance :
|
|
2569
|
+
return distance <= threshold ? distance : void 0;
|
|
2570
2570
|
}
|
|
2571
2571
|
};
|
|
2572
2572
|
function stringToArray(str) {
|
|
@@ -2776,14 +2776,14 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2776
2776
|
for (const kind of Object.values(exports.Kind)) {
|
|
2777
2777
|
enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
|
|
2778
2778
|
}
|
|
2779
|
-
let stack =
|
|
2779
|
+
let stack = void 0;
|
|
2780
2780
|
let inArray = Array.isArray(root);
|
|
2781
2781
|
let keys = [root];
|
|
2782
2782
|
let index = -1;
|
|
2783
2783
|
let edits = [];
|
|
2784
2784
|
let node = root;
|
|
2785
|
-
let key =
|
|
2786
|
-
let parent =
|
|
2785
|
+
let key = void 0;
|
|
2786
|
+
let parent = void 0;
|
|
2787
2787
|
const path = [];
|
|
2788
2788
|
const ancestors = [];
|
|
2789
2789
|
do {
|
|
@@ -2791,7 +2791,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2791
2791
|
const isLeaving = index === keys.length;
|
|
2792
2792
|
const isEdited = isLeaving && edits.length !== 0;
|
|
2793
2793
|
if (isLeaving) {
|
|
2794
|
-
key = ancestors.length === 0 ?
|
|
2794
|
+
key = ancestors.length === 0 ? void 0 : path[path.length - 1];
|
|
2795
2795
|
node = parent;
|
|
2796
2796
|
parent = ancestors.pop();
|
|
2797
2797
|
if (isEdited) {
|
|
@@ -2822,7 +2822,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2822
2822
|
} else if (parent) {
|
|
2823
2823
|
key = inArray ? index : keys[index];
|
|
2824
2824
|
node = parent[key];
|
|
2825
|
-
if (node === null || node ===
|
|
2825
|
+
if (node === null || node === void 0) {
|
|
2826
2826
|
continue;
|
|
2827
2827
|
}
|
|
2828
2828
|
path.push(key);
|
|
@@ -2831,8 +2831,8 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2831
2831
|
if (!Array.isArray(node)) {
|
|
2832
2832
|
var _enterLeaveMap$get, _enterLeaveMap$get2;
|
|
2833
2833
|
isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);
|
|
2834
|
-
const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get ===
|
|
2835
|
-
result = visitFn === null || visitFn ===
|
|
2834
|
+
const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
|
|
2835
|
+
result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
|
|
2836
2836
|
if (result === BREAK) {
|
|
2837
2837
|
break;
|
|
2838
2838
|
}
|
|
@@ -2841,7 +2841,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2841
2841
|
path.pop();
|
|
2842
2842
|
continue;
|
|
2843
2843
|
}
|
|
2844
|
-
} else if (result !==
|
|
2844
|
+
} else if (result !== void 0) {
|
|
2845
2845
|
edits.push([key, result]);
|
|
2846
2846
|
if (!isLeaving) {
|
|
2847
2847
|
if (isNode(result)) {
|
|
@@ -2853,7 +2853,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2853
2853
|
}
|
|
2854
2854
|
}
|
|
2855
2855
|
}
|
|
2856
|
-
if (result ===
|
|
2856
|
+
if (result === void 0 && isEdited) {
|
|
2857
2857
|
edits.push([key, node]);
|
|
2858
2858
|
}
|
|
2859
2859
|
if (isLeaving) {
|
|
@@ -2868,7 +2868,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2868
2868
|
prev: stack
|
|
2869
2869
|
};
|
|
2870
2870
|
inArray = Array.isArray(node);
|
|
2871
|
-
keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !==
|
|
2871
|
+
keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : [];
|
|
2872
2872
|
index = -1;
|
|
2873
2873
|
edits = [];
|
|
2874
2874
|
if (parent) {
|
|
@@ -2876,7 +2876,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
2876
2876
|
}
|
|
2877
2877
|
parent = node;
|
|
2878
2878
|
}
|
|
2879
|
-
} while (stack !==
|
|
2879
|
+
} while (stack !== void 0);
|
|
2880
2880
|
if (edits.length !== 0) {
|
|
2881
2881
|
return edits[edits.length - 1][1];
|
|
2882
2882
|
}
|
|
@@ -2887,8 +2887,8 @@ function visitInParallel(visitors) {
|
|
|
2887
2887
|
const mergedVisitor = /* @__PURE__ */ Object.create(null);
|
|
2888
2888
|
for (const kind of Object.values(exports.Kind)) {
|
|
2889
2889
|
let hasVisitor = false;
|
|
2890
|
-
const enterList = new Array(visitors.length).fill(
|
|
2891
|
-
const leaveList = new Array(visitors.length).fill(
|
|
2890
|
+
const enterList = new Array(visitors.length).fill(void 0);
|
|
2891
|
+
const leaveList = new Array(visitors.length).fill(void 0);
|
|
2892
2892
|
for (let i = 0; i < visitors.length; ++i) {
|
|
2893
2893
|
const {
|
|
2894
2894
|
enter,
|
|
@@ -2907,12 +2907,12 @@ function visitInParallel(visitors) {
|
|
|
2907
2907
|
for (let i = 0; i < visitors.length; i++) {
|
|
2908
2908
|
if (skipping[i] === null) {
|
|
2909
2909
|
var _enterList$i;
|
|
2910
|
-
const result = (_enterList$i = enterList[i]) === null || _enterList$i ===
|
|
2910
|
+
const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args);
|
|
2911
2911
|
if (result === false) {
|
|
2912
2912
|
skipping[i] = node;
|
|
2913
2913
|
} else if (result === BREAK) {
|
|
2914
2914
|
skipping[i] = BREAK;
|
|
2915
|
-
} else if (result !==
|
|
2915
|
+
} else if (result !== void 0) {
|
|
2916
2916
|
return result;
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
@@ -2923,10 +2923,10 @@ function visitInParallel(visitors) {
|
|
|
2923
2923
|
for (let i = 0; i < visitors.length; i++) {
|
|
2924
2924
|
if (skipping[i] === null) {
|
|
2925
2925
|
var _leaveList$i;
|
|
2926
|
-
const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i ===
|
|
2926
|
+
const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args);
|
|
2927
2927
|
if (result === BREAK) {
|
|
2928
2928
|
skipping[i] = BREAK;
|
|
2929
|
-
} else if (result !==
|
|
2929
|
+
} else if (result !== void 0 && result !== false) {
|
|
2930
2930
|
return result;
|
|
2931
2931
|
}
|
|
2932
2932
|
} else if (skipping[i] === node) {
|
|
@@ -2946,7 +2946,7 @@ function getEnterLeaveForKind(visitor, kind) {
|
|
|
2946
2946
|
} else if (typeof kindVisitor === "function") {
|
|
2947
2947
|
return {
|
|
2948
2948
|
enter: kindVisitor,
|
|
2949
|
-
leave:
|
|
2949
|
+
leave: void 0
|
|
2950
2950
|
};
|
|
2951
2951
|
}
|
|
2952
2952
|
return {
|
|
@@ -3264,7 +3264,7 @@ var printDocASTReducer = {
|
|
|
3264
3264
|
};
|
|
3265
3265
|
function join(maybeArray, separator = "") {
|
|
3266
3266
|
var _maybeArray$filter$jo;
|
|
3267
|
-
return (_maybeArray$filter$jo = maybeArray === null || maybeArray ===
|
|
3267
|
+
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
|
|
3268
3268
|
}
|
|
3269
3269
|
function block(array) {
|
|
3270
3270
|
return wrap("{\n", indent(join(array, "\n")), "\n}");
|
|
@@ -3277,7 +3277,7 @@ function indent(str) {
|
|
|
3277
3277
|
}
|
|
3278
3278
|
function hasMultilineItems(maybeArray) {
|
|
3279
3279
|
var _maybeArray$some;
|
|
3280
|
-
return (_maybeArray$some = maybeArray === null || maybeArray ===
|
|
3280
|
+
return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
|
|
3281
3281
|
}
|
|
3282
3282
|
|
|
3283
3283
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/valueFromASTUntyped.mjs
|
|
@@ -3298,7 +3298,7 @@ function valueFromASTUntyped(valueNode, variables) {
|
|
|
3298
3298
|
case exports.Kind.OBJECT:
|
|
3299
3299
|
return keyValMap(valueNode.fields, (field) => field.name.value, (field) => valueFromASTUntyped(field.value, variables));
|
|
3300
3300
|
case exports.Kind.VARIABLE:
|
|
3301
|
-
return variables === null || variables ===
|
|
3301
|
+
return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value];
|
|
3302
3302
|
}
|
|
3303
3303
|
}
|
|
3304
3304
|
|
|
@@ -3533,16 +3533,16 @@ function resolveObjMapThunk(thunk) {
|
|
|
3533
3533
|
var GraphQLScalarType = class {
|
|
3534
3534
|
constructor(config) {
|
|
3535
3535
|
var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN;
|
|
3536
|
-
const parseValue2 = (_config$parseValue = config.parseValue) !== null && _config$parseValue !==
|
|
3536
|
+
const parseValue2 = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc;
|
|
3537
3537
|
this.name = assertName(config.name);
|
|
3538
3538
|
this.description = config.description;
|
|
3539
3539
|
this.specifiedByURL = config.specifiedByURL;
|
|
3540
|
-
this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !==
|
|
3540
|
+
this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc;
|
|
3541
3541
|
this.parseValue = parseValue2;
|
|
3542
|
-
this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !==
|
|
3542
|
+
this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue2(valueFromASTUntyped(node, variables));
|
|
3543
3543
|
this.extensions = toObjMap(config.extensions);
|
|
3544
3544
|
this.astNode = config.astNode;
|
|
3545
|
-
this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !==
|
|
3545
|
+
this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
|
|
3546
3546
|
config.specifiedByURL == null || typeof config.specifiedByURL === "string" || devAssert(false, `${this.name} must provide "specifiedByURL" as a string, but got: ${inspect(config.specifiedByURL)}.`);
|
|
3547
3547
|
config.serialize == null || typeof config.serialize === "function" || devAssert(false, `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`);
|
|
3548
3548
|
if (config.parseLiteral) {
|
|
@@ -3580,7 +3580,7 @@ var GraphQLObjectType = class {
|
|
|
3580
3580
|
this.isTypeOf = config.isTypeOf;
|
|
3581
3581
|
this.extensions = toObjMap(config.extensions);
|
|
3582
3582
|
this.astNode = config.astNode;
|
|
3583
|
-
this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !==
|
|
3583
|
+
this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : [];
|
|
3584
3584
|
this._fields = () => defineFieldMap(config);
|
|
3585
3585
|
this._interfaces = () => defineInterfaces(config);
|
|
3586
3586
|
config.isTypeOf == null || typeof config.isTypeOf === "function" || devAssert(false, `${this.name} must provide "isTypeOf" as a function, but got: ${inspect(config.isTypeOf)}.`);
|
|
@@ -3621,7 +3621,7 @@ var GraphQLObjectType = class {
|
|
|
3621
3621
|
};
|
|
3622
3622
|
function defineInterfaces(config) {
|
|
3623
3623
|
var _config$interfaces;
|
|
3624
|
-
const interfaces = resolveReadonlyArrayThunk((_config$interfaces = config.interfaces) !== null && _config$interfaces !==
|
|
3624
|
+
const interfaces = resolveReadonlyArrayThunk((_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : []);
|
|
3625
3625
|
Array.isArray(interfaces) || devAssert(false, `${config.name} interfaces must be an Array or a function which returns an Array.`);
|
|
3626
3626
|
return interfaces;
|
|
3627
3627
|
}
|
|
@@ -3632,7 +3632,7 @@ function defineFieldMap(config) {
|
|
|
3632
3632
|
var _fieldConfig$args;
|
|
3633
3633
|
isPlainObj(fieldConfig) || devAssert(false, `${config.name}.${fieldName} field config must be an object.`);
|
|
3634
3634
|
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || devAssert(false, `${config.name}.${fieldName} field resolver must be a function if provided, but got: ${inspect(fieldConfig.resolve)}.`);
|
|
3635
|
-
const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !==
|
|
3635
|
+
const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
3636
3636
|
isPlainObj(argsConfig) || devAssert(false, `${config.name}.${fieldName} args must be an object with argument names as keys.`);
|
|
3637
3637
|
return {
|
|
3638
3638
|
name: assertName(fieldName),
|
|
@@ -3684,7 +3684,7 @@ function argsToArgsConfig(args) {
|
|
|
3684
3684
|
}));
|
|
3685
3685
|
}
|
|
3686
3686
|
function isRequiredArgument(arg) {
|
|
3687
|
-
return isNonNullType(arg.type) && arg.defaultValue ===
|
|
3687
|
+
return isNonNullType(arg.type) && arg.defaultValue === void 0;
|
|
3688
3688
|
}
|
|
3689
3689
|
var GraphQLInterfaceType = class {
|
|
3690
3690
|
constructor(config) {
|
|
@@ -3694,9 +3694,9 @@ var GraphQLInterfaceType = class {
|
|
|
3694
3694
|
this.resolveType = config.resolveType;
|
|
3695
3695
|
this.extensions = toObjMap(config.extensions);
|
|
3696
3696
|
this.astNode = config.astNode;
|
|
3697
|
-
this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !==
|
|
3698
|
-
this._fields = defineFieldMap.bind(
|
|
3699
|
-
this._interfaces = defineInterfaces.bind(
|
|
3697
|
+
this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : [];
|
|
3698
|
+
this._fields = defineFieldMap.bind(void 0, config);
|
|
3699
|
+
this._interfaces = defineInterfaces.bind(void 0, config);
|
|
3700
3700
|
config.resolveType == null || typeof config.resolveType === "function" || devAssert(false, `${this.name} must provide "resolveType" as a function, but got: ${inspect(config.resolveType)}.`);
|
|
3701
3701
|
}
|
|
3702
3702
|
get [Symbol.toStringTag]() {
|
|
@@ -3741,8 +3741,8 @@ var GraphQLUnionType = class {
|
|
|
3741
3741
|
this.resolveType = config.resolveType;
|
|
3742
3742
|
this.extensions = toObjMap(config.extensions);
|
|
3743
3743
|
this.astNode = config.astNode;
|
|
3744
|
-
this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !==
|
|
3745
|
-
this._types = defineTypes.bind(
|
|
3744
|
+
this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : [];
|
|
3745
|
+
this._types = defineTypes.bind(void 0, config);
|
|
3746
3746
|
config.resolveType == null || typeof config.resolveType === "function" || devAssert(false, `${this.name} must provide "resolveType" as a function, but got: ${inspect(config.resolveType)}.`);
|
|
3747
3747
|
}
|
|
3748
3748
|
get [Symbol.toStringTag]() {
|
|
@@ -3785,7 +3785,7 @@ var GraphQLEnumType = class {
|
|
|
3785
3785
|
this.description = config.description;
|
|
3786
3786
|
this.extensions = toObjMap(config.extensions);
|
|
3787
3787
|
this.astNode = config.astNode;
|
|
3788
|
-
this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !==
|
|
3788
|
+
this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : [];
|
|
3789
3789
|
this._values = defineEnumValues(this.name, config.values);
|
|
3790
3790
|
this._valueLookup = new Map(this._values.map((enumValue) => [enumValue.value, enumValue]));
|
|
3791
3791
|
this._nameLookup = keyMap(this._values, (value) => value.name);
|
|
@@ -3801,7 +3801,7 @@ var GraphQLEnumType = class {
|
|
|
3801
3801
|
}
|
|
3802
3802
|
serialize(outputValue) {
|
|
3803
3803
|
const enumValue = this._valueLookup.get(outputValue);
|
|
3804
|
-
if (enumValue ===
|
|
3804
|
+
if (enumValue === void 0) {
|
|
3805
3805
|
throw new GraphQLError(`Enum "${this.name}" cannot represent value: ${inspect(outputValue)}`);
|
|
3806
3806
|
}
|
|
3807
3807
|
return enumValue.name;
|
|
@@ -3869,7 +3869,7 @@ function defineEnumValues(typeName, valueMap) {
|
|
|
3869
3869
|
return {
|
|
3870
3870
|
name: assertEnumValueName(valueName),
|
|
3871
3871
|
description: valueConfig.description,
|
|
3872
|
-
value: valueConfig.value !==
|
|
3872
|
+
value: valueConfig.value !== void 0 ? valueConfig.value : valueName,
|
|
3873
3873
|
deprecationReason: valueConfig.deprecationReason,
|
|
3874
3874
|
extensions: toObjMap(valueConfig.extensions),
|
|
3875
3875
|
astNode: valueConfig.astNode
|
|
@@ -3883,8 +3883,8 @@ var GraphQLInputObjectType = class {
|
|
|
3883
3883
|
this.description = config.description;
|
|
3884
3884
|
this.extensions = toObjMap(config.extensions);
|
|
3885
3885
|
this.astNode = config.astNode;
|
|
3886
|
-
this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !==
|
|
3887
|
-
this._fields = defineInputFieldMap.bind(
|
|
3886
|
+
this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : [];
|
|
3887
|
+
this._fields = defineInputFieldMap.bind(void 0, config);
|
|
3888
3888
|
}
|
|
3889
3889
|
get [Symbol.toStringTag]() {
|
|
3890
3890
|
return "GraphQLInputObjectType";
|
|
@@ -3937,7 +3937,7 @@ function defineInputFieldMap(config) {
|
|
|
3937
3937
|
});
|
|
3938
3938
|
}
|
|
3939
3939
|
function isRequiredInputField(field) {
|
|
3940
|
-
return isNonNullType(field.type) && field.defaultValue ===
|
|
3940
|
+
return isNonNullType(field.type) && field.defaultValue === void 0;
|
|
3941
3941
|
}
|
|
3942
3942
|
|
|
3943
3943
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/typeComparators.mjs
|
|
@@ -4197,11 +4197,11 @@ var GraphQLDirective = class {
|
|
|
4197
4197
|
this.name = assertName(config.name);
|
|
4198
4198
|
this.description = config.description;
|
|
4199
4199
|
this.locations = config.locations;
|
|
4200
|
-
this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !==
|
|
4200
|
+
this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
4201
4201
|
this.extensions = toObjMap(config.extensions);
|
|
4202
4202
|
this.astNode = config.astNode;
|
|
4203
4203
|
Array.isArray(config.locations) || devAssert(false, `@${config.name} locations must be an Array.`);
|
|
4204
|
-
const args = (_config$args = config.args) !== null && _config$args !==
|
|
4204
|
+
const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
4205
4205
|
isObjectLike(args) && !Array.isArray(args) || devAssert(false, `@${config.name} args must be an object with argument names as keys.`);
|
|
4206
4206
|
this.args = defineArguments(args);
|
|
4207
4207
|
}
|
|
@@ -4281,14 +4281,14 @@ function isSpecifiedDirective(directive) {
|
|
|
4281
4281
|
|
|
4282
4282
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isIterableObject.mjs
|
|
4283
4283
|
function isIterableObject(maybeIterable) {
|
|
4284
|
-
return typeof maybeIterable === "object" && typeof (maybeIterable === null || maybeIterable ===
|
|
4284
|
+
return typeof maybeIterable === "object" && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === "function";
|
|
4285
4285
|
}
|
|
4286
4286
|
|
|
4287
4287
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/astFromValue.mjs
|
|
4288
4288
|
function astFromValue(value, type) {
|
|
4289
4289
|
if (isNonNullType(type)) {
|
|
4290
4290
|
const astValue = astFromValue(value, type.ofType);
|
|
4291
|
-
if ((astValue === null || astValue ===
|
|
4291
|
+
if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === exports.Kind.NULL) {
|
|
4292
4292
|
return null;
|
|
4293
4293
|
}
|
|
4294
4294
|
return astValue;
|
|
@@ -4298,7 +4298,7 @@ function astFromValue(value, type) {
|
|
|
4298
4298
|
kind: exports.Kind.NULL
|
|
4299
4299
|
};
|
|
4300
4300
|
}
|
|
4301
|
-
if (value ===
|
|
4301
|
+
if (value === void 0) {
|
|
4302
4302
|
return null;
|
|
4303
4303
|
}
|
|
4304
4304
|
if (isListType(type)) {
|
|
@@ -4578,18 +4578,18 @@ var __Type = new GraphQLObjectType({
|
|
|
4578
4578
|
},
|
|
4579
4579
|
name: {
|
|
4580
4580
|
type: GraphQLString,
|
|
4581
|
-
resolve: (type) => "name" in type ? type.name :
|
|
4581
|
+
resolve: (type) => "name" in type ? type.name : void 0
|
|
4582
4582
|
},
|
|
4583
4583
|
description: {
|
|
4584
4584
|
type: GraphQLString,
|
|
4585
4585
|
resolve: (type) => (
|
|
4586
4586
|
/* c8 ignore next */
|
|
4587
|
-
"description" in type ? type.description :
|
|
4587
|
+
"description" in type ? type.description : void 0
|
|
4588
4588
|
)
|
|
4589
4589
|
},
|
|
4590
4590
|
specifiedByURL: {
|
|
4591
4591
|
type: GraphQLString,
|
|
4592
|
-
resolve: (obj) => "specifiedByURL" in obj ? obj.specifiedByURL :
|
|
4592
|
+
resolve: (obj) => "specifiedByURL" in obj ? obj.specifiedByURL : void 0
|
|
4593
4593
|
},
|
|
4594
4594
|
fields: {
|
|
4595
4595
|
type: new GraphQLList(new GraphQLNonNull(__Field)),
|
|
@@ -4662,7 +4662,7 @@ var __Type = new GraphQLObjectType({
|
|
|
4662
4662
|
},
|
|
4663
4663
|
ofType: {
|
|
4664
4664
|
type: __Type,
|
|
4665
|
-
resolve: (type) => "ofType" in type ? type.ofType :
|
|
4665
|
+
resolve: (type) => "ofType" in type ? type.ofType : void 0
|
|
4666
4666
|
}
|
|
4667
4667
|
})
|
|
4668
4668
|
});
|
|
@@ -4823,9 +4823,9 @@ var SchemaMetaFieldDef = {
|
|
|
4823
4823
|
resolve: (_source, _args, _context, {
|
|
4824
4824
|
schema
|
|
4825
4825
|
}) => schema,
|
|
4826
|
-
deprecationReason:
|
|
4826
|
+
deprecationReason: void 0,
|
|
4827
4827
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
4828
|
-
astNode:
|
|
4828
|
+
astNode: void 0
|
|
4829
4829
|
};
|
|
4830
4830
|
var TypeMetaFieldDef = {
|
|
4831
4831
|
name: "__type",
|
|
@@ -4833,21 +4833,21 @@ var TypeMetaFieldDef = {
|
|
|
4833
4833
|
description: "Request the type information of a single type.",
|
|
4834
4834
|
args: [{
|
|
4835
4835
|
name: "name",
|
|
4836
|
-
description:
|
|
4836
|
+
description: void 0,
|
|
4837
4837
|
type: new GraphQLNonNull(GraphQLString),
|
|
4838
|
-
defaultValue:
|
|
4839
|
-
deprecationReason:
|
|
4838
|
+
defaultValue: void 0,
|
|
4839
|
+
deprecationReason: void 0,
|
|
4840
4840
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
4841
|
-
astNode:
|
|
4841
|
+
astNode: void 0
|
|
4842
4842
|
}],
|
|
4843
4843
|
resolve: (_source, {
|
|
4844
4844
|
name
|
|
4845
4845
|
}, _context, {
|
|
4846
4846
|
schema
|
|
4847
4847
|
}) => schema.getType(name),
|
|
4848
|
-
deprecationReason:
|
|
4848
|
+
deprecationReason: void 0,
|
|
4849
4849
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
4850
|
-
astNode:
|
|
4850
|
+
astNode: void 0
|
|
4851
4851
|
};
|
|
4852
4852
|
var TypeNameMetaFieldDef = {
|
|
4853
4853
|
name: "__typename",
|
|
@@ -4857,9 +4857,9 @@ var TypeNameMetaFieldDef = {
|
|
|
4857
4857
|
resolve: (_source, _args, _context, {
|
|
4858
4858
|
parentType
|
|
4859
4859
|
}) => parentType.name,
|
|
4860
|
-
deprecationReason:
|
|
4860
|
+
deprecationReason: void 0,
|
|
4861
4861
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
4862
|
-
astNode:
|
|
4862
|
+
astNode: void 0
|
|
4863
4863
|
};
|
|
4864
4864
|
var introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]);
|
|
4865
4865
|
function isIntrospectionType(type) {
|
|
@@ -4882,18 +4882,18 @@ var GraphQLSchema = class {
|
|
|
4882
4882
|
// Used as a cache for validateSchema().
|
|
4883
4883
|
constructor(config) {
|
|
4884
4884
|
var _config$extensionASTN, _config$directives;
|
|
4885
|
-
this.__validationErrors = config.assumeValid === true ? [] :
|
|
4885
|
+
this.__validationErrors = config.assumeValid === true ? [] : void 0;
|
|
4886
4886
|
isObjectLike(config) || devAssert(false, "Must provide configuration object.");
|
|
4887
4887
|
!config.types || Array.isArray(config.types) || devAssert(false, `"types" must be Array if provided but got: ${inspect(config.types)}.`);
|
|
4888
4888
|
!config.directives || Array.isArray(config.directives) || devAssert(false, `"directives" must be Array if provided but got: ${inspect(config.directives)}.`);
|
|
4889
4889
|
this.description = config.description;
|
|
4890
4890
|
this.extensions = toObjMap(config.extensions);
|
|
4891
4891
|
this.astNode = config.astNode;
|
|
4892
|
-
this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !==
|
|
4892
|
+
this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
|
|
4893
4893
|
this._queryType = config.query;
|
|
4894
4894
|
this._mutationType = config.mutation;
|
|
4895
4895
|
this._subscriptionType = config.subscription;
|
|
4896
|
-
this._directives = (_config$directives = config.directives) !== null && _config$directives !==
|
|
4896
|
+
this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : specifiedDirectives;
|
|
4897
4897
|
const allReferencedTypes = new Set(config.types);
|
|
4898
4898
|
if (config.types != null) {
|
|
4899
4899
|
for (const type of config.types) {
|
|
@@ -4927,7 +4927,7 @@ var GraphQLSchema = class {
|
|
|
4927
4927
|
}
|
|
4928
4928
|
const typeName = namedType.name;
|
|
4929
4929
|
typeName || devAssert(false, "One of the provided types for building the Schema is missing a name.");
|
|
4930
|
-
if (this._typeMap[typeName] !==
|
|
4930
|
+
if (this._typeMap[typeName] !== void 0) {
|
|
4931
4931
|
throw new Error(`Schema must contain uniquely named types but contains multiple types named "${typeName}".`);
|
|
4932
4932
|
}
|
|
4933
4933
|
this._typeMap[typeName] = namedType;
|
|
@@ -4935,7 +4935,7 @@ var GraphQLSchema = class {
|
|
|
4935
4935
|
for (const iface of namedType.getInterfaces()) {
|
|
4936
4936
|
if (isInterfaceType(iface)) {
|
|
4937
4937
|
let implementations = this._implementationsMap[iface.name];
|
|
4938
|
-
if (implementations ===
|
|
4938
|
+
if (implementations === void 0) {
|
|
4939
4939
|
implementations = this._implementationsMap[iface.name] = {
|
|
4940
4940
|
objects: [],
|
|
4941
4941
|
interfaces: []
|
|
@@ -4948,7 +4948,7 @@ var GraphQLSchema = class {
|
|
|
4948
4948
|
for (const iface of namedType.getInterfaces()) {
|
|
4949
4949
|
if (isInterfaceType(iface)) {
|
|
4950
4950
|
let implementations = this._implementationsMap[iface.name];
|
|
4951
|
-
if (implementations ===
|
|
4951
|
+
if (implementations === void 0) {
|
|
4952
4952
|
implementations = this._implementationsMap[iface.name] = {
|
|
4953
4953
|
objects: [],
|
|
4954
4954
|
interfaces: []
|
|
@@ -4993,14 +4993,14 @@ var GraphQLSchema = class {
|
|
|
4993
4993
|
}
|
|
4994
4994
|
getImplementations(interfaceType) {
|
|
4995
4995
|
const implementations = this._implementationsMap[interfaceType.name];
|
|
4996
|
-
return implementations !== null && implementations !==
|
|
4996
|
+
return implementations !== null && implementations !== void 0 ? implementations : {
|
|
4997
4997
|
objects: [],
|
|
4998
4998
|
interfaces: []
|
|
4999
4999
|
};
|
|
5000
5000
|
}
|
|
5001
5001
|
isSubType(abstractType, maybeSubType) {
|
|
5002
5002
|
let map = this._subTypeMap[abstractType.name];
|
|
5003
|
-
if (map ===
|
|
5003
|
+
if (map === void 0) {
|
|
5004
5004
|
map = /* @__PURE__ */ Object.create(null);
|
|
5005
5005
|
if (isUnionType(abstractType)) {
|
|
5006
5006
|
for (const type of abstractType.getTypes()) {
|
|
@@ -5017,7 +5017,7 @@ var GraphQLSchema = class {
|
|
|
5017
5017
|
}
|
|
5018
5018
|
this._subTypeMap[abstractType.name] = map;
|
|
5019
5019
|
}
|
|
5020
|
-
return map[maybeSubType.name] !==
|
|
5020
|
+
return map[maybeSubType.name] !== void 0;
|
|
5021
5021
|
}
|
|
5022
5022
|
getDirectives() {
|
|
5023
5023
|
return this._directives;
|
|
@@ -5036,7 +5036,7 @@ var GraphQLSchema = class {
|
|
|
5036
5036
|
extensions: this.extensions,
|
|
5037
5037
|
astNode: this.astNode,
|
|
5038
5038
|
extensionASTNodes: this.extensionASTNodes,
|
|
5039
|
-
assumeValid: this.__validationErrors !==
|
|
5039
|
+
assumeValid: this.__validationErrors !== void 0
|
|
5040
5040
|
};
|
|
5041
5041
|
}
|
|
5042
5042
|
};
|
|
@@ -5109,17 +5109,17 @@ function validateRootTypes(context) {
|
|
|
5109
5109
|
context.reportError("Query root type must be provided.", schema.astNode);
|
|
5110
5110
|
} else if (!isObjectType(queryType)) {
|
|
5111
5111
|
var _getOperationTypeNode;
|
|
5112
|
-
context.reportError(`Query root type must be Object type, it cannot be ${inspect(queryType)}.`, (_getOperationTypeNode = getOperationTypeNode(schema, exports.OperationTypeNode.QUERY)) !== null && _getOperationTypeNode !==
|
|
5112
|
+
context.reportError(`Query root type must be Object type, it cannot be ${inspect(queryType)}.`, (_getOperationTypeNode = getOperationTypeNode(schema, exports.OperationTypeNode.QUERY)) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);
|
|
5113
5113
|
}
|
|
5114
5114
|
const mutationType = schema.getMutationType();
|
|
5115
5115
|
if (mutationType && !isObjectType(mutationType)) {
|
|
5116
5116
|
var _getOperationTypeNode2;
|
|
5117
|
-
context.reportError(`Mutation root type must be Object type if provided, it cannot be ${inspect(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode(schema, exports.OperationTypeNode.MUTATION)) !== null && _getOperationTypeNode2 !==
|
|
5117
|
+
context.reportError(`Mutation root type must be Object type if provided, it cannot be ${inspect(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode(schema, exports.OperationTypeNode.MUTATION)) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);
|
|
5118
5118
|
}
|
|
5119
5119
|
const subscriptionType = schema.getSubscriptionType();
|
|
5120
5120
|
if (subscriptionType && !isObjectType(subscriptionType)) {
|
|
5121
5121
|
var _getOperationTypeNode3;
|
|
5122
|
-
context.reportError(`Subscription root type must be Object type if provided, it cannot be ${inspect(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode(schema, exports.OperationTypeNode.SUBSCRIPTION)) !== null && _getOperationTypeNode3 !==
|
|
5122
|
+
context.reportError(`Subscription root type must be Object type if provided, it cannot be ${inspect(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode(schema, exports.OperationTypeNode.SUBSCRIPTION)) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);
|
|
5123
5123
|
}
|
|
5124
5124
|
}
|
|
5125
5125
|
function getOperationTypeNode(schema, operation) {
|
|
@@ -5130,15 +5130,15 @@ function getOperationTypeNode(schema, operation) {
|
|
|
5130
5130
|
var _schemaNode$operation;
|
|
5131
5131
|
return (
|
|
5132
5132
|
/* c8 ignore next */
|
|
5133
|
-
(_schemaNode$operation = schemaNode === null || schemaNode ===
|
|
5133
|
+
(_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : []
|
|
5134
5134
|
);
|
|
5135
5135
|
}
|
|
5136
|
-
).find((operationNode) => operationNode.operation === operation)) === null || _flatMap$find ===
|
|
5136
|
+
).find((operationNode) => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type;
|
|
5137
5137
|
}
|
|
5138
5138
|
function validateDirectives(context) {
|
|
5139
5139
|
for (const directive of context.schema.getDirectives()) {
|
|
5140
5140
|
if (!isDirective(directive)) {
|
|
5141
|
-
context.reportError(`Expected directive but got: ${inspect(directive)}.`, directive === null || directive ===
|
|
5141
|
+
context.reportError(`Expected directive but got: ${inspect(directive)}.`, directive === null || directive === void 0 ? void 0 : directive.astNode);
|
|
5142
5142
|
continue;
|
|
5143
5143
|
}
|
|
5144
5144
|
validateName(context, directive);
|
|
@@ -5149,7 +5149,7 @@ function validateDirectives(context) {
|
|
|
5149
5149
|
}
|
|
5150
5150
|
if (isRequiredArgument(arg) && arg.deprecationReason != null) {
|
|
5151
5151
|
var _arg$astNode;
|
|
5152
|
-
context.reportError(`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode ===
|
|
5152
|
+
context.reportError(`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]);
|
|
5153
5153
|
}
|
|
5154
5154
|
}
|
|
5155
5155
|
}
|
|
@@ -5195,18 +5195,18 @@ function validateFields(context, type) {
|
|
|
5195
5195
|
validateName(context, field);
|
|
5196
5196
|
if (!isOutputType(field.type)) {
|
|
5197
5197
|
var _field$astNode;
|
|
5198
|
-
context.reportError(`The type of ${type.name}.${field.name} must be Output Type but got: ${inspect(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode ===
|
|
5198
|
+
context.reportError(`The type of ${type.name}.${field.name} must be Output Type but got: ${inspect(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);
|
|
5199
5199
|
}
|
|
5200
5200
|
for (const arg of field.args) {
|
|
5201
5201
|
const argName = arg.name;
|
|
5202
5202
|
validateName(context, arg);
|
|
5203
5203
|
if (!isInputType(arg.type)) {
|
|
5204
5204
|
var _arg$astNode2;
|
|
5205
|
-
context.reportError(`The type of ${type.name}.${field.name}(${argName}:) must be Input Type but got: ${inspect(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 ===
|
|
5205
|
+
context.reportError(`The type of ${type.name}.${field.name}(${argName}:) must be Input Type but got: ${inspect(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);
|
|
5206
5206
|
}
|
|
5207
5207
|
if (isRequiredArgument(arg) && arg.deprecationReason != null) {
|
|
5208
5208
|
var _arg$astNode3;
|
|
5209
|
-
context.reportError(`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 ===
|
|
5209
|
+
context.reportError(`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]);
|
|
5210
5210
|
}
|
|
5211
5211
|
}
|
|
5212
5212
|
}
|
|
@@ -5242,7 +5242,7 @@ function validateTypeImplementsInterface(context, type, iface) {
|
|
|
5242
5242
|
}
|
|
5243
5243
|
if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) {
|
|
5244
5244
|
var _ifaceField$astNode, _typeField$astNode;
|
|
5245
|
-
context.reportError(`Interface field ${iface.name}.${fieldName} expects type ${inspect(ifaceField.type)} but ${type.name}.${fieldName} is type ${inspect(typeField.type)}.`, [(_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode ===
|
|
5245
|
+
context.reportError(`Interface field ${iface.name}.${fieldName} expects type ${inspect(ifaceField.type)} but ${type.name}.${fieldName} is type ${inspect(typeField.type)}.`, [(_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]);
|
|
5246
5246
|
}
|
|
5247
5247
|
for (const ifaceArg of ifaceField.args) {
|
|
5248
5248
|
const argName = ifaceArg.name;
|
|
@@ -5253,7 +5253,7 @@ function validateTypeImplementsInterface(context, type, iface) {
|
|
|
5253
5253
|
}
|
|
5254
5254
|
if (!isEqualType(ifaceArg.type, typeArg.type)) {
|
|
5255
5255
|
var _ifaceArg$astNode, _typeArg$astNode;
|
|
5256
|
-
context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) expects type ${inspect(ifaceArg.type)} but ${type.name}.${fieldName}(${argName}:) is type ${inspect(typeArg.type)}.`, [(_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode ===
|
|
5256
|
+
context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) expects type ${inspect(ifaceArg.type)} but ${type.name}.${fieldName}(${argName}:) is type ${inspect(typeArg.type)}.`, [(_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]);
|
|
5257
5257
|
}
|
|
5258
5258
|
}
|
|
5259
5259
|
for (const typeArg of typeField.args) {
|
|
@@ -5308,11 +5308,11 @@ function validateInputFields(context, inputObj) {
|
|
|
5308
5308
|
validateName(context, field);
|
|
5309
5309
|
if (!isInputType(field.type)) {
|
|
5310
5310
|
var _field$astNode2;
|
|
5311
|
-
context.reportError(`The type of ${inputObj.name}.${field.name} must be Input Type but got: ${inspect(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 ===
|
|
5311
|
+
context.reportError(`The type of ${inputObj.name}.${field.name} must be Input Type but got: ${inspect(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);
|
|
5312
5312
|
}
|
|
5313
5313
|
if (isRequiredInputField(field) && field.deprecationReason != null) {
|
|
5314
5314
|
var _field$astNode3;
|
|
5315
|
-
context.reportError(`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 ===
|
|
5315
|
+
context.reportError(`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]);
|
|
5316
5316
|
}
|
|
5317
5317
|
}
|
|
5318
5318
|
}
|
|
@@ -5333,7 +5333,7 @@ function createInputObjectCircularRefsValidator(context) {
|
|
|
5333
5333
|
const fieldType = field.type.ofType;
|
|
5334
5334
|
const cycleIndex = fieldPathIndexByTypeName[fieldType.name];
|
|
5335
5335
|
fieldPath.push(field);
|
|
5336
|
-
if (cycleIndex ===
|
|
5336
|
+
if (cycleIndex === void 0) {
|
|
5337
5337
|
detectCycleRecursive(fieldType);
|
|
5338
5338
|
} else {
|
|
5339
5339
|
const cyclePath = fieldPath.slice(cycleIndex);
|
|
@@ -5343,7 +5343,7 @@ function createInputObjectCircularRefsValidator(context) {
|
|
|
5343
5343
|
fieldPath.pop();
|
|
5344
5344
|
}
|
|
5345
5345
|
}
|
|
5346
|
-
fieldPathIndexByTypeName[inputObj.name] =
|
|
5346
|
+
fieldPathIndexByTypeName[inputObj.name] = void 0;
|
|
5347
5347
|
}
|
|
5348
5348
|
}
|
|
5349
5349
|
function getAllImplementsInterfaceNodes(type, iface) {
|
|
@@ -5356,7 +5356,7 @@ function getAllImplementsInterfaceNodes(type, iface) {
|
|
|
5356
5356
|
var _typeNode$interfaces;
|
|
5357
5357
|
return (
|
|
5358
5358
|
/* c8 ignore next */
|
|
5359
|
-
(_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !==
|
|
5359
|
+
(_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : []
|
|
5360
5360
|
);
|
|
5361
5361
|
}).filter((ifaceNode) => ifaceNode.name.value === iface.name);
|
|
5362
5362
|
}
|
|
@@ -5370,13 +5370,13 @@ function getUnionMemberTypeNodes(union, typeName) {
|
|
|
5370
5370
|
var _unionNode$types;
|
|
5371
5371
|
return (
|
|
5372
5372
|
/* c8 ignore next */
|
|
5373
|
-
(_unionNode$types = unionNode.types) !== null && _unionNode$types !==
|
|
5373
|
+
(_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : []
|
|
5374
5374
|
);
|
|
5375
5375
|
}).filter((typeNode) => typeNode.name.value === typeName);
|
|
5376
5376
|
}
|
|
5377
5377
|
function getDeprecatedDirectiveNode(definitionNode) {
|
|
5378
5378
|
var _definitionNode$direc;
|
|
5379
|
-
return definitionNode === null || definitionNode ===
|
|
5379
|
+
return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find((node) => node.name.value === GraphQLDeprecatedDirective.name);
|
|
5380
5380
|
}
|
|
5381
5381
|
|
|
5382
5382
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/typeFromAST.mjs
|
|
@@ -5407,7 +5407,7 @@ var TypeInfo = class {
|
|
|
5407
5407
|
this._directive = null;
|
|
5408
5408
|
this._argument = null;
|
|
5409
5409
|
this._enumValue = null;
|
|
5410
|
-
this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !==
|
|
5410
|
+
this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef;
|
|
5411
5411
|
if (initialType) {
|
|
5412
5412
|
if (isInputType(initialType)) {
|
|
5413
5413
|
this._inputTypeStack.push(initialType);
|
|
@@ -5467,7 +5467,7 @@ var TypeInfo = class {
|
|
|
5467
5467
|
switch (node.kind) {
|
|
5468
5468
|
case exports.Kind.SELECTION_SET: {
|
|
5469
5469
|
const namedType = getNamedType(this.getType());
|
|
5470
|
-
this._parentTypeStack.push(isCompositeType(namedType) ? namedType :
|
|
5470
|
+
this._parentTypeStack.push(isCompositeType(namedType) ? namedType : void 0);
|
|
5471
5471
|
break;
|
|
5472
5472
|
}
|
|
5473
5473
|
case exports.Kind.FIELD: {
|
|
@@ -5481,7 +5481,7 @@ var TypeInfo = class {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
}
|
|
5483
5483
|
this._fieldDefStack.push(fieldDef);
|
|
5484
|
-
this._typeStack.push(isOutputType(fieldType) ? fieldType :
|
|
5484
|
+
this._typeStack.push(isOutputType(fieldType) ? fieldType : void 0);
|
|
5485
5485
|
break;
|
|
5486
5486
|
}
|
|
5487
5487
|
case exports.Kind.DIRECTIVE:
|
|
@@ -5489,26 +5489,26 @@ var TypeInfo = class {
|
|
|
5489
5489
|
break;
|
|
5490
5490
|
case exports.Kind.OPERATION_DEFINITION: {
|
|
5491
5491
|
const rootType = schema.getRootType(node.operation);
|
|
5492
|
-
this._typeStack.push(isObjectType(rootType) ? rootType :
|
|
5492
|
+
this._typeStack.push(isObjectType(rootType) ? rootType : void 0);
|
|
5493
5493
|
break;
|
|
5494
5494
|
}
|
|
5495
5495
|
case exports.Kind.INLINE_FRAGMENT:
|
|
5496
5496
|
case exports.Kind.FRAGMENT_DEFINITION: {
|
|
5497
5497
|
const typeConditionAST = node.typeCondition;
|
|
5498
5498
|
const outputType = typeConditionAST ? typeFromAST(schema, typeConditionAST) : getNamedType(this.getType());
|
|
5499
|
-
this._typeStack.push(isOutputType(outputType) ? outputType :
|
|
5499
|
+
this._typeStack.push(isOutputType(outputType) ? outputType : void 0);
|
|
5500
5500
|
break;
|
|
5501
5501
|
}
|
|
5502
5502
|
case exports.Kind.VARIABLE_DEFINITION: {
|
|
5503
5503
|
const inputType = typeFromAST(schema, node.type);
|
|
5504
|
-
this._inputTypeStack.push(isInputType(inputType) ? inputType :
|
|
5504
|
+
this._inputTypeStack.push(isInputType(inputType) ? inputType : void 0);
|
|
5505
5505
|
break;
|
|
5506
5506
|
}
|
|
5507
5507
|
case exports.Kind.ARGUMENT: {
|
|
5508
5508
|
var _this$getDirective;
|
|
5509
5509
|
let argDef;
|
|
5510
5510
|
let argType;
|
|
5511
|
-
const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !==
|
|
5511
|
+
const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef();
|
|
5512
5512
|
if (fieldOrDirective) {
|
|
5513
5513
|
argDef = fieldOrDirective.args.find((arg) => arg.name === node.name.value);
|
|
5514
5514
|
if (argDef) {
|
|
@@ -5516,15 +5516,15 @@ var TypeInfo = class {
|
|
|
5516
5516
|
}
|
|
5517
5517
|
}
|
|
5518
5518
|
this._argument = argDef;
|
|
5519
|
-
this._defaultValueStack.push(argDef ? argDef.defaultValue :
|
|
5520
|
-
this._inputTypeStack.push(isInputType(argType) ? argType :
|
|
5519
|
+
this._defaultValueStack.push(argDef ? argDef.defaultValue : void 0);
|
|
5520
|
+
this._inputTypeStack.push(isInputType(argType) ? argType : void 0);
|
|
5521
5521
|
break;
|
|
5522
5522
|
}
|
|
5523
5523
|
case exports.Kind.LIST: {
|
|
5524
5524
|
const listType = getNullableType(this.getInputType());
|
|
5525
5525
|
const itemType = isListType(listType) ? listType.ofType : listType;
|
|
5526
|
-
this._defaultValueStack.push(
|
|
5527
|
-
this._inputTypeStack.push(isInputType(itemType) ? itemType :
|
|
5526
|
+
this._defaultValueStack.push(void 0);
|
|
5527
|
+
this._inputTypeStack.push(isInputType(itemType) ? itemType : void 0);
|
|
5528
5528
|
break;
|
|
5529
5529
|
}
|
|
5530
5530
|
case exports.Kind.OBJECT_FIELD: {
|
|
@@ -5537,8 +5537,8 @@ var TypeInfo = class {
|
|
|
5537
5537
|
inputFieldType = inputField.type;
|
|
5538
5538
|
}
|
|
5539
5539
|
}
|
|
5540
|
-
this._defaultValueStack.push(inputField ? inputField.defaultValue :
|
|
5541
|
-
this._inputTypeStack.push(isInputType(inputFieldType) ? inputFieldType :
|
|
5540
|
+
this._defaultValueStack.push(inputField ? inputField.defaultValue : void 0);
|
|
5541
|
+
this._inputTypeStack.push(isInputType(inputFieldType) ? inputFieldType : void 0);
|
|
5542
5542
|
break;
|
|
5543
5543
|
}
|
|
5544
5544
|
case exports.Kind.ENUM: {
|
|
@@ -5611,7 +5611,7 @@ function visitWithTypeInfo(typeInfo, visitor) {
|
|
|
5611
5611
|
const fn = getEnterLeaveForKind(visitor, node.kind).enter;
|
|
5612
5612
|
if (fn) {
|
|
5613
5613
|
const result = fn.apply(visitor, args);
|
|
5614
|
-
if (result !==
|
|
5614
|
+
if (result !== void 0) {
|
|
5615
5615
|
typeInfo.leave(node);
|
|
5616
5616
|
if (isNode(result)) {
|
|
5617
5617
|
typeInfo.enter(result);
|
|
@@ -5722,7 +5722,7 @@ function getSuggestedTypeNames(schema, type, fieldName) {
|
|
|
5722
5722
|
continue;
|
|
5723
5723
|
}
|
|
5724
5724
|
suggestedTypes.add(possibleInterface);
|
|
5725
|
-
usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !==
|
|
5725
|
+
usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;
|
|
5726
5726
|
}
|
|
5727
5727
|
}
|
|
5728
5728
|
return [...suggestedTypes].sort((typeA, typeB) => {
|
|
@@ -5805,7 +5805,7 @@ function KnownArgumentNamesOnDirectivesRule(context) {
|
|
|
5805
5805
|
for (const def of astDefinitions) {
|
|
5806
5806
|
if (def.kind === exports.Kind.DIRECTIVE_DEFINITION) {
|
|
5807
5807
|
var _def$arguments;
|
|
5808
|
-
const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !==
|
|
5808
|
+
const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
|
|
5809
5809
|
directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value);
|
|
5810
5810
|
}
|
|
5811
5811
|
}
|
|
@@ -5954,7 +5954,7 @@ function KnownTypeNamesRule(context) {
|
|
|
5954
5954
|
const typeName = node.name.value;
|
|
5955
5955
|
if (!existingTypesMap[typeName] && !definedTypes[typeName]) {
|
|
5956
5956
|
var _ancestors$;
|
|
5957
|
-
const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !==
|
|
5957
|
+
const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent;
|
|
5958
5958
|
const isSDL = definitionNode != null && isSDLNode(definitionNode);
|
|
5959
5959
|
if (isSDL && standardTypeNames.includes(typeName)) {
|
|
5960
5960
|
return;
|
|
@@ -5993,7 +5993,7 @@ function LoneAnonymousOperationRule(context) {
|
|
|
5993
5993
|
function LoneSchemaDefinitionRule(context) {
|
|
5994
5994
|
var _ref, _ref2, _oldSchema$astNode;
|
|
5995
5995
|
const oldSchema = context.getSchema();
|
|
5996
|
-
const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema ===
|
|
5996
|
+
const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType();
|
|
5997
5997
|
let schemaDefinitionsCount = 0;
|
|
5998
5998
|
return {
|
|
5999
5999
|
SchemaDefinition(node) {
|
|
@@ -6040,7 +6040,7 @@ function NoFragmentCyclesRule(context) {
|
|
|
6040
6040
|
const spreadName = spreadNode.name.value;
|
|
6041
6041
|
const cycleIndex = spreadPathIndexByName[spreadName];
|
|
6042
6042
|
spreadPath.push(spreadNode);
|
|
6043
|
-
if (cycleIndex ===
|
|
6043
|
+
if (cycleIndex === void 0) {
|
|
6044
6044
|
const spreadFragment = context.getFragment(spreadName);
|
|
6045
6045
|
if (spreadFragment) {
|
|
6046
6046
|
detectCycleRecursive(spreadFragment);
|
|
@@ -6054,7 +6054,7 @@ function NoFragmentCyclesRule(context) {
|
|
|
6054
6054
|
}
|
|
6055
6055
|
spreadPath.pop();
|
|
6056
6056
|
}
|
|
6057
|
-
spreadPathIndexByName[fragmentName] =
|
|
6057
|
+
spreadPathIndexByName[fragmentName] = void 0;
|
|
6058
6058
|
}
|
|
6059
6059
|
}
|
|
6060
6060
|
|
|
@@ -6329,8 +6329,8 @@ function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPai
|
|
|
6329
6329
|
return [[responseName, "they have differing arguments"], [node1], [node2]];
|
|
6330
6330
|
}
|
|
6331
6331
|
}
|
|
6332
|
-
const type1 = def1 === null || def1 ===
|
|
6333
|
-
const type2 = def2 === null || def2 ===
|
|
6332
|
+
const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;
|
|
6333
|
+
const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;
|
|
6334
6334
|
if (type1 && type2 && doTypesConflict(type1, type2)) {
|
|
6335
6335
|
return [[responseName, `they return conflicting types "${inspect(type1)}" and "${inspect(type2)}"`], [node1], [node2]];
|
|
6336
6336
|
}
|
|
@@ -6344,10 +6344,10 @@ function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPai
|
|
|
6344
6344
|
function sameArguments(node1, node2) {
|
|
6345
6345
|
const args1 = node1.arguments;
|
|
6346
6346
|
const args2 = node2.arguments;
|
|
6347
|
-
if (args1 ===
|
|
6348
|
-
return args2 ===
|
|
6347
|
+
if (args1 === void 0 || args1.length === 0) {
|
|
6348
|
+
return args2 === void 0 || args2.length === 0;
|
|
6349
6349
|
}
|
|
6350
|
-
if (args2 ===
|
|
6350
|
+
if (args2 === void 0 || args2.length === 0) {
|
|
6351
6351
|
return false;
|
|
6352
6352
|
}
|
|
6353
6353
|
if (args1.length !== args2.length) {
|
|
@@ -6360,7 +6360,7 @@ function sameArguments(node1, node2) {
|
|
|
6360
6360
|
return args1.every((arg1) => {
|
|
6361
6361
|
const value1 = arg1.value;
|
|
6362
6362
|
const value2 = values2.get(arg1.name.value);
|
|
6363
|
-
if (value2 ===
|
|
6363
|
+
if (value2 === void 0) {
|
|
6364
6364
|
return false;
|
|
6365
6365
|
}
|
|
6366
6366
|
return stringifyValue(value1) === stringifyValue(value2);
|
|
@@ -6447,8 +6447,8 @@ var PairSet = class {
|
|
|
6447
6447
|
has(a, b, areMutuallyExclusive) {
|
|
6448
6448
|
var _this$_data$get;
|
|
6449
6449
|
const [key1, key2] = a < b ? [a, b] : [b, a];
|
|
6450
|
-
const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get ===
|
|
6451
|
-
if (result ===
|
|
6450
|
+
const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2);
|
|
6451
|
+
if (result === void 0) {
|
|
6452
6452
|
return false;
|
|
6453
6453
|
}
|
|
6454
6454
|
return areMutuallyExclusive ? true : areMutuallyExclusive === result;
|
|
@@ -6456,7 +6456,7 @@ var PairSet = class {
|
|
|
6456
6456
|
add(a, b, areMutuallyExclusive) {
|
|
6457
6457
|
const [key1, key2] = a < b ? [a, b] : [b, a];
|
|
6458
6458
|
const map = this._data.get(key1);
|
|
6459
|
-
if (map ===
|
|
6459
|
+
if (map === void 0) {
|
|
6460
6460
|
this._data.set(key1, /* @__PURE__ */ new Map([[key2, areMutuallyExclusive]]));
|
|
6461
6461
|
} else {
|
|
6462
6462
|
map.set(key2, areMutuallyExclusive);
|
|
@@ -6522,7 +6522,7 @@ function PossibleTypeExtensionsRule(context) {
|
|
|
6522
6522
|
function checkExtension(node) {
|
|
6523
6523
|
const typeName = node.name.value;
|
|
6524
6524
|
const defNode = definedTypes[typeName];
|
|
6525
|
-
const existingType = schema === null || schema ===
|
|
6525
|
+
const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);
|
|
6526
6526
|
let expectedKind;
|
|
6527
6527
|
if (defNode) {
|
|
6528
6528
|
expectedKind = defKindToExtKind[defNode.kind];
|
|
@@ -6539,7 +6539,7 @@ function PossibleTypeExtensionsRule(context) {
|
|
|
6539
6539
|
} else {
|
|
6540
6540
|
const allTypeNames = Object.keys({
|
|
6541
6541
|
...definedTypes,
|
|
6542
|
-
...schema === null || schema ===
|
|
6542
|
+
...schema === null || schema === void 0 ? void 0 : schema.getTypeMap()
|
|
6543
6543
|
});
|
|
6544
6544
|
const suggestedTypes = suggestionList(typeName, allTypeNames);
|
|
6545
6545
|
context.reportError(new GraphQLError(`Cannot extend type "${typeName}" because it is not defined.` + didYouMean(suggestedTypes), {
|
|
@@ -6612,7 +6612,7 @@ function ProvidedRequiredArgumentsRule(context) {
|
|
|
6612
6612
|
const providedArgs = new Set(
|
|
6613
6613
|
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
6614
6614
|
/* c8 ignore next */
|
|
6615
|
-
(_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments ===
|
|
6615
|
+
(_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map((arg) => arg.name.value)
|
|
6616
6616
|
);
|
|
6617
6617
|
for (const argDef of fieldDef.args) {
|
|
6618
6618
|
if (!providedArgs.has(argDef.name) && isRequiredArgument(argDef)) {
|
|
@@ -6630,7 +6630,7 @@ function ProvidedRequiredArgumentsOnDirectivesRule(context) {
|
|
|
6630
6630
|
var _schema$getDirectives;
|
|
6631
6631
|
const requiredArgsMap = /* @__PURE__ */ Object.create(null);
|
|
6632
6632
|
const schema = context.getSchema();
|
|
6633
|
-
const definedDirectives = (_schema$getDirectives = schema === null || schema ===
|
|
6633
|
+
const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : specifiedDirectives;
|
|
6634
6634
|
for (const directive of definedDirectives) {
|
|
6635
6635
|
requiredArgsMap[directive.name] = keyMap(directive.args.filter(isRequiredArgument), (arg) => arg.name);
|
|
6636
6636
|
}
|
|
@@ -6638,7 +6638,7 @@ function ProvidedRequiredArgumentsOnDirectivesRule(context) {
|
|
|
6638
6638
|
for (const def of astDefinitions) {
|
|
6639
6639
|
if (def.kind === exports.Kind.DIRECTIVE_DEFINITION) {
|
|
6640
6640
|
var _def$arguments;
|
|
6641
|
-
const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !==
|
|
6641
|
+
const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
|
|
6642
6642
|
requiredArgsMap[def.name.value] = keyMap(argNodes.filter(isRequiredArgumentNode), (arg) => arg.name.value);
|
|
6643
6643
|
}
|
|
6644
6644
|
}
|
|
@@ -6650,7 +6650,7 @@ function ProvidedRequiredArgumentsOnDirectivesRule(context) {
|
|
|
6650
6650
|
const requiredArgs = requiredArgsMap[directiveName];
|
|
6651
6651
|
if (requiredArgs) {
|
|
6652
6652
|
var _directiveNode$argume;
|
|
6653
|
-
const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !==
|
|
6653
|
+
const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
|
|
6654
6654
|
const argNodeMap = new Set(argNodes.map((arg) => arg.name.value));
|
|
6655
6655
|
for (const [argName, argDef] of Object.entries(requiredArgs)) {
|
|
6656
6656
|
if (!argNodeMap.has(argName)) {
|
|
@@ -6721,7 +6721,7 @@ function pathToArray(path) {
|
|
|
6721
6721
|
|
|
6722
6722
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/coerceInputValue.mjs
|
|
6723
6723
|
function coerceInputValue(inputValue, type, onError = defaultOnError) {
|
|
6724
|
-
return coerceInputValueImpl(inputValue, type, onError,
|
|
6724
|
+
return coerceInputValueImpl(inputValue, type, onError, void 0);
|
|
6725
6725
|
}
|
|
6726
6726
|
function defaultOnError(path, invalidValue, error) {
|
|
6727
6727
|
let errorPrefix = "Invalid value " + inspect(invalidValue);
|
|
@@ -6746,7 +6746,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
6746
6746
|
const itemType = type.ofType;
|
|
6747
6747
|
if (isIterableObject(inputValue)) {
|
|
6748
6748
|
return Array.from(inputValue, (itemValue, index) => {
|
|
6749
|
-
const itemPath = addPath(path, index,
|
|
6749
|
+
const itemPath = addPath(path, index, void 0);
|
|
6750
6750
|
return coerceInputValueImpl(itemValue, itemType, onError, itemPath);
|
|
6751
6751
|
});
|
|
6752
6752
|
}
|
|
@@ -6761,8 +6761,8 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
6761
6761
|
const fieldDefs = type.getFields();
|
|
6762
6762
|
for (const field of Object.values(fieldDefs)) {
|
|
6763
6763
|
const fieldValue = inputValue[field.name];
|
|
6764
|
-
if (fieldValue ===
|
|
6765
|
-
if (field.defaultValue !==
|
|
6764
|
+
if (fieldValue === void 0) {
|
|
6765
|
+
if (field.defaultValue !== void 0) {
|
|
6766
6766
|
coercedValue[field.name] = field.defaultValue;
|
|
6767
6767
|
} else if (isNonNullType(field.type)) {
|
|
6768
6768
|
const typeStr = inspect(field.type);
|
|
@@ -6794,7 +6794,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
6794
6794
|
}
|
|
6795
6795
|
return;
|
|
6796
6796
|
}
|
|
6797
|
-
if (parseResult ===
|
|
6797
|
+
if (parseResult === void 0) {
|
|
6798
6798
|
onError(pathToArray(path), inputValue, new GraphQLError(`Expected type "${type.name}".`));
|
|
6799
6799
|
}
|
|
6800
6800
|
return parseResult;
|
|
@@ -6809,7 +6809,7 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6809
6809
|
}
|
|
6810
6810
|
if (valueNode.kind === exports.Kind.VARIABLE) {
|
|
6811
6811
|
const variableName = valueNode.name.value;
|
|
6812
|
-
if (variables == null || variables[variableName] ===
|
|
6812
|
+
if (variables == null || variables[variableName] === void 0) {
|
|
6813
6813
|
return;
|
|
6814
6814
|
}
|
|
6815
6815
|
const variableValue = variables[variableName];
|
|
@@ -6839,7 +6839,7 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6839
6839
|
coercedValues.push(null);
|
|
6840
6840
|
} else {
|
|
6841
6841
|
const itemValue = valueFromAST(itemNode, itemType, variables);
|
|
6842
|
-
if (itemValue ===
|
|
6842
|
+
if (itemValue === void 0) {
|
|
6843
6843
|
return;
|
|
6844
6844
|
}
|
|
6845
6845
|
coercedValues.push(itemValue);
|
|
@@ -6848,7 +6848,7 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6848
6848
|
return coercedValues;
|
|
6849
6849
|
}
|
|
6850
6850
|
const coercedValue = valueFromAST(valueNode, itemType, variables);
|
|
6851
|
-
if (coercedValue ===
|
|
6851
|
+
if (coercedValue === void 0) {
|
|
6852
6852
|
return;
|
|
6853
6853
|
}
|
|
6854
6854
|
return [coercedValue];
|
|
@@ -6862,7 +6862,7 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6862
6862
|
for (const field of Object.values(type.getFields())) {
|
|
6863
6863
|
const fieldNode = fieldNodes[field.name];
|
|
6864
6864
|
if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {
|
|
6865
|
-
if (field.defaultValue !==
|
|
6865
|
+
if (field.defaultValue !== void 0) {
|
|
6866
6866
|
coercedObj[field.name] = field.defaultValue;
|
|
6867
6867
|
} else if (isNonNullType(field.type)) {
|
|
6868
6868
|
return;
|
|
@@ -6870,7 +6870,7 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6870
6870
|
continue;
|
|
6871
6871
|
}
|
|
6872
6872
|
const fieldValue = valueFromAST(fieldNode.value, field.type, variables);
|
|
6873
|
-
if (fieldValue ===
|
|
6873
|
+
if (fieldValue === void 0) {
|
|
6874
6874
|
return;
|
|
6875
6875
|
}
|
|
6876
6876
|
coercedObj[field.name] = fieldValue;
|
|
@@ -6884,7 +6884,7 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6884
6884
|
} catch (_error) {
|
|
6885
6885
|
return;
|
|
6886
6886
|
}
|
|
6887
|
-
if (result ===
|
|
6887
|
+
if (result === void 0) {
|
|
6888
6888
|
return;
|
|
6889
6889
|
}
|
|
6890
6890
|
return result;
|
|
@@ -6892,13 +6892,13 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
6892
6892
|
process.env.NODE_ENV !== "production" ? invariant(false, "Unexpected input type: " + inspect(type)) : invariant(false) ;
|
|
6893
6893
|
}
|
|
6894
6894
|
function isMissingVariable(valueNode, variables) {
|
|
6895
|
-
return valueNode.kind === exports.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] ===
|
|
6895
|
+
return valueNode.kind === exports.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === void 0);
|
|
6896
6896
|
}
|
|
6897
6897
|
|
|
6898
6898
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/execution/values.mjs
|
|
6899
6899
|
function getVariableValues(schema, varDefNodes, inputs, options) {
|
|
6900
6900
|
const errors = [];
|
|
6901
|
-
const maxErrors = options === null || options ===
|
|
6901
|
+
const maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors;
|
|
6902
6902
|
try {
|
|
6903
6903
|
const coerced = coerceVariableValues(schema, varDefNodes, inputs, (error) => {
|
|
6904
6904
|
if (maxErrors != null && errors.length >= maxErrors) {
|
|
@@ -6965,14 +6965,14 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
6965
6965
|
function getArgumentValues(def, node, variableValues) {
|
|
6966
6966
|
var _node$arguments;
|
|
6967
6967
|
const coercedValues = {};
|
|
6968
|
-
const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !==
|
|
6968
|
+
const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : [];
|
|
6969
6969
|
const argNodeMap = keyMap(argumentNodes, (arg) => arg.name.value);
|
|
6970
6970
|
for (const argDef of def.args) {
|
|
6971
6971
|
const name = argDef.name;
|
|
6972
6972
|
const argType = argDef.type;
|
|
6973
6973
|
const argumentNode = argNodeMap[name];
|
|
6974
6974
|
if (!argumentNode) {
|
|
6975
|
-
if (argDef.defaultValue !==
|
|
6975
|
+
if (argDef.defaultValue !== void 0) {
|
|
6976
6976
|
coercedValues[name] = argDef.defaultValue;
|
|
6977
6977
|
} else if (isNonNullType(argType)) {
|
|
6978
6978
|
throw new GraphQLError(`Argument "${name}" of required type "${inspect(argType)}" was not provided.`, {
|
|
@@ -6986,7 +6986,7 @@ function getArgumentValues(def, node, variableValues) {
|
|
|
6986
6986
|
if (valueNode.kind === exports.Kind.VARIABLE) {
|
|
6987
6987
|
const variableName = valueNode.name.value;
|
|
6988
6988
|
if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {
|
|
6989
|
-
if (argDef.defaultValue !==
|
|
6989
|
+
if (argDef.defaultValue !== void 0) {
|
|
6990
6990
|
coercedValues[name] = argDef.defaultValue;
|
|
6991
6991
|
} else if (isNonNullType(argType)) {
|
|
6992
6992
|
throw new GraphQLError(`Argument "${name}" of required type "${inspect(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`, {
|
|
@@ -7003,7 +7003,7 @@ function getArgumentValues(def, node, variableValues) {
|
|
|
7003
7003
|
});
|
|
7004
7004
|
}
|
|
7005
7005
|
const coercedValue = valueFromAST(valueNode, argType, variableValues);
|
|
7006
|
-
if (coercedValue ===
|
|
7006
|
+
if (coercedValue === void 0) {
|
|
7007
7007
|
throw new GraphQLError(`Argument "${name}" has invalid value ${print(valueNode)}.`, {
|
|
7008
7008
|
nodes: valueNode
|
|
7009
7009
|
});
|
|
@@ -7014,7 +7014,7 @@ function getArgumentValues(def, node, variableValues) {
|
|
|
7014
7014
|
}
|
|
7015
7015
|
function getDirectiveValues(directiveDef, node, variableValues) {
|
|
7016
7016
|
var _node$directives;
|
|
7017
|
-
const directiveNode = (_node$directives = node.directives) === null || _node$directives ===
|
|
7017
|
+
const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find((directive) => directive.name.value === directiveDef.name);
|
|
7018
7018
|
if (directiveNode) {
|
|
7019
7019
|
return getArgumentValues(directiveDef, directiveNode, variableValues);
|
|
7020
7020
|
}
|
|
@@ -7048,7 +7048,7 @@ function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selec
|
|
|
7048
7048
|
}
|
|
7049
7049
|
const name = getFieldEntryKey(selection);
|
|
7050
7050
|
const fieldList = fields.get(name);
|
|
7051
|
-
if (fieldList !==
|
|
7051
|
+
if (fieldList !== void 0) {
|
|
7052
7052
|
fieldList.push(selection);
|
|
7053
7053
|
} else {
|
|
7054
7054
|
fields.set(name, [selection]);
|
|
@@ -7080,11 +7080,11 @@ function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selec
|
|
|
7080
7080
|
}
|
|
7081
7081
|
function shouldIncludeNode(variableValues, node) {
|
|
7082
7082
|
const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues);
|
|
7083
|
-
if ((skip === null || skip ===
|
|
7083
|
+
if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {
|
|
7084
7084
|
return false;
|
|
7085
7085
|
}
|
|
7086
7086
|
const include = getDirectiveValues(GraphQLIncludeDirective, node, variableValues);
|
|
7087
|
-
if ((include === null || include ===
|
|
7087
|
+
if ((include === null || include === void 0 ? void 0 : include.if) === false) {
|
|
7088
7088
|
return false;
|
|
7089
7089
|
}
|
|
7090
7090
|
return true;
|
|
@@ -7154,7 +7154,7 @@ function groupBy(list, keyFn) {
|
|
|
7154
7154
|
for (const item of list) {
|
|
7155
7155
|
const key = keyFn(item);
|
|
7156
7156
|
const group = result.get(key);
|
|
7157
|
-
if (group ===
|
|
7157
|
+
if (group === void 0) {
|
|
7158
7158
|
result.set(key, [item]);
|
|
7159
7159
|
} else {
|
|
7160
7160
|
group.push(item);
|
|
@@ -7168,7 +7168,7 @@ function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
7168
7168
|
return {
|
|
7169
7169
|
DirectiveDefinition(directiveNode) {
|
|
7170
7170
|
var _directiveNode$argume;
|
|
7171
|
-
const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !==
|
|
7171
|
+
const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
|
|
7172
7172
|
return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes);
|
|
7173
7173
|
},
|
|
7174
7174
|
InterfaceTypeDefinition: checkArgUniquenessPerField,
|
|
@@ -7179,11 +7179,11 @@ function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
7179
7179
|
function checkArgUniquenessPerField(typeNode) {
|
|
7180
7180
|
var _typeNode$fields;
|
|
7181
7181
|
const typeName = typeNode.name.value;
|
|
7182
|
-
const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !==
|
|
7182
|
+
const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : [];
|
|
7183
7183
|
for (const fieldDef of fieldNodes) {
|
|
7184
7184
|
var _fieldDef$arguments;
|
|
7185
7185
|
const fieldName = fieldDef.name.value;
|
|
7186
|
-
const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !==
|
|
7186
|
+
const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : [];
|
|
7187
7187
|
checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes);
|
|
7188
7188
|
}
|
|
7189
7189
|
return false;
|
|
@@ -7209,7 +7209,7 @@ function UniqueArgumentNamesRule(context) {
|
|
|
7209
7209
|
};
|
|
7210
7210
|
function checkArgUniqueness(parentNode) {
|
|
7211
7211
|
var _parentNode$arguments;
|
|
7212
|
-
const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !==
|
|
7212
|
+
const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : [];
|
|
7213
7213
|
const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value);
|
|
7214
7214
|
for (const [argName, argNodes] of seenArgs) {
|
|
7215
7215
|
if (argNodes.length > 1) {
|
|
@@ -7228,7 +7228,7 @@ function UniqueDirectiveNamesRule(context) {
|
|
|
7228
7228
|
return {
|
|
7229
7229
|
DirectiveDefinition(node) {
|
|
7230
7230
|
const directiveName = node.name.value;
|
|
7231
|
-
if (schema !== null && schema !==
|
|
7231
|
+
if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) {
|
|
7232
7232
|
context.reportError(new GraphQLError(`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, {
|
|
7233
7233
|
nodes: node.name
|
|
7234
7234
|
}));
|
|
@@ -7276,7 +7276,7 @@ function UniqueDirectivesPerLocationRule(context) {
|
|
|
7276
7276
|
} else if (isTypeDefinitionNode(node) || isTypeExtensionNode(node)) {
|
|
7277
7277
|
const typeName = node.name.value;
|
|
7278
7278
|
seenDirectives = typeDirectivesMap[typeName];
|
|
7279
|
-
if (seenDirectives ===
|
|
7279
|
+
if (seenDirectives === void 0) {
|
|
7280
7280
|
typeDirectivesMap[typeName] = seenDirectives = /* @__PURE__ */ Object.create(null);
|
|
7281
7281
|
}
|
|
7282
7282
|
} else {
|
|
@@ -7313,7 +7313,7 @@ function UniqueEnumValueNamesRule(context) {
|
|
|
7313
7313
|
if (!knownValueNames[typeName]) {
|
|
7314
7314
|
knownValueNames[typeName] = /* @__PURE__ */ Object.create(null);
|
|
7315
7315
|
}
|
|
7316
|
-
const valueNodes = (_node$values = node.values) !== null && _node$values !==
|
|
7316
|
+
const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
|
|
7317
7317
|
const valueNames = knownValueNames[typeName];
|
|
7318
7318
|
for (const valueDef of valueNodes) {
|
|
7319
7319
|
const valueName = valueDef.name.value;
|
|
@@ -7353,7 +7353,7 @@ function UniqueFieldDefinitionNamesRule(context) {
|
|
|
7353
7353
|
if (!knownFieldNames[typeName]) {
|
|
7354
7354
|
knownFieldNames[typeName] = /* @__PURE__ */ Object.create(null);
|
|
7355
7355
|
}
|
|
7356
|
-
const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !==
|
|
7356
|
+
const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
|
|
7357
7357
|
const fieldNames = knownFieldNames[typeName];
|
|
7358
7358
|
for (const fieldDef of fieldNodes) {
|
|
7359
7359
|
const fieldName = fieldDef.name.value;
|
|
@@ -7463,7 +7463,7 @@ function UniqueOperationTypesRule(context) {
|
|
|
7463
7463
|
};
|
|
7464
7464
|
function checkOperationTypes(node) {
|
|
7465
7465
|
var _node$operationTypes;
|
|
7466
|
-
const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !==
|
|
7466
|
+
const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
|
|
7467
7467
|
for (const operationType of operationTypesNodes) {
|
|
7468
7468
|
const operation = operationType.operation;
|
|
7469
7469
|
const alreadyDefinedOperationType = definedOperationTypes[operation];
|
|
@@ -7497,7 +7497,7 @@ function UniqueTypeNamesRule(context) {
|
|
|
7497
7497
|
};
|
|
7498
7498
|
function checkTypeName(node) {
|
|
7499
7499
|
const typeName = node.name.value;
|
|
7500
|
-
if (schema !== null && schema !==
|
|
7500
|
+
if (schema !== null && schema !== void 0 && schema.getType(typeName)) {
|
|
7501
7501
|
context.reportError(new GraphQLError(`Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, {
|
|
7502
7502
|
nodes: node.name
|
|
7503
7503
|
}));
|
|
@@ -7519,7 +7519,7 @@ function UniqueVariableNamesRule(context) {
|
|
|
7519
7519
|
return {
|
|
7520
7520
|
OperationDefinition(operationNode) {
|
|
7521
7521
|
var _operationNode$variab;
|
|
7522
|
-
const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !==
|
|
7522
|
+
const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : [];
|
|
7523
7523
|
const seenVariableDefinitions = groupBy(variableDefinitions, (node) => node.variable.name.value);
|
|
7524
7524
|
for (const [variableName, variableNodes] of seenVariableDefinitions) {
|
|
7525
7525
|
if (variableNodes.length > 1) {
|
|
@@ -7627,7 +7627,7 @@ function VariablesAreInputTypesRule(context) {
|
|
|
7627
7627
|
return {
|
|
7628
7628
|
VariableDefinition(node) {
|
|
7629
7629
|
const type = typeFromAST(context.getSchema(), node.type);
|
|
7630
|
-
if (type !==
|
|
7630
|
+
if (type !== void 0 && !isInputType(type)) {
|
|
7631
7631
|
const variableName = node.variable.name.value;
|
|
7632
7632
|
const typeName = print(node.type);
|
|
7633
7633
|
context.reportError(new GraphQLError(`Variable "$${variableName}" cannot be non-input type "${typeName}".`, {
|
|
@@ -7677,7 +7677,7 @@ function VariablesInAllowedPositionRule(context) {
|
|
|
7677
7677
|
function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
|
|
7678
7678
|
if (isNonNullType(locationType) && !isNonNullType(varType)) {
|
|
7679
7679
|
const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== exports.Kind.NULL;
|
|
7680
|
-
const hasLocationDefaultValue = locationDefaultValue !==
|
|
7680
|
+
const hasLocationDefaultValue = locationDefaultValue !== void 0;
|
|
7681
7681
|
if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
|
|
7682
7682
|
return false;
|
|
7683
7683
|
}
|
|
@@ -7695,7 +7695,7 @@ var specifiedSDLRules = Object.freeze([LoneSchemaDefinitionRule, UniqueOperation
|
|
|
7695
7695
|
var ASTValidationContext = class {
|
|
7696
7696
|
constructor(ast, onError) {
|
|
7697
7697
|
this._ast = ast;
|
|
7698
|
-
this._fragments =
|
|
7698
|
+
this._fragments = void 0;
|
|
7699
7699
|
this._fragmentSpreads = /* @__PURE__ */ new Map();
|
|
7700
7700
|
this._recursivelyReferencedFragments = /* @__PURE__ */ new Map();
|
|
7701
7701
|
this._onError = onError;
|
|
@@ -7854,7 +7854,7 @@ var ValidationContext = class extends ASTValidationContext {
|
|
|
7854
7854
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/validation/validate.mjs
|
|
7855
7855
|
function validate(schema, documentAST, rules = specifiedRules, options, typeInfo = new TypeInfo(schema)) {
|
|
7856
7856
|
var _options$maxErrors;
|
|
7857
|
-
const maxErrors = (_options$maxErrors = options === null || options ===
|
|
7857
|
+
const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100;
|
|
7858
7858
|
documentAST || devAssert(false, "Must provide document.");
|
|
7859
7859
|
assertValidSchema(schema);
|
|
7860
7860
|
const abortObj = Object.freeze({});
|
|
@@ -7902,21 +7902,21 @@ function assertValidSDLExtension(documentAST, schema) {
|
|
|
7902
7902
|
function memoize3(fn) {
|
|
7903
7903
|
let cache0;
|
|
7904
7904
|
return function memoized(a1, a2, a3) {
|
|
7905
|
-
if (cache0 ===
|
|
7905
|
+
if (cache0 === void 0) {
|
|
7906
7906
|
cache0 = /* @__PURE__ */ new WeakMap();
|
|
7907
7907
|
}
|
|
7908
7908
|
let cache1 = cache0.get(a1);
|
|
7909
|
-
if (cache1 ===
|
|
7909
|
+
if (cache1 === void 0) {
|
|
7910
7910
|
cache1 = /* @__PURE__ */ new WeakMap();
|
|
7911
7911
|
cache0.set(a1, cache1);
|
|
7912
7912
|
}
|
|
7913
7913
|
let cache2 = cache1.get(a2);
|
|
7914
|
-
if (cache2 ===
|
|
7914
|
+
if (cache2 === void 0) {
|
|
7915
7915
|
cache2 = /* @__PURE__ */ new WeakMap();
|
|
7916
7916
|
cache1.set(a2, cache2);
|
|
7917
7917
|
}
|
|
7918
7918
|
let fnResult = cache2.get(a3);
|
|
7919
|
-
if (fnResult ===
|
|
7919
|
+
if (fnResult === void 0) {
|
|
7920
7920
|
fnResult = fn(a1, a2, a3);
|
|
7921
7921
|
cache2.set(a3, fnResult);
|
|
7922
7922
|
}
|
|
@@ -7964,7 +7964,7 @@ function locatedError(rawOriginalError, nodes, path) {
|
|
|
7964
7964
|
return originalError;
|
|
7965
7965
|
}
|
|
7966
7966
|
return new GraphQLError(originalError.message, {
|
|
7967
|
-
nodes: (_nodes = originalError.nodes) !== null && _nodes !==
|
|
7967
|
+
nodes: (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes,
|
|
7968
7968
|
source: originalError.source,
|
|
7969
7969
|
positions: originalError.positions,
|
|
7970
7970
|
path,
|
|
@@ -8048,11 +8048,11 @@ function buildExecutionContext(args) {
|
|
|
8048
8048
|
switch (definition.kind) {
|
|
8049
8049
|
case exports.Kind.OPERATION_DEFINITION:
|
|
8050
8050
|
if (operationName == null) {
|
|
8051
|
-
if (operation !==
|
|
8051
|
+
if (operation !== void 0) {
|
|
8052
8052
|
return [new GraphQLError("Must provide operation name if query contains multiple operations.")];
|
|
8053
8053
|
}
|
|
8054
8054
|
operation = definition;
|
|
8055
|
-
} else if (((_definition$name = definition.name) === null || _definition$name ===
|
|
8055
|
+
} else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
|
|
8056
8056
|
operation = definition;
|
|
8057
8057
|
}
|
|
8058
8058
|
break;
|
|
@@ -8067,8 +8067,8 @@ function buildExecutionContext(args) {
|
|
|
8067
8067
|
}
|
|
8068
8068
|
return [new GraphQLError("Must provide an operation.")];
|
|
8069
8069
|
}
|
|
8070
|
-
const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !==
|
|
8071
|
-
const coercedVariableValues = getVariableValues(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !==
|
|
8070
|
+
const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : [];
|
|
8071
|
+
const coercedVariableValues = getVariableValues(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, {
|
|
8072
8072
|
maxErrors: 50
|
|
8073
8073
|
});
|
|
8074
8074
|
if (coercedVariableValues.errors) {
|
|
@@ -8081,9 +8081,9 @@ function buildExecutionContext(args) {
|
|
|
8081
8081
|
contextValue,
|
|
8082
8082
|
operation,
|
|
8083
8083
|
variableValues: coercedVariableValues.coerced,
|
|
8084
|
-
fieldResolver: fieldResolver !== null && fieldResolver !==
|
|
8085
|
-
typeResolver: typeResolver !== null && typeResolver !==
|
|
8086
|
-
subscribeFieldResolver: subscribeFieldResolver !== null && subscribeFieldResolver !==
|
|
8084
|
+
fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver,
|
|
8085
|
+
typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver,
|
|
8086
|
+
subscribeFieldResolver: subscribeFieldResolver !== null && subscribeFieldResolver !== void 0 ? subscribeFieldResolver : defaultFieldResolver,
|
|
8087
8087
|
errors: []
|
|
8088
8088
|
};
|
|
8089
8089
|
}
|
|
@@ -8095,7 +8095,7 @@ function executeOperation(exeContext, operation, rootValue) {
|
|
|
8095
8095
|
});
|
|
8096
8096
|
}
|
|
8097
8097
|
const rootFields = collectFields(exeContext.schema, exeContext.fragments, exeContext.variableValues, rootType, operation.selectionSet);
|
|
8098
|
-
const path =
|
|
8098
|
+
const path = void 0;
|
|
8099
8099
|
switch (operation.operation) {
|
|
8100
8100
|
case exports.OperationTypeNode.QUERY:
|
|
8101
8101
|
return executeFields(exeContext, rootType, rootValue, path, rootFields);
|
|
@@ -8109,7 +8109,7 @@ function executeFieldsSerially(exeContext, parentType, sourceValue, path, fields
|
|
|
8109
8109
|
return promiseReduce(fields.entries(), (results, [responseName, fieldNodes]) => {
|
|
8110
8110
|
const fieldPath = addPath(path, responseName, parentType.name);
|
|
8111
8111
|
const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
|
|
8112
|
-
if (result ===
|
|
8112
|
+
if (result === void 0) {
|
|
8113
8113
|
return results;
|
|
8114
8114
|
}
|
|
8115
8115
|
if (isPromise(result)) {
|
|
@@ -8156,7 +8156,7 @@ function executeField(exeContext, parentType, source, fieldNodes, path) {
|
|
|
8156
8156
|
return;
|
|
8157
8157
|
}
|
|
8158
8158
|
const returnType = fieldDef.type;
|
|
8159
|
-
const resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !==
|
|
8159
|
+
const resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver;
|
|
8160
8160
|
const info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path);
|
|
8161
8161
|
try {
|
|
8162
8162
|
const args = getArgumentValues(fieldDef, fieldNodes[0], exeContext.variableValues);
|
|
@@ -8236,7 +8236,7 @@ function completeListValue(exeContext, returnType, fieldNodes, info, path, resul
|
|
|
8236
8236
|
const itemType = returnType.ofType;
|
|
8237
8237
|
let containsPromise = false;
|
|
8238
8238
|
const completedResults = Array.from(result, (item, index) => {
|
|
8239
|
-
const itemPath = addPath(path, index,
|
|
8239
|
+
const itemPath = addPath(path, index, void 0);
|
|
8240
8240
|
try {
|
|
8241
8241
|
let completedItem;
|
|
8242
8242
|
if (isPromise(item)) {
|
|
@@ -8268,7 +8268,7 @@ function completeLeafValue(returnType, result) {
|
|
|
8268
8268
|
}
|
|
8269
8269
|
function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {
|
|
8270
8270
|
var _returnType$resolveTy;
|
|
8271
|
-
const resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !==
|
|
8271
|
+
const resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;
|
|
8272
8272
|
const contextValue = exeContext.contextValue;
|
|
8273
8273
|
const runtimeType = resolveTypeFn(result, contextValue, info, returnType);
|
|
8274
8274
|
if (isPromise(runtimeType)) {
|
|
@@ -8432,7 +8432,7 @@ function graphqlImpl(args) {
|
|
|
8432
8432
|
|
|
8433
8433
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isAsyncIterable.mjs
|
|
8434
8434
|
function isAsyncIterable(maybeAsyncIterable) {
|
|
8435
|
-
return typeof (maybeAsyncIterable === null || maybeAsyncIterable ===
|
|
8435
|
+
return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === "function";
|
|
8436
8436
|
}
|
|
8437
8437
|
|
|
8438
8438
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/execution/mapAsyncIterator.mjs
|
|
@@ -8463,7 +8463,7 @@ function mapAsyncIterator(iterable, callback) {
|
|
|
8463
8463
|
},
|
|
8464
8464
|
async return() {
|
|
8465
8465
|
return typeof iterator.return === "function" ? mapResult(await iterator.return()) : {
|
|
8466
|
-
value:
|
|
8466
|
+
value: void 0,
|
|
8467
8467
|
done: true
|
|
8468
8468
|
};
|
|
8469
8469
|
},
|
|
@@ -8560,7 +8560,7 @@ async function executeSubscription(exeContext) {
|
|
|
8560
8560
|
nodes: fieldNodes
|
|
8561
8561
|
});
|
|
8562
8562
|
}
|
|
8563
|
-
const path = addPath(
|
|
8563
|
+
const path = addPath(void 0, responseName, rootType.name);
|
|
8564
8564
|
const info = buildResolveInfo(exeContext, fieldDef, fieldNodes, rootType, path);
|
|
8565
8565
|
try {
|
|
8566
8566
|
var _fieldDef$subscribe;
|
|
@@ -8582,7 +8582,7 @@ function NoDeprecatedCustomRule(context) {
|
|
|
8582
8582
|
return {
|
|
8583
8583
|
Field(node) {
|
|
8584
8584
|
const fieldDef = context.getFieldDef();
|
|
8585
|
-
const deprecationReason = fieldDef === null || fieldDef ===
|
|
8585
|
+
const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason;
|
|
8586
8586
|
if (fieldDef && deprecationReason != null) {
|
|
8587
8587
|
const parentType = context.getParentType();
|
|
8588
8588
|
parentType != null || (process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) );
|
|
@@ -8593,7 +8593,7 @@ function NoDeprecatedCustomRule(context) {
|
|
|
8593
8593
|
},
|
|
8594
8594
|
Argument(node) {
|
|
8595
8595
|
const argDef = context.getArgument();
|
|
8596
|
-
const deprecationReason = argDef === null || argDef ===
|
|
8596
|
+
const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason;
|
|
8597
8597
|
if (argDef && deprecationReason != null) {
|
|
8598
8598
|
const directiveDef = context.getDirective();
|
|
8599
8599
|
if (directiveDef != null) {
|
|
@@ -8614,7 +8614,7 @@ function NoDeprecatedCustomRule(context) {
|
|
|
8614
8614
|
const inputObjectDef = getNamedType(context.getParentInputType());
|
|
8615
8615
|
if (isInputObjectType(inputObjectDef)) {
|
|
8616
8616
|
const inputFieldDef = inputObjectDef.getFields()[node.name.value];
|
|
8617
|
-
const deprecationReason = inputFieldDef === null || inputFieldDef ===
|
|
8617
|
+
const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason;
|
|
8618
8618
|
if (deprecationReason != null) {
|
|
8619
8619
|
context.reportError(new GraphQLError(`The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, {
|
|
8620
8620
|
nodes: node
|
|
@@ -8624,7 +8624,7 @@ function NoDeprecatedCustomRule(context) {
|
|
|
8624
8624
|
},
|
|
8625
8625
|
EnumValue(node) {
|
|
8626
8626
|
const enumValueDef = context.getEnumValue();
|
|
8627
|
-
const deprecationReason = enumValueDef === null || enumValueDef ===
|
|
8627
|
+
const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason;
|
|
8628
8628
|
if (enumValueDef && deprecationReason != null) {
|
|
8629
8629
|
const enumTypeDef = getNamedType(context.getInputType());
|
|
8630
8630
|
enumTypeDef != null || (process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) );
|
|
@@ -8786,7 +8786,7 @@ function getOperationAST(documentAST, operationName) {
|
|
|
8786
8786
|
return null;
|
|
8787
8787
|
}
|
|
8788
8788
|
operation = definition;
|
|
8789
|
-
} else if (((_definition$name = definition.name) === null || _definition$name ===
|
|
8789
|
+
} else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
|
|
8790
8790
|
return definition;
|
|
8791
8791
|
}
|
|
8792
8792
|
}
|
|
@@ -8867,7 +8867,7 @@ function buildClientSchema(introspection, options) {
|
|
|
8867
8867
|
subscription: subscriptionType,
|
|
8868
8868
|
types: Object.values(typeMap),
|
|
8869
8869
|
directives,
|
|
8870
|
-
assumeValid: options === null || options ===
|
|
8870
|
+
assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
|
|
8871
8871
|
});
|
|
8872
8872
|
function getType(typeRef) {
|
|
8873
8873
|
if (typeRef.kind === exports.TypeKind.LIST) {
|
|
@@ -9025,7 +9025,7 @@ function buildClientSchema(introspection, options) {
|
|
|
9025
9025
|
const typeStr = inspect(type);
|
|
9026
9026
|
throw new Error(`Introspection must provide input type for arguments, but received: ${typeStr}.`);
|
|
9027
9027
|
}
|
|
9028
|
-
const defaultValue = inputValueIntrospection.defaultValue != null ? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type) :
|
|
9028
|
+
const defaultValue = inputValueIntrospection.defaultValue != null ? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type) : void 0;
|
|
9029
9029
|
return {
|
|
9030
9030
|
description: inputValueIntrospection.description,
|
|
9031
9031
|
type,
|
|
@@ -9056,7 +9056,7 @@ function buildClientSchema(introspection, options) {
|
|
|
9056
9056
|
function extendSchema(schema, documentAST, options) {
|
|
9057
9057
|
assertSchema(schema);
|
|
9058
9058
|
documentAST != null && documentAST.kind === exports.Kind.DOCUMENT || devAssert(false, "Must provide valid Document AST.");
|
|
9059
|
-
if ((options === null || options ===
|
|
9059
|
+
if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
|
|
9060
9060
|
assertValidSDLExtension(documentAST, schema);
|
|
9061
9061
|
}
|
|
9062
9062
|
const schemaConfig = schema.toConfig();
|
|
@@ -9095,7 +9095,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9095
9095
|
for (const typeNode of typeDefs) {
|
|
9096
9096
|
var _stdTypeMap$name;
|
|
9097
9097
|
const name = typeNode.name.value;
|
|
9098
|
-
typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !==
|
|
9098
|
+
typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode);
|
|
9099
9099
|
}
|
|
9100
9100
|
const operationTypes = {
|
|
9101
9101
|
// Get the extended root operation types.
|
|
@@ -9107,14 +9107,14 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9107
9107
|
...getOperationTypes(schemaExtensions)
|
|
9108
9108
|
};
|
|
9109
9109
|
return {
|
|
9110
|
-
description: (_schemaDef = schemaDef) === null || _schemaDef ===
|
|
9110
|
+
description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value,
|
|
9111
9111
|
...operationTypes,
|
|
9112
9112
|
types: Object.values(typeMap),
|
|
9113
9113
|
directives: [...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective)],
|
|
9114
9114
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
9115
|
-
astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !==
|
|
9115
|
+
astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode,
|
|
9116
9116
|
extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),
|
|
9117
|
-
assumeValid: (_options$assumeValid = options === null || options ===
|
|
9117
|
+
assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false
|
|
9118
9118
|
};
|
|
9119
9119
|
function replaceType(type) {
|
|
9120
9120
|
if (isListType(type)) {
|
|
@@ -9162,7 +9162,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9162
9162
|
function extendInputObjectType(type) {
|
|
9163
9163
|
var _typeExtensionsMap$co;
|
|
9164
9164
|
const config = type.toConfig();
|
|
9165
|
-
const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !==
|
|
9165
|
+
const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
9166
9166
|
return new GraphQLInputObjectType({
|
|
9167
9167
|
...config,
|
|
9168
9168
|
fields: () => ({
|
|
@@ -9178,7 +9178,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9178
9178
|
function extendEnumType(type) {
|
|
9179
9179
|
var _typeExtensionsMap$ty;
|
|
9180
9180
|
const config = type.toConfig();
|
|
9181
|
-
const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !==
|
|
9181
|
+
const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
9182
9182
|
return new GraphQLEnumType({
|
|
9183
9183
|
...config,
|
|
9184
9184
|
values: {
|
|
@@ -9191,11 +9191,11 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9191
9191
|
function extendScalarType(type) {
|
|
9192
9192
|
var _typeExtensionsMap$co2;
|
|
9193
9193
|
const config = type.toConfig();
|
|
9194
|
-
const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !==
|
|
9194
|
+
const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
9195
9195
|
let specifiedByURL = config.specifiedByURL;
|
|
9196
9196
|
for (const extensionNode of extensions) {
|
|
9197
9197
|
var _getSpecifiedByURL;
|
|
9198
|
-
specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !==
|
|
9198
|
+
specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL;
|
|
9199
9199
|
}
|
|
9200
9200
|
return new GraphQLScalarType({
|
|
9201
9201
|
...config,
|
|
@@ -9206,7 +9206,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9206
9206
|
function extendObjectType(type) {
|
|
9207
9207
|
var _typeExtensionsMap$co3;
|
|
9208
9208
|
const config = type.toConfig();
|
|
9209
|
-
const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !==
|
|
9209
|
+
const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
9210
9210
|
return new GraphQLObjectType({
|
|
9211
9211
|
...config,
|
|
9212
9212
|
interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
|
|
@@ -9220,7 +9220,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9220
9220
|
function extendInterfaceType(type) {
|
|
9221
9221
|
var _typeExtensionsMap$co4;
|
|
9222
9222
|
const config = type.toConfig();
|
|
9223
|
-
const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !==
|
|
9223
|
+
const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
9224
9224
|
return new GraphQLInterfaceType({
|
|
9225
9225
|
...config,
|
|
9226
9226
|
interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
|
|
@@ -9234,7 +9234,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9234
9234
|
function extendUnionType(type) {
|
|
9235
9235
|
var _typeExtensionsMap$co5;
|
|
9236
9236
|
const config = type.toConfig();
|
|
9237
|
-
const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !==
|
|
9237
|
+
const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
9238
9238
|
return new GraphQLUnionType({
|
|
9239
9239
|
...config,
|
|
9240
9240
|
types: () => [...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions)],
|
|
@@ -9260,7 +9260,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9260
9260
|
var _node$operationTypes;
|
|
9261
9261
|
const operationTypesNodes = (
|
|
9262
9262
|
/* c8 ignore next */
|
|
9263
|
-
(_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !==
|
|
9263
|
+
(_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []
|
|
9264
9264
|
);
|
|
9265
9265
|
for (const operationType of operationTypesNodes) {
|
|
9266
9266
|
opTypes[operationType.operation] = getNamedType2(operationType.type);
|
|
@@ -9271,8 +9271,8 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9271
9271
|
function getNamedType2(node) {
|
|
9272
9272
|
var _stdTypeMap$name2;
|
|
9273
9273
|
const name = node.name.value;
|
|
9274
|
-
const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !==
|
|
9275
|
-
if (type ===
|
|
9274
|
+
const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name];
|
|
9275
|
+
if (type === void 0) {
|
|
9276
9276
|
throw new Error(`Unknown type: "${name}".`);
|
|
9277
9277
|
}
|
|
9278
9278
|
return type;
|
|
@@ -9290,7 +9290,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9290
9290
|
var _node$description;
|
|
9291
9291
|
return new GraphQLDirective({
|
|
9292
9292
|
name: node.name.value,
|
|
9293
|
-
description: (_node$description = node.description) === null || _node$description ===
|
|
9293
|
+
description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value,
|
|
9294
9294
|
// @ts-expect-error
|
|
9295
9295
|
locations: node.locations.map(({
|
|
9296
9296
|
value
|
|
@@ -9306,7 +9306,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9306
9306
|
var _node$fields;
|
|
9307
9307
|
const nodeFields = (
|
|
9308
9308
|
/* c8 ignore next */
|
|
9309
|
-
(_node$fields = node.fields) !== null && _node$fields !==
|
|
9309
|
+
(_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []
|
|
9310
9310
|
);
|
|
9311
9311
|
for (const field of nodeFields) {
|
|
9312
9312
|
var _field$description;
|
|
@@ -9315,7 +9315,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9315
9315
|
// value, that would throw immediately while type system validation
|
|
9316
9316
|
// with validateSchema() will produce more actionable results.
|
|
9317
9317
|
type: getWrappedType(field.type),
|
|
9318
|
-
description: (_field$description = field.description) === null || _field$description ===
|
|
9318
|
+
description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value,
|
|
9319
9319
|
args: buildArgumentMap(field.arguments),
|
|
9320
9320
|
deprecationReason: getDeprecationReason(field),
|
|
9321
9321
|
astNode: field
|
|
@@ -9327,7 +9327,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9327
9327
|
function buildArgumentMap(args) {
|
|
9328
9328
|
const argsNodes = (
|
|
9329
9329
|
/* c8 ignore next */
|
|
9330
|
-
args !== null && args !==
|
|
9330
|
+
args !== null && args !== void 0 ? args : []
|
|
9331
9331
|
);
|
|
9332
9332
|
const argConfigMap = /* @__PURE__ */ Object.create(null);
|
|
9333
9333
|
for (const arg of argsNodes) {
|
|
@@ -9335,7 +9335,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9335
9335
|
const type = getWrappedType(arg.type);
|
|
9336
9336
|
argConfigMap[arg.name.value] = {
|
|
9337
9337
|
type,
|
|
9338
|
-
description: (_arg$description = arg.description) === null || _arg$description ===
|
|
9338
|
+
description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value,
|
|
9339
9339
|
defaultValue: valueFromAST(arg.defaultValue, type),
|
|
9340
9340
|
deprecationReason: getDeprecationReason(arg),
|
|
9341
9341
|
astNode: arg
|
|
@@ -9349,14 +9349,14 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9349
9349
|
var _node$fields2;
|
|
9350
9350
|
const fieldsNodes = (
|
|
9351
9351
|
/* c8 ignore next */
|
|
9352
|
-
(_node$fields2 = node.fields) !== null && _node$fields2 !==
|
|
9352
|
+
(_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : []
|
|
9353
9353
|
);
|
|
9354
9354
|
for (const field of fieldsNodes) {
|
|
9355
9355
|
var _field$description2;
|
|
9356
9356
|
const type = getWrappedType(field.type);
|
|
9357
9357
|
inputFieldMap[field.name.value] = {
|
|
9358
9358
|
type,
|
|
9359
|
-
description: (_field$description2 = field.description) === null || _field$description2 ===
|
|
9359
|
+
description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value,
|
|
9360
9360
|
defaultValue: valueFromAST(field.defaultValue, type),
|
|
9361
9361
|
deprecationReason: getDeprecationReason(field),
|
|
9362
9362
|
astNode: field
|
|
@@ -9371,12 +9371,12 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9371
9371
|
var _node$values;
|
|
9372
9372
|
const valuesNodes = (
|
|
9373
9373
|
/* c8 ignore next */
|
|
9374
|
-
(_node$values = node.values) !== null && _node$values !==
|
|
9374
|
+
(_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []
|
|
9375
9375
|
);
|
|
9376
9376
|
for (const value of valuesNodes) {
|
|
9377
9377
|
var _value$description;
|
|
9378
9378
|
enumValueMap[value.name.value] = {
|
|
9379
|
-
description: (_value$description = value.description) === null || _value$description ===
|
|
9379
|
+
description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value,
|
|
9380
9380
|
deprecationReason: getDeprecationReason(value),
|
|
9381
9381
|
astNode: value
|
|
9382
9382
|
};
|
|
@@ -9391,7 +9391,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9391
9391
|
var _node$interfaces$map, _node$interfaces;
|
|
9392
9392
|
return (
|
|
9393
9393
|
/* c8 ignore next */
|
|
9394
|
-
(_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces ===
|
|
9394
|
+
(_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType2)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : []
|
|
9395
9395
|
);
|
|
9396
9396
|
}
|
|
9397
9397
|
);
|
|
@@ -9403,7 +9403,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9403
9403
|
var _node$types$map, _node$types;
|
|
9404
9404
|
return (
|
|
9405
9405
|
/* c8 ignore next */
|
|
9406
|
-
(_node$types$map = (_node$types = node.types) === null || _node$types ===
|
|
9406
|
+
(_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType2)) !== null && _node$types$map !== void 0 ? _node$types$map : []
|
|
9407
9407
|
);
|
|
9408
9408
|
}
|
|
9409
9409
|
);
|
|
@@ -9411,14 +9411,14 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9411
9411
|
function buildType(astNode) {
|
|
9412
9412
|
var _typeExtensionsMap$na;
|
|
9413
9413
|
const name = astNode.name.value;
|
|
9414
|
-
const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !==
|
|
9414
|
+
const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : [];
|
|
9415
9415
|
switch (astNode.kind) {
|
|
9416
9416
|
case exports.Kind.OBJECT_TYPE_DEFINITION: {
|
|
9417
9417
|
var _astNode$description;
|
|
9418
9418
|
const allNodes = [astNode, ...extensionASTNodes];
|
|
9419
9419
|
return new GraphQLObjectType({
|
|
9420
9420
|
name,
|
|
9421
|
-
description: (_astNode$description = astNode.description) === null || _astNode$description ===
|
|
9421
|
+
description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value,
|
|
9422
9422
|
interfaces: () => buildInterfaces(allNodes),
|
|
9423
9423
|
fields: () => buildFieldMap(allNodes),
|
|
9424
9424
|
astNode,
|
|
@@ -9430,7 +9430,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9430
9430
|
const allNodes = [astNode, ...extensionASTNodes];
|
|
9431
9431
|
return new GraphQLInterfaceType({
|
|
9432
9432
|
name,
|
|
9433
|
-
description: (_astNode$description2 = astNode.description) === null || _astNode$description2 ===
|
|
9433
|
+
description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value,
|
|
9434
9434
|
interfaces: () => buildInterfaces(allNodes),
|
|
9435
9435
|
fields: () => buildFieldMap(allNodes),
|
|
9436
9436
|
astNode,
|
|
@@ -9442,7 +9442,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9442
9442
|
const allNodes = [astNode, ...extensionASTNodes];
|
|
9443
9443
|
return new GraphQLEnumType({
|
|
9444
9444
|
name,
|
|
9445
|
-
description: (_astNode$description3 = astNode.description) === null || _astNode$description3 ===
|
|
9445
|
+
description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value,
|
|
9446
9446
|
values: buildEnumValueMap(allNodes),
|
|
9447
9447
|
astNode,
|
|
9448
9448
|
extensionASTNodes
|
|
@@ -9453,7 +9453,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9453
9453
|
const allNodes = [astNode, ...extensionASTNodes];
|
|
9454
9454
|
return new GraphQLUnionType({
|
|
9455
9455
|
name,
|
|
9456
|
-
description: (_astNode$description4 = astNode.description) === null || _astNode$description4 ===
|
|
9456
|
+
description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value,
|
|
9457
9457
|
types: () => buildUnionTypes(allNodes),
|
|
9458
9458
|
astNode,
|
|
9459
9459
|
extensionASTNodes
|
|
@@ -9463,7 +9463,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9463
9463
|
var _astNode$description5;
|
|
9464
9464
|
return new GraphQLScalarType({
|
|
9465
9465
|
name,
|
|
9466
|
-
description: (_astNode$description5 = astNode.description) === null || _astNode$description5 ===
|
|
9466
|
+
description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value,
|
|
9467
9467
|
specifiedByURL: getSpecifiedByURL(astNode),
|
|
9468
9468
|
astNode,
|
|
9469
9469
|
extensionASTNodes
|
|
@@ -9474,7 +9474,7 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9474
9474
|
const allNodes = [astNode, ...extensionASTNodes];
|
|
9475
9475
|
return new GraphQLInputObjectType({
|
|
9476
9476
|
name,
|
|
9477
|
-
description: (_astNode$description6 = astNode.description) === null || _astNode$description6 ===
|
|
9477
|
+
description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value,
|
|
9478
9478
|
fields: () => buildInputFieldMap(allNodes),
|
|
9479
9479
|
astNode,
|
|
9480
9480
|
extensionASTNodes
|
|
@@ -9486,21 +9486,21 @@ function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
|
9486
9486
|
var stdTypeMap = keyMap([...specifiedScalarTypes, ...introspectionTypes], (type) => type.name);
|
|
9487
9487
|
function getDeprecationReason(node) {
|
|
9488
9488
|
const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node);
|
|
9489
|
-
return deprecated === null || deprecated ===
|
|
9489
|
+
return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason;
|
|
9490
9490
|
}
|
|
9491
9491
|
function getSpecifiedByURL(node) {
|
|
9492
9492
|
const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node);
|
|
9493
|
-
return specifiedBy === null || specifiedBy ===
|
|
9493
|
+
return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url;
|
|
9494
9494
|
}
|
|
9495
9495
|
|
|
9496
9496
|
// ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/buildASTSchema.mjs
|
|
9497
9497
|
function buildASTSchema(documentAST, options) {
|
|
9498
9498
|
documentAST != null && documentAST.kind === exports.Kind.DOCUMENT || devAssert(false, "Must provide valid Document AST.");
|
|
9499
|
-
if ((options === null || options ===
|
|
9499
|
+
if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
|
|
9500
9500
|
assertValidSDL(documentAST);
|
|
9501
9501
|
}
|
|
9502
9502
|
const emptySchemaConfig = {
|
|
9503
|
-
description:
|
|
9503
|
+
description: void 0,
|
|
9504
9504
|
types: [],
|
|
9505
9505
|
directives: [],
|
|
9506
9506
|
extensions: /* @__PURE__ */ Object.create(null),
|
|
@@ -9535,12 +9535,12 @@ function buildASTSchema(documentAST, options) {
|
|
|
9535
9535
|
}
|
|
9536
9536
|
function buildSchema(source, options) {
|
|
9537
9537
|
const document = parse(source, {
|
|
9538
|
-
noLocation: options === null || options ===
|
|
9539
|
-
allowLegacyFragmentVariables: options === null || options ===
|
|
9538
|
+
noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
|
|
9539
|
+
allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables
|
|
9540
9540
|
});
|
|
9541
9541
|
return buildASTSchema(document, {
|
|
9542
|
-
assumeValidSDL: options === null || options ===
|
|
9543
|
-
assumeValid: options === null || options ===
|
|
9542
|
+
assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL,
|
|
9543
|
+
assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
|
|
9544
9544
|
});
|
|
9545
9545
|
}
|
|
9546
9546
|
|
|
@@ -9870,7 +9870,7 @@ function collectTransitiveDependencies(collected, depGraph, fromName) {
|
|
|
9870
9870
|
if (!collected.has(fromName)) {
|
|
9871
9871
|
collected.add(fromName);
|
|
9872
9872
|
const immediateDeps = depGraph[fromName];
|
|
9873
|
-
if (immediateDeps !==
|
|
9873
|
+
if (immediateDeps !== void 0) {
|
|
9874
9874
|
for (const toName of immediateDeps) {
|
|
9875
9875
|
collectTransitiveDependencies(collected, depGraph, toName);
|
|
9876
9876
|
}
|
|
@@ -10166,8 +10166,8 @@ function findArgChanges(oldType, oldField, newField) {
|
|
|
10166
10166
|
type: exports.BreakingChangeType.ARG_CHANGED_KIND,
|
|
10167
10167
|
description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ${String(oldArg.type)} to ${String(newArg.type)}.`
|
|
10168
10168
|
});
|
|
10169
|
-
} else if (oldArg.defaultValue !==
|
|
10170
|
-
if (newArg.defaultValue ===
|
|
10169
|
+
} else if (oldArg.defaultValue !== void 0) {
|
|
10170
|
+
if (newArg.defaultValue === void 0) {
|
|
10171
10171
|
schemaChanges.push({
|
|
10172
10172
|
type: exports.DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
|
|
10173
10173
|
description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.`
|
|
@@ -10268,14 +10268,14 @@ function diff(oldArray, newArray) {
|
|
|
10268
10268
|
}) => name);
|
|
10269
10269
|
for (const oldItem of oldArray) {
|
|
10270
10270
|
const newItem = newMap[oldItem.name];
|
|
10271
|
-
if (newItem ===
|
|
10271
|
+
if (newItem === void 0) {
|
|
10272
10272
|
removed.push(oldItem);
|
|
10273
10273
|
} else {
|
|
10274
10274
|
persisted.push([oldItem, newItem]);
|
|
10275
10275
|
}
|
|
10276
10276
|
}
|
|
10277
10277
|
for (const newItem of newArray) {
|
|
10278
|
-
if (oldMap[newItem.name] ===
|
|
10278
|
+
if (oldMap[newItem.name] === void 0) {
|
|
10279
10279
|
added.push(newItem);
|
|
10280
10280
|
}
|
|
10281
10281
|
}
|