@settlemint/sdk-mcp 2.6.2-prdbaefab2 → 2.6.2-prfaedf028
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/dist/mcp.js +406 -342
- package/dist/mcp.js.map +7 -8
- package/package.json +4 -4
package/dist/mcp.js
CHANGED
|
@@ -74120,8 +74120,8 @@ function collectSchemaParts(sources) {
|
|
|
74120
74120
|
};
|
|
74121
74121
|
}
|
|
74122
74122
|
|
|
74123
|
-
// ../../node_modules/.bun/@graphql-tools+url-loader@
|
|
74124
|
-
var
|
|
74123
|
+
// ../../node_modules/.bun/@graphql-tools+url-loader@9.0.0+ded46c799560c44e/node_modules/@graphql-tools/url-loader/esm/index.js
|
|
74124
|
+
var import_graphql54 = __toESM(require_graphql2(), 1);
|
|
74125
74125
|
var import_isomorphic_ws3 = __toESM(require_ws(), 1);
|
|
74126
74126
|
// ../../node_modules/.bun/@envelop+core@5.3.0/node_modules/@envelop/core/esm/document-string-map.js
|
|
74127
74127
|
var documentStringMap = new WeakMap;
|
|
@@ -74133,7 +74133,7 @@ function getDocumentString(document, print5) {
|
|
|
74133
74133
|
}
|
|
74134
74134
|
return documentSource;
|
|
74135
74135
|
}
|
|
74136
|
-
// ../../node_modules/.bun/@graphql-tools+executor-common@0.0
|
|
74136
|
+
// ../../node_modules/.bun/@graphql-tools+executor-common@1.0.0+ded46c799560c44e/node_modules/@graphql-tools/executor-common/dist/index.js
|
|
74137
74137
|
var import_graphql45 = __toESM(require_graphql2(), 1);
|
|
74138
74138
|
var defaultPrintFn = memoize1(function defaultPrintFn2(document) {
|
|
74139
74139
|
return import_graphql45.stripIgnoredCharacters(getDocumentString(document, import_graphql45.print));
|
|
@@ -74722,7 +74722,7 @@ function isFatalInternalCloseCode(code) {
|
|
|
74722
74722
|
function isWebSocket(val) {
|
|
74723
74723
|
return typeof val === "function" && "constructor" in val && "CLOSED" in val && "CLOSING" in val && "CONNECTING" in val && "OPEN" in val;
|
|
74724
74724
|
}
|
|
74725
|
-
// ../../node_modules/.bun/@graphql-tools+executor-graphql-ws@
|
|
74725
|
+
// ../../node_modules/.bun/@graphql-tools+executor-graphql-ws@3.0.0+ded46c799560c44e/node_modules/@graphql-tools/executor-graphql-ws/dist/index.js
|
|
74726
74726
|
var import_isomorphic_ws = __toESM(require_ws(), 1);
|
|
74727
74727
|
function isClient(client) {
|
|
74728
74728
|
return "subscribe" in client;
|
|
@@ -74787,7 +74787,7 @@ function buildGraphQLWSExecutor(clientOptionsOrClient) {
|
|
|
74787
74787
|
return executor2;
|
|
74788
74788
|
}
|
|
74789
74789
|
|
|
74790
|
-
// ../../node_modules/.bun/@graphql-hive+signal@
|
|
74790
|
+
// ../../node_modules/.bun/@graphql-hive+signal@2.0.0/node_modules/@graphql-hive/signal/dist/index.js
|
|
74791
74791
|
var isNode = !globalThis.Bun && globalThis.process?.release?.name === "node";
|
|
74792
74792
|
var anySignalRegistry = isNode ? new FinalizationRegistry((cb) => cb()) : null;
|
|
74793
74793
|
var controllerInSignalSy = Symbol("CONTROLLER_IN_SIGNAL");
|
|
@@ -74839,24 +74839,6 @@ function abortSignalAny(signals) {
|
|
|
74839
74839
|
return ctrl.signal;
|
|
74840
74840
|
}
|
|
74841
74841
|
|
|
74842
|
-
// ../../node_modules/.bun/@graphql-tools+executor-common@0.0.4+ded46c799560c44e/node_modules/@graphql-tools/executor-common/dist/index.js
|
|
74843
|
-
var import_graphql46 = __toESM(require_graphql2(), 1);
|
|
74844
|
-
var defaultPrintFn3 = memoize1(function defaultPrintFn22(document) {
|
|
74845
|
-
return import_graphql46.stripIgnoredCharacters(getDocumentString(document, import_graphql46.print));
|
|
74846
|
-
});
|
|
74847
|
-
function serializeExecutionRequest2({
|
|
74848
|
-
executionRequest,
|
|
74849
|
-
excludeQuery,
|
|
74850
|
-
printFn = defaultPrintFn3
|
|
74851
|
-
}) {
|
|
74852
|
-
return {
|
|
74853
|
-
query: excludeQuery ? undefined : printFn(executionRequest.document),
|
|
74854
|
-
variables: (executionRequest.variables && Object.keys(executionRequest.variables).length) > 0 ? executionRequest.variables : undefined,
|
|
74855
|
-
operationName: executionRequest.operationName ? executionRequest.operationName : undefined,
|
|
74856
|
-
extensions: executionRequest.extensions && Object.keys(executionRequest.extensions).length > 0 ? executionRequest.extensions : undefined
|
|
74857
|
-
};
|
|
74858
|
-
}
|
|
74859
|
-
|
|
74860
74842
|
// ../../node_modules/.bun/@whatwg-node+fetch@0.10.10/node_modules/@whatwg-node/fetch/dist/node-ponyfill.js
|
|
74861
74843
|
var createNodePonyfill = require_create_node_ponyfill();
|
|
74862
74844
|
var shouldSkipPonyfill = require_shouldSkipPonyfill();
|
|
@@ -75944,8 +75926,8 @@ function latest(contenders) {
|
|
|
75944
75926
|
});
|
|
75945
75927
|
}
|
|
75946
75928
|
|
|
75947
|
-
// ../../node_modules/.bun/@graphql-tools+executor-http@
|
|
75948
|
-
var
|
|
75929
|
+
// ../../node_modules/.bun/@graphql-tools+executor-http@3.0.0+ded46c799560c44e/node_modules/@graphql-tools/executor-http/dist/index.js
|
|
75930
|
+
var import_graphql46 = __toESM(require_graphql2(), 1);
|
|
75949
75931
|
|
|
75950
75932
|
// ../../node_modules/.bun/meros@1.3.1/node_modules/meros/browser/index.mjs
|
|
75951
75933
|
async function e(e2, t) {
|
|
@@ -76040,7 +76022,7 @@ async function e2(e3, t) {
|
|
|
76040
76022
|
}(e3, `--${i}`, t);
|
|
76041
76023
|
}
|
|
76042
76024
|
|
|
76043
|
-
// ../../node_modules/.bun/@graphql-tools+executor-http@
|
|
76025
|
+
// ../../node_modules/.bun/@graphql-tools+executor-http@3.0.0+ded46c799560c44e/node_modules/@graphql-tools/executor-http/dist/index.js
|
|
76044
76026
|
function isPlainObject2(value) {
|
|
76045
76027
|
if (typeof value !== "object" || value === null) {
|
|
76046
76028
|
return false;
|
|
@@ -76186,7 +76168,7 @@ function isBlob(obj) {
|
|
|
76186
76168
|
return typeof obj.arrayBuffer === "function";
|
|
76187
76169
|
}
|
|
76188
76170
|
function createGraphQLErrorForAbort(reason, extensions) {
|
|
76189
|
-
if (reason instanceof
|
|
76171
|
+
if (reason instanceof import_graphql46.GraphQLError) {
|
|
76190
76172
|
return reason;
|
|
76191
76173
|
}
|
|
76192
76174
|
if (reason?.name === "TimeoutError") {
|
|
@@ -76237,7 +76219,8 @@ function handleEventStreamResponse(response, subscriptionCtrl, signal) {
|
|
|
76237
76219
|
return new Repeater((push2, stop2) => {
|
|
76238
76220
|
const decoder = new $TextDecoder;
|
|
76239
76221
|
const reader = body.getReader();
|
|
76240
|
-
|
|
76222
|
+
let closed = false;
|
|
76223
|
+
reader.closed.then(() => closed = true).catch((reason) => closed = reason);
|
|
76241
76224
|
stop2.then(() => {
|
|
76242
76225
|
subscriptionCtrl?.abort();
|
|
76243
76226
|
if (body.locked) {
|
|
@@ -76255,7 +76238,24 @@ function handleEventStreamResponse(response, subscriptionCtrl, signal) {
|
|
|
76255
76238
|
if (!body?.locked) {
|
|
76256
76239
|
return stop2();
|
|
76257
76240
|
}
|
|
76258
|
-
|
|
76241
|
+
let done, chunk;
|
|
76242
|
+
try {
|
|
76243
|
+
const result = await reader.read();
|
|
76244
|
+
done = result.done;
|
|
76245
|
+
chunk = result.value;
|
|
76246
|
+
} catch (err) {
|
|
76247
|
+
if (signal?.aborted) {
|
|
76248
|
+
await push2(createResultForAbort(signal.reason));
|
|
76249
|
+
return stop2();
|
|
76250
|
+
}
|
|
76251
|
+
const errErr = err instanceof Error ? err : new Error(String(err));
|
|
76252
|
+
await push2({
|
|
76253
|
+
errors: [
|
|
76254
|
+
createGraphQLError(errErr.message, { originalError: errErr })
|
|
76255
|
+
]
|
|
76256
|
+
});
|
|
76257
|
+
return stop2();
|
|
76258
|
+
}
|
|
76259
76259
|
if (done) {
|
|
76260
76260
|
return stop2();
|
|
76261
76261
|
}
|
|
@@ -76272,11 +76272,15 @@ function handleEventStreamResponse(response, subscriptionCtrl, signal) {
|
|
|
76272
76272
|
const data = JSON.parse(dataStr);
|
|
76273
76273
|
await push2(data.payload || data);
|
|
76274
76274
|
}
|
|
76275
|
-
const event = msg.split("event:")[1]?.trim()
|
|
76275
|
+
const event = msg.split("event:")[1]?.trim().split(`
|
|
76276
|
+
`)[0]?.trim();
|
|
76276
76277
|
if (event === "complete") {
|
|
76277
76278
|
return stop2();
|
|
76278
76279
|
}
|
|
76279
76280
|
}
|
|
76281
|
+
if (closed) {
|
|
76282
|
+
return stop2();
|
|
76283
|
+
}
|
|
76280
76284
|
return pump();
|
|
76281
76285
|
}
|
|
76282
76286
|
return pump();
|
|
@@ -76344,10 +76348,10 @@ function prepareGETUrl({
|
|
|
76344
76348
|
const finalUrl = urlObj.toString().replace(dummyHostname, "");
|
|
76345
76349
|
return finalUrl;
|
|
76346
76350
|
}
|
|
76351
|
+
var inflightRequests = /* @__PURE__ */ new Map;
|
|
76347
76352
|
function buildHTTPExecutor(options) {
|
|
76348
|
-
const printFn = options?.print ??
|
|
76353
|
+
const printFn = options?.print ?? defaultPrintFn;
|
|
76349
76354
|
let disposeCtrl;
|
|
76350
|
-
const serviceName = options?.serviceName;
|
|
76351
76355
|
const baseExecutor = (request, excludeQuery) => {
|
|
76352
76356
|
disposeCtrl ||= new AbortController;
|
|
76353
76357
|
if (disposeCtrl.signal.aborted) {
|
|
@@ -76369,12 +76373,34 @@ function buildHTTPExecutor(options) {
|
|
|
76369
76373
|
} else {
|
|
76370
76374
|
method ||= "POST";
|
|
76371
76375
|
}
|
|
76372
|
-
|
|
76376
|
+
let endpoint;
|
|
76377
|
+
if (request.extensions?.endpoint) {
|
|
76378
|
+
if (typeof request.extensions.endpoint === "string") {
|
|
76379
|
+
endpoint = request.extensions.endpoint;
|
|
76380
|
+
}
|
|
76381
|
+
if (typeof request.extensions.endpoint === "function") {
|
|
76382
|
+
endpoint = request.extensions.endpoint(request);
|
|
76383
|
+
}
|
|
76384
|
+
}
|
|
76385
|
+
if (!endpoint) {
|
|
76386
|
+
if (typeof options?.endpoint === "string") {
|
|
76387
|
+
endpoint = options.endpoint;
|
|
76388
|
+
}
|
|
76389
|
+
if (typeof options?.endpoint === "function") {
|
|
76390
|
+
endpoint = options.endpoint(request);
|
|
76391
|
+
}
|
|
76392
|
+
}
|
|
76393
|
+
if (!endpoint) {
|
|
76394
|
+
endpoint = "/graphql";
|
|
76395
|
+
}
|
|
76396
|
+
let isCustomHeader = false;
|
|
76373
76397
|
const headers = { accept };
|
|
76374
76398
|
if (options?.headers) {
|
|
76399
|
+
isCustomHeader = true;
|
|
76375
76400
|
Object.assign(headers, typeof options?.headers === "function" ? options.headers(request) : options?.headers);
|
|
76376
76401
|
}
|
|
76377
76402
|
if (request.extensions?.headers) {
|
|
76403
|
+
isCustomHeader = true;
|
|
76378
76404
|
const { headers: headersFromExtensions, ...restExtensions } = request.extensions;
|
|
76379
76405
|
Object.assign(headers, headersFromExtensions);
|
|
76380
76406
|
request.extensions = restExtensions;
|
|
@@ -76395,15 +76421,13 @@ function buildHTTPExecutor(options) {
|
|
|
76395
76421
|
}
|
|
76396
76422
|
const signal = abortSignalAny(signals);
|
|
76397
76423
|
const upstreamErrorExtensions = {
|
|
76398
|
-
code: "DOWNSTREAM_SERVICE_ERROR",
|
|
76399
|
-
serviceName,
|
|
76400
76424
|
request: {
|
|
76401
76425
|
method
|
|
76402
76426
|
}
|
|
76403
76427
|
};
|
|
76404
76428
|
const query = printFn(request.document);
|
|
76405
76429
|
let serializeFn = function serialize() {
|
|
76406
|
-
return
|
|
76430
|
+
return serializeExecutionRequest({
|
|
76407
76431
|
executionRequest: request,
|
|
76408
76432
|
excludeQuery,
|
|
76409
76433
|
printFn
|
|
@@ -76417,7 +76441,7 @@ function buildHTTPExecutor(options) {
|
|
|
76417
76441
|
version: 1,
|
|
76418
76442
|
sha256Hash
|
|
76419
76443
|
};
|
|
76420
|
-
return
|
|
76444
|
+
return serializeExecutionRequest({
|
|
76421
76445
|
executionRequest: {
|
|
76422
76446
|
...request,
|
|
76423
76447
|
extensions
|
|
@@ -76448,23 +76472,129 @@ function buildHTTPExecutor(options) {
|
|
|
76448
76472
|
]
|
|
76449
76473
|
};
|
|
76450
76474
|
}
|
|
76451
|
-
|
|
76475
|
+
function handleInflightRequest(inflightRequestOptions, context, info) {
|
|
76476
|
+
if (options?.deduplicateInflightRequests === false) {
|
|
76477
|
+
return runInflightRequest();
|
|
76478
|
+
}
|
|
76479
|
+
function runInflightRequest() {
|
|
76480
|
+
return handleMaybePromise(() => fetchFn(inflightRequestOptions.url, {
|
|
76481
|
+
method: inflightRequestOptions.method,
|
|
76482
|
+
headers: inflightRequestOptions.headers,
|
|
76483
|
+
body: inflightRequestOptions.body,
|
|
76484
|
+
credentials: inflightRequestOptions.credentials,
|
|
76485
|
+
signal: inflightRequestOptions.signal
|
|
76486
|
+
}, context, info), (fetchResult) => handleMaybePromise(() => {
|
|
76487
|
+
upstreamErrorExtensions.response ||= {};
|
|
76488
|
+
upstreamErrorExtensions.response.status = fetchResult.status;
|
|
76489
|
+
upstreamErrorExtensions.response.statusText = fetchResult.statusText;
|
|
76490
|
+
Object.defineProperty(upstreamErrorExtensions.response, "headers", {
|
|
76491
|
+
get() {
|
|
76492
|
+
return Object.fromEntries(fetchResult.headers.entries());
|
|
76493
|
+
}
|
|
76494
|
+
});
|
|
76495
|
+
if (options?.retry != null && !fetchResult.status.toString().startsWith("2")) {
|
|
76496
|
+
throw new Error(fetchResult.statusText || `Upstream HTTP Error: ${fetchResult.status}`);
|
|
76497
|
+
}
|
|
76498
|
+
const contentType = fetchResult.headers.get("content-type");
|
|
76499
|
+
if (contentType?.includes("text/event-stream")) {
|
|
76500
|
+
return handleEventStreamResponse(fetchResult, subscriptionCtrl, signal);
|
|
76501
|
+
} else if (contentType?.includes("multipart/mixed")) {
|
|
76502
|
+
return handleMultipartMixedResponse(fetchResult);
|
|
76503
|
+
}
|
|
76504
|
+
return fetchResult.text();
|
|
76505
|
+
}, (result) => {
|
|
76506
|
+
if (typeof result === "string") {
|
|
76507
|
+
upstreamErrorExtensions.response ||= {};
|
|
76508
|
+
upstreamErrorExtensions.response.body = result;
|
|
76509
|
+
if (result) {
|
|
76510
|
+
try {
|
|
76511
|
+
const parsedResult = JSON.parse(result);
|
|
76512
|
+
upstreamErrorExtensions.response.body = parsedResult;
|
|
76513
|
+
if (parsedResult.data == null && (parsedResult.errors == null || parsedResult.errors.length === 0)) {
|
|
76514
|
+
const message = `Unexpected empty "data" and "errors" fields in result: ${result}`;
|
|
76515
|
+
return {
|
|
76516
|
+
errors: [
|
|
76517
|
+
createGraphQLError(message, {
|
|
76518
|
+
originalError: new Error(message),
|
|
76519
|
+
extensions: upstreamErrorExtensions
|
|
76520
|
+
})
|
|
76521
|
+
]
|
|
76522
|
+
};
|
|
76523
|
+
}
|
|
76524
|
+
if (Array.isArray(parsedResult.errors)) {
|
|
76525
|
+
return {
|
|
76526
|
+
...parsedResult,
|
|
76527
|
+
errors: parsedResult.errors.map(({
|
|
76528
|
+
message,
|
|
76529
|
+
...options2
|
|
76530
|
+
}) => createGraphQLError(message, options2))
|
|
76531
|
+
};
|
|
76532
|
+
}
|
|
76533
|
+
return parsedResult;
|
|
76534
|
+
} catch (e3) {
|
|
76535
|
+
return {
|
|
76536
|
+
errors: [
|
|
76537
|
+
createGraphQLError(`Unexpected response: ${JSON.stringify(result)}`, {
|
|
76538
|
+
extensions: upstreamErrorExtensions,
|
|
76539
|
+
originalError: e3
|
|
76540
|
+
})
|
|
76541
|
+
]
|
|
76542
|
+
};
|
|
76543
|
+
}
|
|
76544
|
+
} else {
|
|
76545
|
+
const message = "No response returned";
|
|
76546
|
+
return {
|
|
76547
|
+
errors: [
|
|
76548
|
+
createGraphQLError(message, {
|
|
76549
|
+
extensions: upstreamErrorExtensions,
|
|
76550
|
+
originalError: new Error(message)
|
|
76551
|
+
})
|
|
76552
|
+
]
|
|
76553
|
+
};
|
|
76554
|
+
}
|
|
76555
|
+
} else {
|
|
76556
|
+
return result;
|
|
76557
|
+
}
|
|
76558
|
+
}, handleError), handleError);
|
|
76559
|
+
}
|
|
76560
|
+
if (typeof inflightRequestOptions.body === "object") {
|
|
76561
|
+
return runInflightRequest();
|
|
76562
|
+
}
|
|
76563
|
+
let inflightRequestId = `${inflightRequestOptions.url}|${inflightRequestOptions.method}`;
|
|
76564
|
+
if (inflightRequestOptions.body) {
|
|
76565
|
+
inflightRequestId += `|${inflightRequestOptions.body}`;
|
|
76566
|
+
}
|
|
76567
|
+
if (isCustomHeader) {
|
|
76568
|
+
inflightRequestId += `|${JSON.stringify(inflightRequestOptions.headers)}`;
|
|
76569
|
+
}
|
|
76570
|
+
let inflightRequest = inflightRequests.get(inflightRequestId);
|
|
76571
|
+
if (!inflightRequest) {
|
|
76572
|
+
inflightRequest = runInflightRequest();
|
|
76573
|
+
if (isPromise(inflightRequest)) {
|
|
76574
|
+
inflightRequests.set(inflightRequestId, inflightRequest);
|
|
76575
|
+
inflightRequest.finally(() => {
|
|
76576
|
+
inflightRequests.delete(inflightRequestId);
|
|
76577
|
+
});
|
|
76578
|
+
}
|
|
76579
|
+
}
|
|
76580
|
+
return inflightRequest;
|
|
76581
|
+
}
|
|
76582
|
+
return handleMaybePromise(() => serializeFn(), (body) => {
|
|
76452
76583
|
switch (method) {
|
|
76453
76584
|
case "GET": {
|
|
76454
76585
|
const finalUrl = prepareGETUrl({
|
|
76455
76586
|
baseUrl: endpoint,
|
|
76456
76587
|
body
|
|
76457
76588
|
});
|
|
76458
|
-
const
|
|
76589
|
+
const inflightRequestOptions = {
|
|
76590
|
+
url: finalUrl,
|
|
76459
76591
|
method: "GET",
|
|
76460
76592
|
headers,
|
|
76461
|
-
signal
|
|
76593
|
+
signal,
|
|
76594
|
+
credentials: options?.credentials
|
|
76462
76595
|
};
|
|
76463
|
-
if (options?.credentials != null) {
|
|
76464
|
-
fetchOptions.credentials = options.credentials;
|
|
76465
|
-
}
|
|
76466
76596
|
upstreamErrorExtensions.request.url = finalUrl;
|
|
76467
|
-
return
|
|
76597
|
+
return handleInflightRequest(inflightRequestOptions, request.context, request.info);
|
|
76468
76598
|
}
|
|
76469
76599
|
case "POST": {
|
|
76470
76600
|
upstreamErrorExtensions.request.body = body;
|
|
@@ -76476,95 +76606,19 @@ function buildHTTPExecutor(options) {
|
|
|
76476
76606
|
upstreamErrorExtensions.request.body = body2;
|
|
76477
76607
|
headers["content-type"] = "application/json";
|
|
76478
76608
|
}
|
|
76479
|
-
const
|
|
76609
|
+
const inflightRequestOptions = {
|
|
76610
|
+
url: endpoint,
|
|
76480
76611
|
method: "POST",
|
|
76481
76612
|
body: body2,
|
|
76482
76613
|
headers,
|
|
76614
|
+
credentials: options?.credentials,
|
|
76483
76615
|
signal
|
|
76484
76616
|
};
|
|
76485
|
-
|
|
76486
|
-
fetchOptions.credentials = options.credentials;
|
|
76487
|
-
}
|
|
76488
|
-
return fetchFn(endpoint, fetchOptions, request.context, request.info);
|
|
76617
|
+
return handleInflightRequest(inflightRequestOptions, request.context, request.info);
|
|
76489
76618
|
}, handleError);
|
|
76490
76619
|
}
|
|
76491
76620
|
}
|
|
76492
|
-
},
|
|
76493
|
-
upstreamErrorExtensions.response ||= {};
|
|
76494
|
-
upstreamErrorExtensions.response.status = fetchResult.status;
|
|
76495
|
-
upstreamErrorExtensions.response.statusText = fetchResult.statusText;
|
|
76496
|
-
Object.defineProperty(upstreamErrorExtensions.response, "headers", {
|
|
76497
|
-
get() {
|
|
76498
|
-
return Object.fromEntries(fetchResult.headers.entries());
|
|
76499
|
-
}
|
|
76500
|
-
});
|
|
76501
|
-
if (options?.retry != null && !fetchResult.status.toString().startsWith("2")) {
|
|
76502
|
-
throw new Error(fetchResult.statusText || `Upstream HTTP Error: ${fetchResult.status}`);
|
|
76503
|
-
}
|
|
76504
|
-
const contentType = fetchResult.headers.get("content-type");
|
|
76505
|
-
if (contentType?.includes("text/event-stream")) {
|
|
76506
|
-
return handleEventStreamResponse(fetchResult, subscriptionCtrl, signal);
|
|
76507
|
-
} else if (contentType?.includes("multipart/mixed")) {
|
|
76508
|
-
return handleMultipartMixedResponse(fetchResult);
|
|
76509
|
-
}
|
|
76510
|
-
return fetchResult.text();
|
|
76511
|
-
}, (result) => {
|
|
76512
|
-
if (typeof result === "string") {
|
|
76513
|
-
upstreamErrorExtensions.response ||= {};
|
|
76514
|
-
upstreamErrorExtensions.response.body = result;
|
|
76515
|
-
if (result) {
|
|
76516
|
-
try {
|
|
76517
|
-
const parsedResult = JSON.parse(result);
|
|
76518
|
-
upstreamErrorExtensions.response.body = parsedResult;
|
|
76519
|
-
if (parsedResult.data == null && (parsedResult.errors == null || parsedResult.errors.length === 0)) {
|
|
76520
|
-
return {
|
|
76521
|
-
errors: [
|
|
76522
|
-
createGraphQLError('Unexpected empty "data" and "errors" fields in result: ' + result, {
|
|
76523
|
-
extensions: upstreamErrorExtensions
|
|
76524
|
-
})
|
|
76525
|
-
]
|
|
76526
|
-
};
|
|
76527
|
-
}
|
|
76528
|
-
if (Array.isArray(parsedResult.errors)) {
|
|
76529
|
-
return {
|
|
76530
|
-
...parsedResult,
|
|
76531
|
-
errors: parsedResult.errors.map(({
|
|
76532
|
-
message,
|
|
76533
|
-
...options2
|
|
76534
|
-
}) => createGraphQLError(message, {
|
|
76535
|
-
...options2,
|
|
76536
|
-
extensions: {
|
|
76537
|
-
code: "DOWNSTREAM_SERVICE_ERROR",
|
|
76538
|
-
serviceName,
|
|
76539
|
-
...options2.extensions || {}
|
|
76540
|
-
}
|
|
76541
|
-
}))
|
|
76542
|
-
};
|
|
76543
|
-
}
|
|
76544
|
-
return parsedResult;
|
|
76545
|
-
} catch (e3) {
|
|
76546
|
-
return {
|
|
76547
|
-
errors: [
|
|
76548
|
-
createGraphQLError(`Unexpected response: ${JSON.stringify(result)}`, {
|
|
76549
|
-
extensions: upstreamErrorExtensions,
|
|
76550
|
-
originalError: e3
|
|
76551
|
-
})
|
|
76552
|
-
]
|
|
76553
|
-
};
|
|
76554
|
-
}
|
|
76555
|
-
} else {
|
|
76556
|
-
return {
|
|
76557
|
-
errors: [
|
|
76558
|
-
createGraphQLError("No response returned", {
|
|
76559
|
-
extensions: upstreamErrorExtensions
|
|
76560
|
-
})
|
|
76561
|
-
]
|
|
76562
|
-
};
|
|
76563
|
-
}
|
|
76564
|
-
} else {
|
|
76565
|
-
return result;
|
|
76566
|
-
}
|
|
76567
|
-
}, handleError), handleError), handleError);
|
|
76621
|
+
}, handleError);
|
|
76568
76622
|
};
|
|
76569
76623
|
let executor2 = baseExecutor;
|
|
76570
76624
|
if (options?.apq != null) {
|
|
@@ -76658,7 +76712,7 @@ function coerceFetchError(e3, {
|
|
|
76658
76712
|
}
|
|
76659
76713
|
|
|
76660
76714
|
// ../../node_modules/.bun/@graphql-tools+executor-legacy-ws@1.1.19+ded46c799560c44e/node_modules/@graphql-tools/executor-legacy-ws/esm/index.js
|
|
76661
|
-
var
|
|
76715
|
+
var import_graphql47 = __toESM(require_graphql2(), 1);
|
|
76662
76716
|
var import_isomorphic_ws2 = __toESM(require_ws(), 1);
|
|
76663
76717
|
var LEGACY_WS;
|
|
76664
76718
|
(function(LEGACY_WS2) {
|
|
@@ -76746,7 +76800,7 @@ function buildWSLegacyExecutor(subscriptionsEndpoint, WebSocketImpl, options) {
|
|
|
76746
76800
|
type: LEGACY_WS.START,
|
|
76747
76801
|
id,
|
|
76748
76802
|
payload: {
|
|
76749
|
-
query:
|
|
76803
|
+
query: import_graphql47.print(request.document),
|
|
76750
76804
|
variables: request.variables,
|
|
76751
76805
|
operationName: request.operationName
|
|
76752
76806
|
}
|
|
@@ -76802,11 +76856,11 @@ function buildWSLegacyExecutor(subscriptionsEndpoint, WebSocketImpl, options) {
|
|
|
76802
76856
|
return executor2;
|
|
76803
76857
|
}
|
|
76804
76858
|
|
|
76805
|
-
// ../../node_modules/.bun/@graphql-tools+delegate@
|
|
76806
|
-
var
|
|
76859
|
+
// ../../node_modules/.bun/@graphql-tools+delegate@11.0.0+ded46c799560c44e/node_modules/@graphql-tools/delegate/dist/index.js
|
|
76860
|
+
var import_graphql52 = __toESM(require_graphql2(), 1);
|
|
76807
76861
|
|
|
76808
76862
|
// ../../node_modules/.bun/@graphql-tools+executor@1.4.9+ded46c799560c44e/node_modules/@graphql-tools/executor/esm/execution/execute.js
|
|
76809
|
-
var
|
|
76863
|
+
var import_graphql49 = __toESM(require_graphql2(), 1);
|
|
76810
76864
|
|
|
76811
76865
|
// ../../node_modules/.bun/@graphql-tools+executor@1.4.9+ded46c799560c44e/node_modules/@graphql-tools/executor/esm/execution/coerceError.js
|
|
76812
76866
|
function coerceError(error43) {
|
|
@@ -76932,7 +76986,7 @@ function promiseForObject(object3, signal, signalPromise) {
|
|
|
76932
76986
|
}
|
|
76933
76987
|
|
|
76934
76988
|
// ../../node_modules/.bun/@graphql-tools+executor@1.4.9+ded46c799560c44e/node_modules/@graphql-tools/executor/esm/execution/values.js
|
|
76935
|
-
var
|
|
76989
|
+
var import_graphql48 = __toESM(require_graphql2(), 1);
|
|
76936
76990
|
function getVariableValues(schema, varDefNodes, inputs, options) {
|
|
76937
76991
|
const errors5 = [];
|
|
76938
76992
|
const maxErrors = options?.maxErrors;
|
|
@@ -76955,16 +77009,16 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
76955
77009
|
const coercedValues = {};
|
|
76956
77010
|
for (const varDefNode of varDefNodes) {
|
|
76957
77011
|
const varName = varDefNode.variable.name.value;
|
|
76958
|
-
const varType =
|
|
76959
|
-
if (!
|
|
76960
|
-
const varTypeStr =
|
|
77012
|
+
const varType = import_graphql48.typeFromAST(schema, varDefNode.type);
|
|
77013
|
+
if (!import_graphql48.isInputType(varType)) {
|
|
77014
|
+
const varTypeStr = import_graphql48.print(varDefNode.type);
|
|
76961
77015
|
onError(createGraphQLError(`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`, { nodes: varDefNode.type }));
|
|
76962
77016
|
continue;
|
|
76963
77017
|
}
|
|
76964
77018
|
if (!hasOwnProperty(inputs, varName)) {
|
|
76965
77019
|
if (varDefNode.defaultValue) {
|
|
76966
|
-
coercedValues[varName] =
|
|
76967
|
-
} else if (
|
|
77020
|
+
coercedValues[varName] = import_graphql48.valueFromAST(varDefNode.defaultValue, varType);
|
|
77021
|
+
} else if (import_graphql48.isNonNullType(varType)) {
|
|
76968
77022
|
const varTypeStr = inspect(varType);
|
|
76969
77023
|
onError(createGraphQLError(`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`, {
|
|
76970
77024
|
nodes: varDefNode
|
|
@@ -76973,14 +77027,14 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
76973
77027
|
continue;
|
|
76974
77028
|
}
|
|
76975
77029
|
const value = inputs[varName];
|
|
76976
|
-
if (value === null &&
|
|
77030
|
+
if (value === null && import_graphql48.isNonNullType(varType)) {
|
|
76977
77031
|
const varTypeStr = inspect(varType);
|
|
76978
77032
|
onError(createGraphQLError(`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`, {
|
|
76979
77033
|
nodes: varDefNode
|
|
76980
77034
|
}));
|
|
76981
77035
|
continue;
|
|
76982
77036
|
}
|
|
76983
|
-
coercedValues[varName] =
|
|
77037
|
+
coercedValues[varName] = import_graphql48.coerceInputValue(value, varType, (path2, invalidValue, error43) => {
|
|
76984
77038
|
let prefix = `Variable "$${varName}" got invalid value ` + inspect(invalidValue);
|
|
76985
77039
|
if (path2.length > 0) {
|
|
76986
77040
|
prefix += ` at "${varName}${printPathArray(path2)}"`;
|
|
@@ -77046,7 +77100,7 @@ function buildResponse(data, errors5) {
|
|
|
77046
77100
|
var getFragmentsFromDocument = memoize1(function getFragmentsFromDocument2(document) {
|
|
77047
77101
|
const fragments = Object.create(null);
|
|
77048
77102
|
for (const definition of document.definitions) {
|
|
77049
|
-
if (definition.kind ===
|
|
77103
|
+
if (definition.kind === import_graphql49.Kind.FRAGMENT_DEFINITION) {
|
|
77050
77104
|
fragments[definition.name.value] = definition;
|
|
77051
77105
|
}
|
|
77052
77106
|
}
|
|
@@ -77055,12 +77109,12 @@ var getFragmentsFromDocument = memoize1(function getFragmentsFromDocument2(docum
|
|
|
77055
77109
|
function buildExecutionContext(args) {
|
|
77056
77110
|
const { schema, document, rootValue, contextValue, variableValues: rawVariableValues, operationName, fieldResolver, typeResolver, subscribeFieldResolver, signal } = args;
|
|
77057
77111
|
signal?.throwIfAborted();
|
|
77058
|
-
|
|
77112
|
+
import_graphql49.assertValidSchema(schema);
|
|
77059
77113
|
const fragments = getFragmentsFromDocument(document);
|
|
77060
77114
|
let operation;
|
|
77061
77115
|
for (const definition of document.definitions) {
|
|
77062
77116
|
switch (definition.kind) {
|
|
77063
|
-
case
|
|
77117
|
+
case import_graphql49.Kind.OPERATION_DEFINITION:
|
|
77064
77118
|
if (operationName == null) {
|
|
77065
77119
|
if (operation !== undefined) {
|
|
77066
77120
|
return [
|
|
@@ -77242,14 +77296,14 @@ function executeField(exeContext, parentType, source, fieldNodes, path2, asyncPa
|
|
|
77242
77296
|
let result2;
|
|
77243
77297
|
for (let rawErrorItem of rawError.errors) {
|
|
77244
77298
|
rawErrorItem = coerceError(rawErrorItem);
|
|
77245
|
-
const error44 =
|
|
77299
|
+
const error44 = import_graphql49.locatedError(rawErrorItem, fieldNodes, pathToArray(path2));
|
|
77246
77300
|
result2 = handleFieldError(error44, returnType, errors5);
|
|
77247
77301
|
filterSubsequentPayloads(exeContext, path2, asyncPayloadRecord);
|
|
77248
77302
|
}
|
|
77249
77303
|
return result2;
|
|
77250
77304
|
}
|
|
77251
77305
|
rawError = coerceError(rawError);
|
|
77252
|
-
const error43 =
|
|
77306
|
+
const error43 = import_graphql49.locatedError(rawError, fieldNodes, pathToArray(path2));
|
|
77253
77307
|
const handledError = handleFieldError(error43, returnType, errors5);
|
|
77254
77308
|
filterSubsequentPayloads(exeContext, path2, asyncPayloadRecord);
|
|
77255
77309
|
return handledError;
|
|
@@ -77261,14 +77315,14 @@ function executeField(exeContext, parentType, source, fieldNodes, path2, asyncPa
|
|
|
77261
77315
|
let result;
|
|
77262
77316
|
for (let rawErrorItem of rawError.errors) {
|
|
77263
77317
|
rawErrorItem = coerceError(rawErrorItem);
|
|
77264
|
-
const error44 =
|
|
77318
|
+
const error44 = import_graphql49.locatedError(rawErrorItem, fieldNodes, pathToArray(path2));
|
|
77265
77319
|
result = handleFieldError(error44, returnType, errors5);
|
|
77266
77320
|
filterSubsequentPayloads(exeContext, path2, asyncPayloadRecord);
|
|
77267
77321
|
}
|
|
77268
77322
|
return result;
|
|
77269
77323
|
}
|
|
77270
77324
|
const coercedError = coerceError(rawError);
|
|
77271
|
-
const error43 =
|
|
77325
|
+
const error43 = import_graphql49.locatedError(coercedError, fieldNodes, pathToArray(path2));
|
|
77272
77326
|
const handledError = handleFieldError(error43, returnType, errors5);
|
|
77273
77327
|
filterSubsequentPayloads(exeContext, path2, asyncPayloadRecord);
|
|
77274
77328
|
return handledError;
|
|
@@ -77291,7 +77345,7 @@ function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path2) {
|
|
|
77291
77345
|
}
|
|
77292
77346
|
var CRITICAL_ERROR = "CRITICAL_ERROR";
|
|
77293
77347
|
function handleFieldError(error43, returnType, errors5) {
|
|
77294
|
-
if (
|
|
77348
|
+
if (import_graphql49.isNonNullType(returnType)) {
|
|
77295
77349
|
throw error43;
|
|
77296
77350
|
}
|
|
77297
77351
|
if (error43.extensions?.[CRITICAL_ERROR]) {
|
|
@@ -77304,7 +77358,7 @@ function completeValue(exeContext, returnType, fieldNodes, info, path2, result,
|
|
|
77304
77358
|
if (result instanceof Error) {
|
|
77305
77359
|
throw result;
|
|
77306
77360
|
}
|
|
77307
|
-
if (
|
|
77361
|
+
if (import_graphql49.isNonNullType(returnType)) {
|
|
77308
77362
|
const completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path2, result, asyncPayloadRecord);
|
|
77309
77363
|
if (completed === null) {
|
|
77310
77364
|
throw new Error(`Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`);
|
|
@@ -77314,16 +77368,16 @@ function completeValue(exeContext, returnType, fieldNodes, info, path2, result,
|
|
|
77314
77368
|
if (result == null) {
|
|
77315
77369
|
return null;
|
|
77316
77370
|
}
|
|
77317
|
-
if (
|
|
77371
|
+
if (import_graphql49.isListType(returnType)) {
|
|
77318
77372
|
return completeListValue(exeContext, returnType, fieldNodes, info, path2, result, asyncPayloadRecord);
|
|
77319
77373
|
}
|
|
77320
|
-
if (
|
|
77374
|
+
if (import_graphql49.isLeafType(returnType)) {
|
|
77321
77375
|
return completeLeafValue(returnType, result);
|
|
77322
77376
|
}
|
|
77323
|
-
if (
|
|
77377
|
+
if (import_graphql49.isAbstractType(returnType)) {
|
|
77324
77378
|
return completeAbstractValue(exeContext, returnType, fieldNodes, info, path2, result, asyncPayloadRecord);
|
|
77325
77379
|
}
|
|
77326
|
-
if (
|
|
77380
|
+
if (import_graphql49.isObjectType(returnType)) {
|
|
77327
77381
|
return completeObjectValue(exeContext, returnType, fieldNodes, info, path2, result, asyncPayloadRecord);
|
|
77328
77382
|
}
|
|
77329
77383
|
console.assert(false, "Cannot complete value of unexpected output type: " + inspect(returnType));
|
|
@@ -77332,7 +77386,7 @@ function getStreamValues(exeContext, fieldNodes, path2) {
|
|
|
77332
77386
|
if (typeof path2.key === "number") {
|
|
77333
77387
|
return;
|
|
77334
77388
|
}
|
|
77335
|
-
const stream2 =
|
|
77389
|
+
const stream2 = import_graphql49.getDirectiveValues(GraphQLStreamDirective, fieldNodes[0], exeContext.variableValues);
|
|
77336
77390
|
if (!stream2) {
|
|
77337
77391
|
return;
|
|
77338
77392
|
}
|
|
@@ -77372,7 +77426,7 @@ async function completeAsyncIteratorValue(exeContext, itemType, fieldNodes, info
|
|
|
77372
77426
|
}
|
|
77373
77427
|
} catch (rawError) {
|
|
77374
77428
|
const coercedError = coerceError(rawError);
|
|
77375
|
-
const error43 =
|
|
77429
|
+
const error43 = import_graphql49.locatedError(coercedError, fieldNodes, pathToArray(itemPath));
|
|
77376
77430
|
completedResults.push(handleFieldError(error43, itemType, errors5));
|
|
77377
77431
|
break;
|
|
77378
77432
|
}
|
|
@@ -77423,7 +77477,7 @@ function completeListItemValue(item, completedResults, errors5, exeContext, item
|
|
|
77423
77477
|
if (isPromise(completedItem)) {
|
|
77424
77478
|
completedResults.push(completedItem.then(undefined, (rawError) => {
|
|
77425
77479
|
rawError = coerceError(rawError);
|
|
77426
|
-
const error43 =
|
|
77480
|
+
const error43 = import_graphql49.locatedError(rawError, fieldNodes, pathToArray(itemPath));
|
|
77427
77481
|
const handledError = handleFieldError(error43, itemType, errors5);
|
|
77428
77482
|
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
|
|
77429
77483
|
return handledError;
|
|
@@ -77433,7 +77487,7 @@ function completeListItemValue(item, completedResults, errors5, exeContext, item
|
|
|
77433
77487
|
completedResults.push(completedItem);
|
|
77434
77488
|
} catch (rawError) {
|
|
77435
77489
|
const coercedError = coerceError(rawError);
|
|
77436
|
-
const error43 =
|
|
77490
|
+
const error43 = import_graphql49.locatedError(coercedError, fieldNodes, pathToArray(itemPath));
|
|
77437
77491
|
const handledError = handleFieldError(error43, itemType, errors5);
|
|
77438
77492
|
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
|
|
77439
77493
|
completedResults.push(handledError);
|
|
@@ -77445,7 +77499,7 @@ function completeLeafValue(returnType, result) {
|
|
|
77445
77499
|
try {
|
|
77446
77500
|
serializedResult = returnType.serialize(result);
|
|
77447
77501
|
} catch (err) {
|
|
77448
|
-
if (err instanceof
|
|
77502
|
+
if (err instanceof import_graphql49.GraphQLError) {
|
|
77449
77503
|
throw new Error(err.message);
|
|
77450
77504
|
}
|
|
77451
77505
|
throw err;
|
|
@@ -77468,8 +77522,8 @@ function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNo
|
|
|
77468
77522
|
if (runtimeTypeName == null) {
|
|
77469
77523
|
throw createGraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, { nodes: fieldNodes });
|
|
77470
77524
|
}
|
|
77471
|
-
if (
|
|
77472
|
-
if (
|
|
77525
|
+
if (import_graphql49.isObjectType(runtimeTypeName)) {
|
|
77526
|
+
if (import_graphql49.versionInfo.major >= 16) {
|
|
77473
77527
|
throw createGraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");
|
|
77474
77528
|
}
|
|
77475
77529
|
runtimeTypeName = runtimeTypeName.name;
|
|
@@ -77481,7 +77535,7 @@ function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNo
|
|
|
77481
77535
|
if (runtimeType == null) {
|
|
77482
77536
|
throw createGraphQLError(`Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, { nodes: fieldNodes });
|
|
77483
77537
|
}
|
|
77484
|
-
if (!
|
|
77538
|
+
if (!import_graphql49.isObjectType(runtimeType)) {
|
|
77485
77539
|
throw createGraphQLError(`Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, { nodes: fieldNodes });
|
|
77486
77540
|
}
|
|
77487
77541
|
if (!exeContext.schema.isSubType(returnType, runtimeType)) {
|
|
@@ -77674,12 +77728,12 @@ function executeSubscription(exeContext) {
|
|
|
77674
77728
|
const result = resolveFn(rootValue, args, contextValue, info);
|
|
77675
77729
|
if (isPromise(result)) {
|
|
77676
77730
|
return result.then((result2) => assertEventStream(result2, exeContext.signal, exeContext.onSignalAbort)).then(undefined, (error43) => {
|
|
77677
|
-
throw
|
|
77731
|
+
throw import_graphql49.locatedError(error43, fieldNodes, pathToArray(path2));
|
|
77678
77732
|
});
|
|
77679
77733
|
}
|
|
77680
77734
|
return assertEventStream(result, exeContext.signal, exeContext.onSignalAbort);
|
|
77681
77735
|
} catch (error43) {
|
|
77682
|
-
throw
|
|
77736
|
+
throw import_graphql49.locatedError(error43, fieldNodes, pathToArray(path2));
|
|
77683
77737
|
}
|
|
77684
77738
|
}
|
|
77685
77739
|
function assertEventStream(result, signal, onSignalAbort) {
|
|
@@ -77745,7 +77799,7 @@ function executeStreamField(path2, itemPath, item, exeContext, fieldNodes, info,
|
|
|
77745
77799
|
if (isPromise(completedItem)) {
|
|
77746
77800
|
completedItem = completedItem.then(undefined, (rawError) => {
|
|
77747
77801
|
rawError = coerceError(rawError);
|
|
77748
|
-
const error43 =
|
|
77802
|
+
const error43 = import_graphql49.locatedError(rawError, fieldNodes, pathToArray(itemPath));
|
|
77749
77803
|
const handledError = handleFieldError(error43, itemType, asyncPayloadRecord.errors);
|
|
77750
77804
|
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
|
|
77751
77805
|
return handledError;
|
|
@@ -77753,7 +77807,7 @@ function executeStreamField(path2, itemPath, item, exeContext, fieldNodes, info,
|
|
|
77753
77807
|
}
|
|
77754
77808
|
} catch (rawError) {
|
|
77755
77809
|
const coercedError = coerceError(rawError);
|
|
77756
|
-
const error43 =
|
|
77810
|
+
const error43 = import_graphql49.locatedError(coercedError, fieldNodes, pathToArray(itemPath));
|
|
77757
77811
|
completedItem = handleFieldError(error43, itemType, asyncPayloadRecord.errors);
|
|
77758
77812
|
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
|
|
77759
77813
|
}
|
|
@@ -77787,7 +77841,7 @@ async function executeStreamIteratorItem(iterator, exeContext, fieldNodes, info,
|
|
|
77787
77841
|
item = value;
|
|
77788
77842
|
} catch (rawError) {
|
|
77789
77843
|
const coercedError = coerceError(rawError);
|
|
77790
|
-
const error43 =
|
|
77844
|
+
const error43 = import_graphql49.locatedError(coercedError, fieldNodes, pathToArray(itemPath));
|
|
77791
77845
|
const value = handleFieldError(error43, itemType, asyncPayloadRecord.errors);
|
|
77792
77846
|
return { done: true, value };
|
|
77793
77847
|
}
|
|
@@ -77796,7 +77850,7 @@ async function executeStreamIteratorItem(iterator, exeContext, fieldNodes, info,
|
|
|
77796
77850
|
completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item, asyncPayloadRecord);
|
|
77797
77851
|
if (isPromise(completedItem)) {
|
|
77798
77852
|
completedItem = completedItem.then(undefined, (rawError) => {
|
|
77799
|
-
const error43 =
|
|
77853
|
+
const error43 = import_graphql49.locatedError(rawError, fieldNodes, pathToArray(itemPath));
|
|
77800
77854
|
const handledError = handleFieldError(error43, itemType, asyncPayloadRecord.errors);
|
|
77801
77855
|
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
|
|
77802
77856
|
return handledError;
|
|
@@ -77804,7 +77858,7 @@ async function executeStreamIteratorItem(iterator, exeContext, fieldNodes, info,
|
|
|
77804
77858
|
}
|
|
77805
77859
|
return { done: false, value: completedItem };
|
|
77806
77860
|
} catch (rawError) {
|
|
77807
|
-
const error43 =
|
|
77861
|
+
const error43 = import_graphql49.locatedError(rawError, fieldNodes, pathToArray(itemPath));
|
|
77808
77862
|
const value = handleFieldError(error43, itemType, asyncPayloadRecord.errors);
|
|
77809
77863
|
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
|
|
77810
77864
|
return { done: false, value };
|
|
@@ -78049,20 +78103,20 @@ function isStreamPayload(asyncPayload) {
|
|
|
78049
78103
|
}
|
|
78050
78104
|
function getFieldDef(schema, parentType, fieldNode) {
|
|
78051
78105
|
const fieldName = fieldNode.name.value;
|
|
78052
|
-
if (fieldName ===
|
|
78053
|
-
return
|
|
78054
|
-
} else if (fieldName ===
|
|
78055
|
-
return
|
|
78056
|
-
} else if (fieldName ===
|
|
78057
|
-
return
|
|
78106
|
+
if (fieldName === import_graphql49.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {
|
|
78107
|
+
return import_graphql49.SchemaMetaFieldDef;
|
|
78108
|
+
} else if (fieldName === import_graphql49.TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
|
|
78109
|
+
return import_graphql49.TypeMetaFieldDef;
|
|
78110
|
+
} else if (fieldName === import_graphql49.TypeNameMetaFieldDef.name) {
|
|
78111
|
+
return import_graphql49.TypeNameMetaFieldDef;
|
|
78058
78112
|
}
|
|
78059
78113
|
return parentType.getFields()[fieldName];
|
|
78060
78114
|
}
|
|
78061
78115
|
|
|
78062
78116
|
// ../../node_modules/.bun/@graphql-tools+executor@1.4.9+ded46c799560c44e/node_modules/@graphql-tools/executor/esm/execution/normalizedExecutor.js
|
|
78063
|
-
var
|
|
78117
|
+
var import_graphql50 = __toESM(require_graphql2(), 1);
|
|
78064
78118
|
function normalizedExecutor(args) {
|
|
78065
|
-
const operationAST =
|
|
78119
|
+
const operationAST = import_graphql50.getOperationAST(args.document, args.operationName);
|
|
78066
78120
|
if (operationAST == null) {
|
|
78067
78121
|
throw new Error("Must provide an operation.");
|
|
78068
78122
|
}
|
|
@@ -78090,9 +78144,9 @@ var executorFromSchema = memoize1(function executorFromSchema2(schema) {
|
|
|
78090
78144
|
};
|
|
78091
78145
|
});
|
|
78092
78146
|
|
|
78093
|
-
// ../../node_modules/.bun/@graphql-tools+batch-execute@
|
|
78147
|
+
// ../../node_modules/.bun/@graphql-tools+batch-execute@10.0.0+ded46c799560c44e/node_modules/@graphql-tools/batch-execute/dist/index.js
|
|
78094
78148
|
var import_dataloader = __toESM(require_dataloader(), 1);
|
|
78095
|
-
var
|
|
78149
|
+
var import_graphql51 = __toESM(require_graphql2(), 1);
|
|
78096
78150
|
function createPrefix(index) {
|
|
78097
78151
|
return `_v${index}_`;
|
|
78098
78152
|
}
|
|
@@ -78128,6 +78182,10 @@ function parseKeyFromPath(path2) {
|
|
|
78128
78182
|
};
|
|
78129
78183
|
}
|
|
78130
78184
|
function mergeRequests(requests, extensionsReducer) {
|
|
78185
|
+
if (requests.length === 1) {
|
|
78186
|
+
return requests[0];
|
|
78187
|
+
}
|
|
78188
|
+
const subgraphName = requests[0].subgraphName;
|
|
78131
78189
|
const mergedVariables = /* @__PURE__ */ Object.create(null);
|
|
78132
78190
|
const mergedVariableDefinitions = [];
|
|
78133
78191
|
const mergedSelections = [];
|
|
@@ -78158,24 +78216,25 @@ function mergeRequests(requests, extensionsReducer) {
|
|
|
78158
78216
|
}
|
|
78159
78217
|
const operationType = firstRequest.operationType ?? getOperationASTFromRequest(firstRequest).operation;
|
|
78160
78218
|
const mergedOperationDefinition = {
|
|
78161
|
-
kind:
|
|
78219
|
+
kind: import_graphql51.Kind.OPERATION_DEFINITION,
|
|
78162
78220
|
operation: operationType,
|
|
78163
78221
|
variableDefinitions: mergedVariableDefinitions,
|
|
78164
78222
|
selectionSet: {
|
|
78165
|
-
kind:
|
|
78223
|
+
kind: import_graphql51.Kind.SELECTION_SET,
|
|
78166
78224
|
selections: mergedSelections
|
|
78167
78225
|
}
|
|
78168
78226
|
};
|
|
78169
78227
|
const operationName = firstRequest.operationName ?? firstRequest.info?.operation?.name?.value;
|
|
78170
78228
|
if (operationName) {
|
|
78171
78229
|
mergedOperationDefinition.name = {
|
|
78172
|
-
kind:
|
|
78230
|
+
kind: import_graphql51.Kind.NAME,
|
|
78173
78231
|
value: operationName
|
|
78174
78232
|
};
|
|
78175
78233
|
}
|
|
78176
78234
|
return {
|
|
78235
|
+
subgraphName,
|
|
78177
78236
|
document: {
|
|
78178
|
-
kind:
|
|
78237
|
+
kind: import_graphql51.Kind.DOCUMENT,
|
|
78179
78238
|
definitions: [mergedOperationDefinition, ...mergedFragmentDefinitions]
|
|
78180
78239
|
},
|
|
78181
78240
|
variables: mergedVariables,
|
|
@@ -78201,13 +78260,13 @@ function prefixRequest(prefix, request) {
|
|
|
78201
78260
|
const fragmentSpreadImpl = {};
|
|
78202
78261
|
let hasFragments = false;
|
|
78203
78262
|
if (hasFragmentDefinitionsOrVariables) {
|
|
78204
|
-
prefixedDocument =
|
|
78205
|
-
[
|
|
78206
|
-
[
|
|
78263
|
+
prefixedDocument = import_graphql51.visit(prefixedDocument, {
|
|
78264
|
+
[import_graphql51.Kind.VARIABLE]: prefixNode,
|
|
78265
|
+
[import_graphql51.Kind.FRAGMENT_DEFINITION](node) {
|
|
78207
78266
|
hasFragments = true;
|
|
78208
78267
|
return prefixNode(node);
|
|
78209
78268
|
},
|
|
78210
|
-
[
|
|
78269
|
+
[import_graphql51.Kind.FRAGMENT_SPREAD]: (node) => {
|
|
78211
78270
|
node = prefixNodeName(node, prefix);
|
|
78212
78271
|
fragmentSpreadImpl[node.name.value] = true;
|
|
78213
78272
|
return node;
|
|
@@ -78235,7 +78294,7 @@ function prefixRequest(prefix, request) {
|
|
|
78235
78294
|
}
|
|
78236
78295
|
function aliasTopLevelFields(prefix, document) {
|
|
78237
78296
|
const transformer = {
|
|
78238
|
-
[
|
|
78297
|
+
[import_graphql51.Kind.OPERATION_DEFINITION]: (def) => {
|
|
78239
78298
|
const { selections } = def.selectionSet;
|
|
78240
78299
|
return {
|
|
78241
78300
|
...def,
|
|
@@ -78246,20 +78305,20 @@ function aliasTopLevelFields(prefix, document) {
|
|
|
78246
78305
|
};
|
|
78247
78306
|
}
|
|
78248
78307
|
};
|
|
78249
|
-
return
|
|
78250
|
-
[
|
|
78308
|
+
return import_graphql51.visit(document, transformer, {
|
|
78309
|
+
[import_graphql51.Kind.DOCUMENT]: [`definitions`]
|
|
78251
78310
|
});
|
|
78252
78311
|
}
|
|
78253
78312
|
function aliasFieldsInSelection(prefix, selections, document) {
|
|
78254
78313
|
return selections.map((selection) => {
|
|
78255
78314
|
switch (selection.kind) {
|
|
78256
|
-
case
|
|
78315
|
+
case import_graphql51.Kind.INLINE_FRAGMENT:
|
|
78257
78316
|
return aliasFieldsInInlineFragment(prefix, selection, document);
|
|
78258
|
-
case
|
|
78317
|
+
case import_graphql51.Kind.FRAGMENT_SPREAD: {
|
|
78259
78318
|
const inlineFragment = inlineFragmentSpread(selection, document);
|
|
78260
78319
|
return aliasFieldsInInlineFragment(prefix, inlineFragment, document);
|
|
78261
78320
|
}
|
|
78262
|
-
case
|
|
78321
|
+
case import_graphql51.Kind.FIELD:
|
|
78263
78322
|
default:
|
|
78264
78323
|
return aliasField(selection, prefix);
|
|
78265
78324
|
}
|
|
@@ -78282,7 +78341,7 @@ function inlineFragmentSpread(spread, document) {
|
|
|
78282
78341
|
}
|
|
78283
78342
|
const { typeCondition, selectionSet } = fragment;
|
|
78284
78343
|
return {
|
|
78285
|
-
kind:
|
|
78344
|
+
kind: import_graphql51.Kind.INLINE_FRAGMENT,
|
|
78286
78345
|
typeCondition,
|
|
78287
78346
|
selectionSet,
|
|
78288
78347
|
directives: spread.directives
|
|
@@ -78308,10 +78367,10 @@ function aliasField(field, aliasPrefix) {
|
|
|
78308
78367
|
};
|
|
78309
78368
|
}
|
|
78310
78369
|
function isOperationDefinition(def) {
|
|
78311
|
-
return def.kind ===
|
|
78370
|
+
return def.kind === import_graphql51.Kind.OPERATION_DEFINITION;
|
|
78312
78371
|
}
|
|
78313
78372
|
function isFragmentDefinition(def) {
|
|
78314
|
-
return def.kind ===
|
|
78373
|
+
return def.kind === import_graphql51.Kind.FRAGMENT_DEFINITION;
|
|
78315
78374
|
}
|
|
78316
78375
|
function splitResult({ data, errors: errors5 }, numResults) {
|
|
78317
78376
|
const splitResults = new Array(numResults);
|
|
@@ -78407,7 +78466,7 @@ var getBatchingExecutor = memoize2of4(function getBatchingExecutor2(_context, ex
|
|
|
78407
78466
|
return createBatchingExecutor(executor2, dataLoaderOptions, extensionsReducer);
|
|
78408
78467
|
});
|
|
78409
78468
|
|
|
78410
|
-
// ../../node_modules/.bun/@graphql-tools+delegate@
|
|
78469
|
+
// ../../node_modules/.bun/@graphql-tools+delegate@11.0.0+ded46c799560c44e/node_modules/@graphql-tools/delegate/dist/index.js
|
|
78411
78470
|
var applySchemaTransforms = memoize2(function applySchemaTransforms2(originalWrappingSchema, subschemaConfig) {
|
|
78412
78471
|
const schemaTransforms = subschemaConfig.transforms;
|
|
78413
78472
|
if (schemaTransforms == null) {
|
|
@@ -78505,14 +78564,14 @@ function handleResolverResult(resolverResult, subschema, selectionSet, object3,
|
|
|
78505
78564
|
const nullResult = {};
|
|
78506
78565
|
for (const [responseKey, fieldNodes] of fields2) {
|
|
78507
78566
|
const combinedPath = [...path2, responseKey];
|
|
78508
|
-
if (resolverResult instanceof
|
|
78567
|
+
if (resolverResult instanceof import_graphql52.GraphQLError) {
|
|
78509
78568
|
if (resolverResult.message.includes("Cannot return null for non-nullable field")) {
|
|
78510
78569
|
nullResult[responseKey] = null;
|
|
78511
78570
|
} else {
|
|
78512
78571
|
nullResult[responseKey] = relocatedError(resolverResult, combinedPath);
|
|
78513
78572
|
}
|
|
78514
78573
|
} else if (resolverResult instanceof Error) {
|
|
78515
|
-
nullResult[responseKey] =
|
|
78574
|
+
nullResult[responseKey] = import_graphql52.locatedError(resolverResult, fieldNodes, combinedPath);
|
|
78516
78575
|
} else {
|
|
78517
78576
|
nullResult[responseKey] = null;
|
|
78518
78577
|
}
|
|
@@ -78531,7 +78590,7 @@ function handleResolverResult(resolverResult, subschema, selectionSet, object3,
|
|
|
78531
78590
|
}
|
|
78532
78591
|
const existingPropValue = object3[responseKey];
|
|
78533
78592
|
const sourcePropValue = resolverResult[responseKey];
|
|
78534
|
-
if (responseKey === "__typename" && existingPropValue !== sourcePropValue &&
|
|
78593
|
+
if (responseKey === "__typename" && existingPropValue !== sourcePropValue && import_graphql52.isAbstractType(subschema.transformedSchema.getType(sourcePropValue))) {
|
|
78535
78594
|
continue;
|
|
78536
78595
|
}
|
|
78537
78596
|
if (sourcePropValue != null || existingPropValue == null) {
|
|
@@ -78578,22 +78637,22 @@ function executeDelegationStage(mergedTypeInfo, delegationMap, object3, context,
|
|
|
78578
78637
|
}
|
|
78579
78638
|
}
|
|
78580
78639
|
function resolveExternalValue(result, unpathedErrors, subschema, context, info, returnType = getReturnType$1(info), skipTypeMerging) {
|
|
78581
|
-
const type =
|
|
78640
|
+
const type = import_graphql52.getNullableType(returnType);
|
|
78582
78641
|
if (result instanceof Error) {
|
|
78583
78642
|
return result;
|
|
78584
78643
|
}
|
|
78585
78644
|
if (result == null) {
|
|
78586
78645
|
return reportUnpathedErrorsViaNull(unpathedErrors);
|
|
78587
78646
|
}
|
|
78588
|
-
if (
|
|
78647
|
+
if (import_graphql52.isLeafType(type)) {
|
|
78589
78648
|
try {
|
|
78590
78649
|
return type.parseValue(result);
|
|
78591
78650
|
} catch {
|
|
78592
78651
|
return null;
|
|
78593
78652
|
}
|
|
78594
|
-
} else if (
|
|
78653
|
+
} else if (import_graphql52.isCompositeType(type)) {
|
|
78595
78654
|
return handleMaybePromise(() => resolveExternalObject(type, result, unpathedErrors, subschema, context, info, skipTypeMerging), (result2) => {
|
|
78596
|
-
if (info &&
|
|
78655
|
+
if (info && import_graphql52.isAbstractType(type)) {
|
|
78597
78656
|
if (result2.__typename != null) {
|
|
78598
78657
|
const resolvedType = info.schema.getType(result2.__typename);
|
|
78599
78658
|
if (!resolvedType) {
|
|
@@ -78604,7 +78663,7 @@ function resolveExternalValue(result, unpathedErrors, subschema, context, info,
|
|
|
78604
78663
|
}
|
|
78605
78664
|
return result2;
|
|
78606
78665
|
});
|
|
78607
|
-
} else if (
|
|
78666
|
+
} else if (import_graphql52.isListType(type)) {
|
|
78608
78667
|
if (Array.isArray(result)) {
|
|
78609
78668
|
return resolveExternalList(type, result, unpathedErrors, subschema, context, info, skipTypeMerging);
|
|
78610
78669
|
}
|
|
@@ -78651,9 +78710,9 @@ function reportUnpathedErrorsViaNull(unpathedErrors) {
|
|
|
78651
78710
|
if (unreportedErrors.length) {
|
|
78652
78711
|
const unreportedError = unreportedErrors[0];
|
|
78653
78712
|
if (unreportedErrors.length === 1 && unreportedError) {
|
|
78654
|
-
return
|
|
78713
|
+
return import_graphql52.locatedError(unreportedError, undefined, unreportedError.path);
|
|
78655
78714
|
}
|
|
78656
|
-
return new AggregateError(unreportedErrors.map((e3) =>
|
|
78715
|
+
return new AggregateError(unreportedErrors.map((e3) => import_graphql52.locatedError(e3, undefined, unreportedError?.path)), unreportedErrors.map((error43) => error43.message).join(`,
|
|
78657
78716
|
`));
|
|
78658
78717
|
}
|
|
78659
78718
|
}
|
|
@@ -78678,7 +78737,7 @@ function checkResultAndHandleErrors(result = {
|
|
|
78678
78737
|
skipTypeMerging,
|
|
78679
78738
|
onLocatedError
|
|
78680
78739
|
} = delegationContext;
|
|
78681
|
-
const { data, unpathedErrors } = mergeDataAndErrors(result.data == null ? undefined : result.data[responseKey], result.errors == null ? [] : result.errors, info != null && info.path ?
|
|
78740
|
+
const { data, unpathedErrors } = mergeDataAndErrors(result.data == null ? undefined : result.data[responseKey], result.errors == null ? [] : result.errors, info != null && info.path ? import_graphql52.responsePathAsArray(info.path) : undefined, onLocatedError);
|
|
78682
78741
|
return resolveExternalValue(data, unpathedErrors, subschema, context, info, returnType, skipTypeMerging);
|
|
78683
78742
|
}
|
|
78684
78743
|
function mergeDataAndErrors(data, errors5, path2, onLocatedError, index = 1) {
|
|
@@ -78747,10 +78806,10 @@ function getDocumentMetadata(document) {
|
|
|
78747
78806
|
const fragmentNames = /* @__PURE__ */ new Set;
|
|
78748
78807
|
for (let i = 0;i < document.definitions.length; i++) {
|
|
78749
78808
|
const def = document.definitions[i];
|
|
78750
|
-
if (def?.kind ===
|
|
78809
|
+
if (def?.kind === import_graphql52.Kind.FRAGMENT_DEFINITION) {
|
|
78751
78810
|
fragments.push(def);
|
|
78752
78811
|
fragmentNames.add(def.name.value);
|
|
78753
|
-
} else if (def?.kind ===
|
|
78812
|
+
} else if (def?.kind === import_graphql52.Kind.OPERATION_DEFINITION) {
|
|
78754
78813
|
operations.push(def);
|
|
78755
78814
|
}
|
|
78756
78815
|
}
|
|
@@ -78761,32 +78820,32 @@ function getDocumentMetadata(document) {
|
|
|
78761
78820
|
};
|
|
78762
78821
|
}
|
|
78763
78822
|
var getTypeInfo = memoize1(function getTypeInfo2(schema) {
|
|
78764
|
-
return new
|
|
78823
|
+
return new import_graphql52.TypeInfo(schema);
|
|
78765
78824
|
});
|
|
78766
78825
|
var getTypeInfoWithType = memoize2(function getTypeInfoWithType2(schema, type) {
|
|
78767
|
-
return
|
|
78826
|
+
return import_graphql52.versionInfo.major < 16 ? new import_graphql52.TypeInfo(schema, undefined, type) : new import_graphql52.TypeInfo(schema, type);
|
|
78768
78827
|
});
|
|
78769
78828
|
function updateArgument2(argumentNodes, variableDefinitionsMap, variableValues, argName, varName, type, value) {
|
|
78770
78829
|
argumentNodes[argName] = {
|
|
78771
|
-
kind:
|
|
78830
|
+
kind: import_graphql52.Kind.ARGUMENT,
|
|
78772
78831
|
name: {
|
|
78773
|
-
kind:
|
|
78832
|
+
kind: import_graphql52.Kind.NAME,
|
|
78774
78833
|
value: argName
|
|
78775
78834
|
},
|
|
78776
78835
|
value: {
|
|
78777
|
-
kind:
|
|
78836
|
+
kind: import_graphql52.Kind.VARIABLE,
|
|
78778
78837
|
name: {
|
|
78779
|
-
kind:
|
|
78838
|
+
kind: import_graphql52.Kind.NAME,
|
|
78780
78839
|
value: varName
|
|
78781
78840
|
}
|
|
78782
78841
|
}
|
|
78783
78842
|
};
|
|
78784
78843
|
variableDefinitionsMap[varName] = {
|
|
78785
|
-
kind:
|
|
78844
|
+
kind: import_graphql52.Kind.VARIABLE_DEFINITION,
|
|
78786
78845
|
variable: {
|
|
78787
|
-
kind:
|
|
78846
|
+
kind: import_graphql52.Kind.VARIABLE,
|
|
78788
78847
|
name: {
|
|
78789
|
-
kind:
|
|
78848
|
+
kind: import_graphql52.Kind.NAME,
|
|
78790
78849
|
value: varName
|
|
78791
78850
|
}
|
|
78792
78851
|
},
|
|
@@ -78846,13 +78905,13 @@ function finalizeGatewayDocument(targetSchema, fragments, operations, onOverlapp
|
|
|
78846
78905
|
fragmentSet = collectedFragmentSet;
|
|
78847
78906
|
const variableDefinitions = (operation.variableDefinitions ?? []).filter((variable) => operationOrFragmentVariables.indexOf(variable.variable.name.value) !== -1);
|
|
78848
78907
|
if (operation.operation === "subscription") {
|
|
78849
|
-
selectionSet.selections = selectionSet.selections.filter((selection) => selection.kind !==
|
|
78908
|
+
selectionSet.selections = selectionSet.selections.filter((selection) => selection.kind !== import_graphql52.Kind.FIELD || selection.name.value !== "__typename");
|
|
78850
78909
|
}
|
|
78851
|
-
if (selectionSet.selections.length === 1 && selectionSet.selections[0] && selectionSet.selections[0].kind ===
|
|
78910
|
+
if (selectionSet.selections.length === 1 && selectionSet.selections[0] && selectionSet.selections[0].kind === import_graphql52.Kind.FIELD && selectionSet.selections[0].name.value === "__typename") {
|
|
78852
78911
|
continue;
|
|
78853
78912
|
}
|
|
78854
78913
|
newOperations.push({
|
|
78855
|
-
kind:
|
|
78914
|
+
kind: import_graphql52.Kind.OPERATION_DEFINITION,
|
|
78856
78915
|
operation: operation.operation,
|
|
78857
78916
|
name: operation.name,
|
|
78858
78917
|
directives: operation.directives,
|
|
@@ -78868,14 +78927,14 @@ function finalizeGatewayDocument(targetSchema, fragments, operations, onOverlapp
|
|
|
78868
78927
|
});
|
|
78869
78928
|
}
|
|
78870
78929
|
let newDocument = {
|
|
78871
|
-
kind:
|
|
78930
|
+
kind: import_graphql52.Kind.DOCUMENT,
|
|
78872
78931
|
definitions: [...newOperations, ...newFragments]
|
|
78873
78932
|
};
|
|
78874
78933
|
const stitchingInfo = delegationContext.info?.schema?.extensions?.["stitchingInfo"];
|
|
78875
78934
|
if (stitchingInfo != null) {
|
|
78876
78935
|
const typeInfo = getTypeInfo(targetSchema);
|
|
78877
|
-
newDocument =
|
|
78878
|
-
[
|
|
78936
|
+
newDocument = import_graphql52.visit(newDocument, import_graphql52.visitWithTypeInfo(typeInfo, {
|
|
78937
|
+
[import_graphql52.Kind.FIELD](fieldNode) {
|
|
78879
78938
|
const parentType = typeInfo.getParentType();
|
|
78880
78939
|
if (parentType) {
|
|
78881
78940
|
const parentTypeName = parentType.name;
|
|
@@ -78888,7 +78947,7 @@ function finalizeGatewayDocument(targetSchema, fragments, operations, onOverlapp
|
|
|
78888
78947
|
return {
|
|
78889
78948
|
...fieldNode,
|
|
78890
78949
|
selectionSet: {
|
|
78891
|
-
kind:
|
|
78950
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
78892
78951
|
selections: [
|
|
78893
78952
|
...providedSelection.selections,
|
|
78894
78953
|
...fieldNode.selectionSet?.selections ?? []
|
|
@@ -78934,7 +78993,7 @@ function finalizeGatewayRequest(originalRequest, delegationContext, onOverlappin
|
|
|
78934
78993
|
};
|
|
78935
78994
|
}
|
|
78936
78995
|
function isTypeNameField(selection) {
|
|
78937
|
-
return selection.kind ===
|
|
78996
|
+
return selection.kind === import_graphql52.Kind.FIELD && !selection.alias && selection.name.value === "__typename";
|
|
78938
78997
|
}
|
|
78939
78998
|
function filterTypenameFields(selections) {
|
|
78940
78999
|
let hasTypeNameField = false;
|
|
@@ -78960,7 +79019,7 @@ function addVariablesToRootFields(targetSchema, operations, args) {
|
|
|
78960
79019
|
const type = getDefinedRootType(targetSchema, operation.operation);
|
|
78961
79020
|
const newSelections = [];
|
|
78962
79021
|
for (const selection of operation.selectionSet.selections) {
|
|
78963
|
-
if (selection.kind ===
|
|
79022
|
+
if (selection.kind === import_graphql52.Kind.FIELD) {
|
|
78964
79023
|
const argumentNodes = selection.arguments ?? [];
|
|
78965
79024
|
const argumentNodeMap = argumentNodes.reduce((prev, argument) => ({
|
|
78966
79025
|
...prev,
|
|
@@ -78979,7 +79038,7 @@ function addVariablesToRootFields(targetSchema, operations, args) {
|
|
|
78979
79038
|
}
|
|
78980
79039
|
}
|
|
78981
79040
|
const newSelectionSet = {
|
|
78982
|
-
kind:
|
|
79041
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
78983
79042
|
selections: newSelections
|
|
78984
79043
|
};
|
|
78985
79044
|
return {
|
|
@@ -79027,9 +79086,9 @@ function collectFragmentVariables(targetSchema, fragmentSet, validFragments, val
|
|
|
79027
79086
|
if (name && !(name in fragmentSet)) {
|
|
79028
79087
|
fragmentSet[name] = true;
|
|
79029
79088
|
newFragments.push({
|
|
79030
|
-
kind:
|
|
79089
|
+
kind: import_graphql52.Kind.FRAGMENT_DEFINITION,
|
|
79031
79090
|
name: {
|
|
79032
|
-
kind:
|
|
79091
|
+
kind: import_graphql52.Kind.NAME,
|
|
79033
79092
|
value: name
|
|
79034
79093
|
},
|
|
79035
79094
|
typeCondition: fragment.typeCondition,
|
|
@@ -79069,8 +79128,8 @@ function finalizeSelectionSet(schema, type, validFragments, selectionSet, onOver
|
|
|
79069
79128
|
const seenNonNullableMap = /* @__PURE__ */ new WeakMap;
|
|
79070
79129
|
const seenNullableMap = /* @__PURE__ */ new WeakMap;
|
|
79071
79130
|
const filteredSelectionSet = filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOverlappingAliases, usedFragments, seenNonNullableMap, seenNullableMap);
|
|
79072
|
-
|
|
79073
|
-
[
|
|
79131
|
+
import_graphql52.visit(filteredSelectionSet, {
|
|
79132
|
+
[import_graphql52.Kind.VARIABLE]: (variableNode) => {
|
|
79074
79133
|
usedVariables.push(variableNode.name.value);
|
|
79075
79134
|
}
|
|
79076
79135
|
}, variablesVisitorKeys);
|
|
@@ -79081,11 +79140,11 @@ function finalizeSelectionSet(schema, type, validFragments, selectionSet, onOver
|
|
|
79081
79140
|
};
|
|
79082
79141
|
}
|
|
79083
79142
|
function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOverlappingAliases, usedFragments, seenNonNullableMap, seenNullableMap) {
|
|
79084
|
-
return
|
|
79085
|
-
[
|
|
79143
|
+
return import_graphql52.visit(selectionSet, import_graphql52.visitWithTypeInfo(typeInfo, {
|
|
79144
|
+
[import_graphql52.Kind.FIELD]: {
|
|
79086
79145
|
enter: (node) => {
|
|
79087
79146
|
const parentType = typeInfo.getParentType();
|
|
79088
|
-
if (
|
|
79147
|
+
if (import_graphql52.isObjectType(parentType) || import_graphql52.isInterfaceType(parentType)) {
|
|
79089
79148
|
const field = typeInfo.getFieldDef();
|
|
79090
79149
|
if (!field) {
|
|
79091
79150
|
return null;
|
|
@@ -79110,18 +79169,18 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79110
79169
|
}
|
|
79111
79170
|
}
|
|
79112
79171
|
}
|
|
79113
|
-
if (
|
|
79172
|
+
if (import_graphql52.isUnionType(parentType) && typeInfo.getType() == null) {
|
|
79114
79173
|
const possibleTypeNames = [];
|
|
79115
79174
|
const fieldName = node.name.value;
|
|
79116
79175
|
for (const memberType of parentType.getTypes()) {
|
|
79117
79176
|
const memberFields = memberType.getFields();
|
|
79118
79177
|
const possibleField = memberFields[fieldName];
|
|
79119
79178
|
if (possibleField != null) {
|
|
79120
|
-
const namedType =
|
|
79121
|
-
if (node.selectionSet?.selections?.length &&
|
|
79179
|
+
const namedType = import_graphql52.getNamedType(possibleField.type);
|
|
79180
|
+
if (node.selectionSet?.selections?.length && import_graphql52.isLeafType(namedType)) {
|
|
79122
79181
|
continue;
|
|
79123
79182
|
}
|
|
79124
|
-
if (!node.selectionSet?.selections?.length &&
|
|
79183
|
+
if (!node.selectionSet?.selections?.length && import_graphql52.isCompositeType(namedType)) {
|
|
79125
79184
|
continue;
|
|
79126
79185
|
}
|
|
79127
79186
|
possibleTypeNames.push(memberType.name);
|
|
@@ -79131,16 +79190,16 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79131
79190
|
const spreads = possibleTypeNames.map((possibleTypeName) => {
|
|
79132
79191
|
if (!node.selectionSet?.selections) {
|
|
79133
79192
|
return {
|
|
79134
|
-
kind:
|
|
79193
|
+
kind: import_graphql52.Kind.INLINE_FRAGMENT,
|
|
79135
79194
|
typeCondition: {
|
|
79136
|
-
kind:
|
|
79195
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
79137
79196
|
name: {
|
|
79138
|
-
kind:
|
|
79197
|
+
kind: import_graphql52.Kind.NAME,
|
|
79139
79198
|
value: possibleTypeName
|
|
79140
79199
|
}
|
|
79141
79200
|
},
|
|
79142
79201
|
selectionSet: {
|
|
79143
|
-
kind:
|
|
79202
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
79144
79203
|
selections: [node]
|
|
79145
79204
|
}
|
|
79146
79205
|
};
|
|
@@ -79155,16 +79214,16 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79155
79214
|
return;
|
|
79156
79215
|
}
|
|
79157
79216
|
return {
|
|
79158
|
-
kind:
|
|
79217
|
+
kind: import_graphql52.Kind.INLINE_FRAGMENT,
|
|
79159
79218
|
typeCondition: {
|
|
79160
|
-
kind:
|
|
79219
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
79161
79220
|
name: {
|
|
79162
|
-
kind:
|
|
79221
|
+
kind: import_graphql52.Kind.NAME,
|
|
79163
79222
|
value: possibleTypeName
|
|
79164
79223
|
}
|
|
79165
79224
|
},
|
|
79166
79225
|
selectionSet: {
|
|
79167
|
-
kind:
|
|
79226
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
79168
79227
|
selections: [
|
|
79169
79228
|
{
|
|
79170
79229
|
...node,
|
|
@@ -79188,11 +79247,11 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79188
79247
|
if (type == null) {
|
|
79189
79248
|
return null;
|
|
79190
79249
|
}
|
|
79191
|
-
const namedType =
|
|
79250
|
+
const namedType = import_graphql52.getNamedType(type);
|
|
79192
79251
|
if (schema.getType(namedType.name) == null) {
|
|
79193
79252
|
return null;
|
|
79194
79253
|
}
|
|
79195
|
-
if (
|
|
79254
|
+
if (import_graphql52.isObjectType(namedType) || import_graphql52.isInterfaceType(namedType)) {
|
|
79196
79255
|
const selections = node.selectionSet != null ? node.selectionSet.selections : null;
|
|
79197
79256
|
if (selections == null || selections.length === 0) {
|
|
79198
79257
|
return null;
|
|
@@ -79201,7 +79260,7 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79201
79260
|
return;
|
|
79202
79261
|
}
|
|
79203
79262
|
},
|
|
79204
|
-
[
|
|
79263
|
+
[import_graphql52.Kind.FRAGMENT_SPREAD]: {
|
|
79205
79264
|
enter: (node) => {
|
|
79206
79265
|
if (!(node.name.value in validFragments)) {
|
|
79207
79266
|
return null;
|
|
@@ -79215,15 +79274,15 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79215
79274
|
return;
|
|
79216
79275
|
}
|
|
79217
79276
|
},
|
|
79218
|
-
[
|
|
79277
|
+
[import_graphql52.Kind.SELECTION_SET]: {
|
|
79219
79278
|
enter: (node, _key, _parent, _path) => {
|
|
79220
79279
|
const parentType = typeInfo.getParentType();
|
|
79221
79280
|
const { hasTypeNameField, selections } = filterTypenameFields(node.selections);
|
|
79222
|
-
if (hasTypeNameField || parentType != null &&
|
|
79281
|
+
if (hasTypeNameField || parentType != null && import_graphql52.isAbstractType(parentType)) {
|
|
79223
79282
|
selections.unshift({
|
|
79224
|
-
kind:
|
|
79283
|
+
kind: import_graphql52.Kind.FIELD,
|
|
79225
79284
|
name: {
|
|
79226
|
-
kind:
|
|
79285
|
+
kind: import_graphql52.Kind.NAME,
|
|
79227
79286
|
value: "__typename"
|
|
79228
79287
|
}
|
|
79229
79288
|
});
|
|
@@ -79234,12 +79293,12 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79234
79293
|
};
|
|
79235
79294
|
}
|
|
79236
79295
|
},
|
|
79237
|
-
[
|
|
79296
|
+
[import_graphql52.Kind.INLINE_FRAGMENT]: {
|
|
79238
79297
|
enter: (node) => {
|
|
79239
79298
|
if (node.typeCondition != null) {
|
|
79240
79299
|
const parentType = typeInfo.getParentType();
|
|
79241
79300
|
const innerType = schema.getType(node.typeCondition.name.value);
|
|
79242
|
-
if (
|
|
79301
|
+
if (import_graphql52.isUnionType(parentType) && parentType.getTypes().some((t) => t.name === innerType?.name)) {
|
|
79243
79302
|
return node;
|
|
79244
79303
|
}
|
|
79245
79304
|
if (!implementsAbstractType(schema, parentType, innerType)) {
|
|
@@ -79273,13 +79332,13 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79273
79332
|
selectionSet: {
|
|
79274
79333
|
...selection.selectionSet,
|
|
79275
79334
|
selections: selection.selectionSet.selections.map((subSelection) => {
|
|
79276
|
-
if (subSelection.kind ===
|
|
79335
|
+
if (subSelection.kind === import_graphql52.Kind.FIELD) {
|
|
79277
79336
|
const fieldName = subSelection.name.value;
|
|
79278
79337
|
if (!subSelection.alias) {
|
|
79279
79338
|
const field = selectionTypeFields[fieldName];
|
|
79280
79339
|
if (field) {
|
|
79281
79340
|
let currentNullable;
|
|
79282
|
-
if (
|
|
79341
|
+
if (import_graphql52.isNullableType(field.type)) {
|
|
79283
79342
|
seenNullable.add(fieldName);
|
|
79284
79343
|
currentNullable = true;
|
|
79285
79344
|
} else {
|
|
@@ -79291,7 +79350,7 @@ function filterSelectionSet(schema, typeInfo, validFragments, selectionSet, onOv
|
|
|
79291
79350
|
return {
|
|
79292
79351
|
...subSelection,
|
|
79293
79352
|
alias: {
|
|
79294
|
-
kind:
|
|
79353
|
+
kind: import_graphql52.Kind.NAME,
|
|
79295
79354
|
value: currentNullable ? `_nullable_${fieldName}` : `_nonNullable_${fieldName}`
|
|
79296
79355
|
}
|
|
79297
79356
|
};
|
|
@@ -79353,7 +79412,7 @@ function prepareGatewayDocument(originalDocument, transformedSchema, returnType,
|
|
|
79353
79412
|
const { expandedFragments, fragmentReplacements } = getExpandedFragments(fragments, fragmentNames, possibleTypesMap);
|
|
79354
79413
|
const typeInfo = getTypeInfo(transformedSchema);
|
|
79355
79414
|
const expandedDocument = {
|
|
79356
|
-
kind:
|
|
79415
|
+
kind: import_graphql52.Kind.DOCUMENT,
|
|
79357
79416
|
definitions: [...operations, ...fragments, ...expandedFragments]
|
|
79358
79417
|
};
|
|
79359
79418
|
const visitorKeyMap = {
|
|
@@ -79364,8 +79423,8 @@ function prepareGatewayDocument(originalDocument, transformedSchema, returnType,
|
|
|
79364
79423
|
InlineFragment: ["selectionSet"],
|
|
79365
79424
|
FragmentDefinition: ["selectionSet"]
|
|
79366
79425
|
};
|
|
79367
|
-
return
|
|
79368
|
-
[
|
|
79426
|
+
return import_graphql52.visit(expandedDocument, import_graphql52.visitWithTypeInfo(typeInfo, {
|
|
79427
|
+
[import_graphql52.Kind.SELECTION_SET]: (node) => visitSelectionSet(node, fragmentReplacements, transformedSchema, typeInfo, possibleTypesMap, reversePossibleTypesMap2, interfaceExtensionsMap, fieldNodesByType, fieldNodesByField, dynamicSelectionSetsByField, infoSchema, visitedSelections)
|
|
79369
79428
|
}), visitorKeyMap);
|
|
79370
79429
|
}
|
|
79371
79430
|
var getExtraPossibleTypesFn = memoize2(function getExtraPossibleTypes(transformedSchema, infoSchema) {
|
|
@@ -79376,7 +79435,7 @@ var getExtraPossibleTypesFn = memoize2(function getExtraPossibleTypes(transforme
|
|
|
79376
79435
|
extraTypesForSubschema = /* @__PURE__ */ new Set;
|
|
79377
79436
|
const gatewayType = infoSchema.getType(typeName);
|
|
79378
79437
|
const subschemaType = transformedSchema.getType(typeName);
|
|
79379
|
-
if (
|
|
79438
|
+
if (import_graphql52.isAbstractType(gatewayType) && import_graphql52.isAbstractType(subschemaType)) {
|
|
79380
79439
|
const possibleTypes = infoSchema.getPossibleTypes(gatewayType);
|
|
79381
79440
|
const possibleTypesInSubschema = transformedSchema.getPossibleTypes(subschemaType);
|
|
79382
79441
|
for (const possibleType of possibleTypes) {
|
|
@@ -79399,7 +79458,7 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79399
79458
|
const newSelections = /* @__PURE__ */ new Set;
|
|
79400
79459
|
const maybeType = typeInfo.getParentType();
|
|
79401
79460
|
if (maybeType != null) {
|
|
79402
|
-
const parentType =
|
|
79461
|
+
const parentType = import_graphql52.getNamedType(maybeType);
|
|
79403
79462
|
const parentTypeName = parentType.name;
|
|
79404
79463
|
const fieldNodes = fieldNodesByType[parentTypeName];
|
|
79405
79464
|
if (fieldNodes) {
|
|
@@ -79410,7 +79469,7 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79410
79469
|
const interfaceExtensions = interfaceExtensionsMap[parentType.name];
|
|
79411
79470
|
const interfaceExtensionFields = [];
|
|
79412
79471
|
for (const selection of node.selections) {
|
|
79413
|
-
if (selection.kind ===
|
|
79472
|
+
if (selection.kind === import_graphql52.Kind.INLINE_FRAGMENT) {
|
|
79414
79473
|
if (selection.typeCondition != null) {
|
|
79415
79474
|
if (!visitedSelections.has(selection)) {
|
|
79416
79475
|
visitedSelections.add(selection);
|
|
@@ -79421,19 +79480,19 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79421
79480
|
newSelections.add({
|
|
79422
79481
|
...selection,
|
|
79423
79482
|
typeCondition: {
|
|
79424
|
-
kind:
|
|
79483
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
79425
79484
|
name: {
|
|
79426
|
-
kind:
|
|
79485
|
+
kind: import_graphql52.Kind.NAME,
|
|
79427
79486
|
value: extraPossibleTypeName
|
|
79428
79487
|
}
|
|
79429
79488
|
}
|
|
79430
79489
|
});
|
|
79431
79490
|
}
|
|
79432
79491
|
const typeInSubschema = transformedSchema.getType(typeName);
|
|
79433
|
-
if (
|
|
79492
|
+
if (import_graphql52.isObjectType(typeInSubschema) || import_graphql52.isInterfaceType(typeInSubschema)) {
|
|
79434
79493
|
const fieldMap = typeInSubschema.getFields();
|
|
79435
79494
|
for (const subSelection of selection.selectionSet.selections) {
|
|
79436
|
-
if (subSelection.kind ===
|
|
79495
|
+
if (subSelection.kind === import_graphql52.Kind.FIELD) {
|
|
79437
79496
|
const fieldName = subSelection.name.value;
|
|
79438
79497
|
const field = fieldMap[fieldName];
|
|
79439
79498
|
if (!field) {
|
|
@@ -79470,7 +79529,7 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79470
79529
|
} else {
|
|
79471
79530
|
newSelections.add(selection);
|
|
79472
79531
|
}
|
|
79473
|
-
} else if (selection.kind ===
|
|
79532
|
+
} else if (selection.kind === import_graphql52.Kind.FRAGMENT_SPREAD) {
|
|
79474
79533
|
const fragmentName = selection.name.value;
|
|
79475
79534
|
if (!fragmentReplacements[fragmentName]) {
|
|
79476
79535
|
newSelections.add(selection);
|
|
@@ -79481,9 +79540,9 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79481
79540
|
const maybeReplacementType = transformedSchema.getType(typeName);
|
|
79482
79541
|
if (maybeReplacementType != null && implementsAbstractType(transformedSchema, parentType, maybeType)) {
|
|
79483
79542
|
newSelections.add({
|
|
79484
|
-
kind:
|
|
79543
|
+
kind: import_graphql52.Kind.FRAGMENT_SPREAD,
|
|
79485
79544
|
name: {
|
|
79486
|
-
kind:
|
|
79545
|
+
kind: import_graphql52.Kind.NAME,
|
|
79487
79546
|
value: replacement.fragmentName
|
|
79488
79547
|
}
|
|
79489
79548
|
});
|
|
@@ -79491,7 +79550,7 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79491
79550
|
}
|
|
79492
79551
|
} else {
|
|
79493
79552
|
const fieldName = selection.name.value;
|
|
79494
|
-
if (
|
|
79553
|
+
if (import_graphql52.isAbstractType(parentType)) {
|
|
79495
79554
|
const fieldNodesForTypeName = fieldNodesByField[parentTypeName]?.["__typename"];
|
|
79496
79555
|
if (fieldNodesForTypeName) {
|
|
79497
79556
|
for (const fieldNode of fieldNodesForTypeName) {
|
|
@@ -79523,9 +79582,9 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79523
79582
|
}
|
|
79524
79583
|
if (reversePossibleTypesMap2[parentType.name]) {
|
|
79525
79584
|
newSelections.add({
|
|
79526
|
-
kind:
|
|
79585
|
+
kind: import_graphql52.Kind.FIELD,
|
|
79527
79586
|
name: {
|
|
79528
|
-
kind:
|
|
79587
|
+
kind: import_graphql52.Kind.NAME,
|
|
79529
79588
|
value: "__typename"
|
|
79530
79589
|
}
|
|
79531
79590
|
});
|
|
@@ -79535,7 +79594,7 @@ function visitSelectionSet(node, fragmentReplacements, transformedSchema, typeIn
|
|
|
79535
79594
|
if (possibleTypes != null) {
|
|
79536
79595
|
for (const possibleType of possibleTypes) {
|
|
79537
79596
|
newSelections.add(generateInlineFragment(possibleType, {
|
|
79538
|
-
kind:
|
|
79597
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
79539
79598
|
selections: interfaceExtensionFields
|
|
79540
79599
|
}));
|
|
79541
79600
|
}
|
|
@@ -79563,11 +79622,11 @@ function addDependenciesNestedly(fieldNode, seenFieldNames, fieldNodesByField, n
|
|
|
79563
79622
|
}
|
|
79564
79623
|
function generateInlineFragment(typeName, selectionSet) {
|
|
79565
79624
|
return {
|
|
79566
|
-
kind:
|
|
79625
|
+
kind: import_graphql52.Kind.INLINE_FRAGMENT,
|
|
79567
79626
|
typeCondition: {
|
|
79568
|
-
kind:
|
|
79627
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
79569
79628
|
name: {
|
|
79570
|
-
kind:
|
|
79629
|
+
kind: import_graphql52.Kind.NAME,
|
|
79571
79630
|
value: typeName
|
|
79572
79631
|
}
|
|
79573
79632
|
},
|
|
@@ -79581,9 +79640,9 @@ var getSchemaMetaData = memoize2((sourceSchema, targetSchema) => {
|
|
|
79581
79640
|
const interfaceExtensionsMap = /* @__PURE__ */ Object.create(null);
|
|
79582
79641
|
for (const typeName in typeMap) {
|
|
79583
79642
|
const type = typeMap[typeName];
|
|
79584
|
-
if (
|
|
79643
|
+
if (import_graphql52.isAbstractType(type)) {
|
|
79585
79644
|
const targetType = targetTypeMap[typeName];
|
|
79586
|
-
if (
|
|
79645
|
+
if (import_graphql52.isInterfaceType(type) && import_graphql52.isInterfaceType(targetType)) {
|
|
79587
79646
|
const targetTypeFields = targetType.getFields();
|
|
79588
79647
|
const sourceTypeFields = type.getFields();
|
|
79589
79648
|
const extensionFields = /* @__PURE__ */ Object.create(null);
|
|
@@ -79598,7 +79657,7 @@ var getSchemaMetaData = memoize2((sourceSchema, targetSchema) => {
|
|
|
79598
79657
|
interfaceExtensionsMap[typeName] = extensionFields;
|
|
79599
79658
|
}
|
|
79600
79659
|
}
|
|
79601
|
-
if (interfaceExtensionsMap[typeName] || !
|
|
79660
|
+
if (interfaceExtensionsMap[typeName] || !import_graphql52.isAbstractType(targetType)) {
|
|
79602
79661
|
const implementations = sourceSchema.getPossibleTypes(type);
|
|
79603
79662
|
possibleTypesMap[typeName] = [];
|
|
79604
79663
|
for (const impl of implementations) {
|
|
@@ -79655,15 +79714,15 @@ function getExpandedFragments(fragments, fragmentNames, possibleTypesMap) {
|
|
|
79655
79714
|
const name = generateFragmentName(possibleTypeName);
|
|
79656
79715
|
fragmentNames.add(name);
|
|
79657
79716
|
expandedFragments.push({
|
|
79658
|
-
kind:
|
|
79717
|
+
kind: import_graphql52.Kind.FRAGMENT_DEFINITION,
|
|
79659
79718
|
name: {
|
|
79660
|
-
kind:
|
|
79719
|
+
kind: import_graphql52.Kind.NAME,
|
|
79661
79720
|
value: name
|
|
79662
79721
|
},
|
|
79663
79722
|
typeCondition: {
|
|
79664
|
-
kind:
|
|
79723
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
79665
79724
|
name: {
|
|
79666
|
-
kind:
|
|
79725
|
+
kind: import_graphql52.Kind.NAME,
|
|
79667
79726
|
value: possibleTypeName
|
|
79668
79727
|
}
|
|
79669
79728
|
},
|
|
@@ -79682,11 +79741,11 @@ function getExpandedFragments(fragments, fragmentNames, possibleTypesMap) {
|
|
|
79682
79741
|
};
|
|
79683
79742
|
}
|
|
79684
79743
|
function wrapConcreteTypes(returnType, targetSchema, document) {
|
|
79685
|
-
const namedType =
|
|
79686
|
-
if (
|
|
79744
|
+
const namedType = import_graphql52.getNamedType(returnType);
|
|
79745
|
+
if (import_graphql52.isLeafType(namedType)) {
|
|
79687
79746
|
return document;
|
|
79688
79747
|
}
|
|
79689
|
-
let possibleTypes =
|
|
79748
|
+
let possibleTypes = import_graphql52.isAbstractType(namedType) ? targetSchema.getPossibleTypes(namedType) : [namedType];
|
|
79690
79749
|
if (possibleTypes.length === 0) {
|
|
79691
79750
|
possibleTypes = [namedType];
|
|
79692
79751
|
}
|
|
@@ -79699,29 +79758,29 @@ function wrapConcreteTypes(returnType, targetSchema, document) {
|
|
|
79699
79758
|
InlineFragment: ["selectionSet"],
|
|
79700
79759
|
FragmentDefinition: ["selectionSet"]
|
|
79701
79760
|
};
|
|
79702
|
-
return
|
|
79703
|
-
[
|
|
79761
|
+
return import_graphql52.visit(document, import_graphql52.visitWithTypeInfo(typeInfo, {
|
|
79762
|
+
[import_graphql52.Kind.FRAGMENT_DEFINITION]: (node) => {
|
|
79704
79763
|
const typeName = node.typeCondition.name.value;
|
|
79705
79764
|
if (!rootTypeNames.has(typeName)) {
|
|
79706
79765
|
return false;
|
|
79707
79766
|
}
|
|
79708
79767
|
return;
|
|
79709
79768
|
},
|
|
79710
|
-
[
|
|
79769
|
+
[import_graphql52.Kind.FIELD]: (node) => {
|
|
79711
79770
|
const fieldType = typeInfo.getType();
|
|
79712
79771
|
if (fieldType) {
|
|
79713
|
-
const fieldNamedType =
|
|
79714
|
-
if (
|
|
79772
|
+
const fieldNamedType = import_graphql52.getNamedType(fieldType);
|
|
79773
|
+
if (import_graphql52.isAbstractType(fieldNamedType) && fieldNamedType.name !== namedType.name && possibleTypes.length > 0) {
|
|
79715
79774
|
return {
|
|
79716
79775
|
...node,
|
|
79717
79776
|
selectionSet: {
|
|
79718
|
-
kind:
|
|
79777
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
79719
79778
|
selections: possibleTypes.map((possibleType) => ({
|
|
79720
|
-
kind:
|
|
79779
|
+
kind: import_graphql52.Kind.INLINE_FRAGMENT,
|
|
79721
79780
|
typeCondition: {
|
|
79722
|
-
kind:
|
|
79781
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
79723
79782
|
name: {
|
|
79724
|
-
kind:
|
|
79783
|
+
kind: import_graphql52.Kind.NAME,
|
|
79725
79784
|
value: possibleType.name
|
|
79726
79785
|
}
|
|
79727
79786
|
},
|
|
@@ -79807,6 +79866,7 @@ function getDelegatingOperation(parentType, schema) {
|
|
|
79807
79866
|
return "query";
|
|
79808
79867
|
}
|
|
79809
79868
|
function createRequest({
|
|
79869
|
+
subgraphName,
|
|
79810
79870
|
sourceSchema,
|
|
79811
79871
|
sourceParentType,
|
|
79812
79872
|
sourceFieldName,
|
|
@@ -79836,7 +79896,7 @@ function createRequest({
|
|
|
79836
79896
|
}
|
|
79837
79897
|
}
|
|
79838
79898
|
newSelectionSet = selections.length ? {
|
|
79839
|
-
kind:
|
|
79899
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
79840
79900
|
selections
|
|
79841
79901
|
} : undefined;
|
|
79842
79902
|
const args = fieldNodes?.[0]?.arguments;
|
|
@@ -79852,7 +79912,7 @@ function createRequest({
|
|
|
79852
79912
|
for (const def of variableDefinitions) {
|
|
79853
79913
|
const varName = def.variable.name.value;
|
|
79854
79914
|
variableDefinitionMap[varName] = def;
|
|
79855
|
-
const varType =
|
|
79915
|
+
const varType = import_graphql52.typeFromAST(sourceSchema, def.type);
|
|
79856
79916
|
const serializedValue = serializeInputValue(varType, variableValues?.[varName]);
|
|
79857
79917
|
if (serializedValue !== undefined) {
|
|
79858
79918
|
newVariables[varName] = serializedValue;
|
|
@@ -79868,26 +79928,26 @@ function createRequest({
|
|
|
79868
79928
|
throw new Error(`Either "targetFieldName" or a non empty "fieldNodes" array must be provided.`);
|
|
79869
79929
|
}
|
|
79870
79930
|
const rootfieldNode = {
|
|
79871
|
-
kind:
|
|
79931
|
+
kind: import_graphql52.Kind.FIELD,
|
|
79872
79932
|
arguments: Object.values(argumentNodeMap),
|
|
79873
79933
|
name: {
|
|
79874
|
-
kind:
|
|
79934
|
+
kind: import_graphql52.Kind.NAME,
|
|
79875
79935
|
value: rootFieldName
|
|
79876
79936
|
},
|
|
79877
79937
|
selectionSet: newSelectionSet,
|
|
79878
79938
|
directives: fieldNode?.directives
|
|
79879
79939
|
};
|
|
79880
79940
|
const operationName = targetOperationName ? {
|
|
79881
|
-
kind:
|
|
79941
|
+
kind: import_graphql52.Kind.NAME,
|
|
79882
79942
|
value: targetOperationName
|
|
79883
79943
|
} : undefined;
|
|
79884
79944
|
const operationDefinition = {
|
|
79885
|
-
kind:
|
|
79945
|
+
kind: import_graphql52.Kind.OPERATION_DEFINITION,
|
|
79886
79946
|
name: operationName,
|
|
79887
79947
|
operation: targetOperation,
|
|
79888
79948
|
variableDefinitions: Object.values(variableDefinitionMap),
|
|
79889
79949
|
selectionSet: {
|
|
79890
|
-
kind:
|
|
79950
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
79891
79951
|
selections: [rootfieldNode]
|
|
79892
79952
|
}
|
|
79893
79953
|
};
|
|
@@ -79901,10 +79961,11 @@ function createRequest({
|
|
|
79901
79961
|
}
|
|
79902
79962
|
}
|
|
79903
79963
|
const document = {
|
|
79904
|
-
kind:
|
|
79964
|
+
kind: import_graphql52.Kind.DOCUMENT,
|
|
79905
79965
|
definitions
|
|
79906
79966
|
};
|
|
79907
79967
|
return {
|
|
79968
|
+
subgraphName,
|
|
79908
79969
|
document,
|
|
79909
79970
|
variables: newVariables,
|
|
79910
79971
|
rootValue: targetRootValue,
|
|
@@ -79937,7 +79998,7 @@ function defaultMergedResolver(parent, args, context, info) {
|
|
|
79937
79998
|
}
|
|
79938
79999
|
const responseKey = getResponseKeyFromInfo(info);
|
|
79939
80000
|
if (!isExternalObject(parent)) {
|
|
79940
|
-
return
|
|
80001
|
+
return import_graphql52.defaultFieldResolver(parent, args, context, info);
|
|
79941
80002
|
}
|
|
79942
80003
|
if (!Object.prototype.hasOwnProperty.call(parent, responseKey)) {
|
|
79943
80004
|
const leftOver = getPlanLeftOverFromParent(parent);
|
|
@@ -80007,7 +80068,7 @@ function handleLeftOver(parent, context, info, leftOver) {
|
|
|
80007
80068
|
}
|
|
80008
80069
|
if (selectionSets2.size) {
|
|
80009
80070
|
const selectionSet = {
|
|
80010
|
-
kind:
|
|
80071
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
80011
80072
|
selections: Array.from(selectionSets2).flatMap((selectionSet2) => selectionSet2.selections)
|
|
80012
80073
|
};
|
|
80013
80074
|
handleMaybePromise(() => flattenPromise(parent), (flattenedParent) => {
|
|
@@ -80025,7 +80086,7 @@ function handleFlattenedParent(flattenedParent, leftOverParent, possibleSubschem
|
|
|
80025
80086
|
if (resolver) {
|
|
80026
80087
|
Object.assign(leftOverParent, flattenedParent);
|
|
80027
80088
|
const selectionSet2 = {
|
|
80028
|
-
kind:
|
|
80089
|
+
kind: import_graphql52.Kind.SELECTION_SET,
|
|
80029
80090
|
selections: missingFieldNodes
|
|
80030
80091
|
};
|
|
80031
80092
|
handleMaybePromise(() => resolver(leftOverParent, context, info, possibleSubschema, selectionSet2, info.parentType, info.parentType), (resolverResult) => {
|
|
@@ -80035,7 +80096,7 @@ function handleFlattenedParent(flattenedParent, leftOverParent, possibleSubschem
|
|
|
80035
80096
|
}
|
|
80036
80097
|
} else {
|
|
80037
80098
|
for (const selectionNode of selectionSet.selections) {
|
|
80038
|
-
if (selectionNode.kind ===
|
|
80099
|
+
if (selectionNode.kind === import_graphql52.Kind.FIELD && selectionNode.selectionSet?.selections?.length) {
|
|
80039
80100
|
const responseKey = selectionNode.alias?.value ?? selectionNode.name.value;
|
|
80040
80101
|
const nestedParent = flattenedParent[responseKey];
|
|
80041
80102
|
const nestedSelectionSet = selectionNode.selectionSet;
|
|
@@ -80053,7 +80114,7 @@ function handleFlattenedParent(flattenedParent, leftOverParent, possibleSubschem
|
|
|
80053
80114
|
if (resolver) {
|
|
80054
80115
|
const res = await resolver(nestedParentItem, context, info, subschema, selectionSet2, info.parentType, info.parentType);
|
|
80055
80116
|
if (res) {
|
|
80056
|
-
handleResolverResult(res, subschema, selectionSet2, nestedParentItem, nestedParentItem[FIELD_SUBSCHEMA_MAP_SYMBOL] ||= /* @__PURE__ */ new Map, info,
|
|
80117
|
+
handleResolverResult(res, subschema, selectionSet2, nestedParentItem, nestedParentItem[FIELD_SUBSCHEMA_MAP_SYMBOL] ||= /* @__PURE__ */ new Map, info, import_graphql52.responsePathAsArray(info.path), nestedParentItem[UNPATHED_ERRORS_SYMBOL] ||= []);
|
|
80057
80118
|
}
|
|
80058
80119
|
}
|
|
80059
80120
|
}
|
|
@@ -80076,7 +80137,7 @@ function handleFlattenedParent(flattenedParent, leftOverParent, possibleSubschem
|
|
|
80076
80137
|
}
|
|
80077
80138
|
}
|
|
80078
80139
|
function handleDeferredResolverResult(resolverResult, possibleSubschema, selectionSet, leftOverParent, leftOver, context, info) {
|
|
80079
|
-
handleResolverResult(resolverResult, possibleSubschema, selectionSet, leftOverParent, leftOverParent[FIELD_SUBSCHEMA_MAP_SYMBOL], info,
|
|
80140
|
+
handleResolverResult(resolverResult, possibleSubschema, selectionSet, leftOverParent, leftOverParent[FIELD_SUBSCHEMA_MAP_SYMBOL], info, import_graphql52.responsePathAsArray(info.path), leftOverParent[UNPATHED_ERRORS_SYMBOL]);
|
|
80080
80141
|
const deferredFields = leftOver.missingFieldsParentDeferredMap.get(leftOverParent);
|
|
80081
80142
|
if (deferredFields) {
|
|
80082
80143
|
for (const [responseKey, deferred] of deferredFields) {
|
|
@@ -80118,7 +80179,7 @@ function parentSatisfiedSelectionSet(parent, selectionSet) {
|
|
|
80118
80179
|
}
|
|
80119
80180
|
const subschemas = /* @__PURE__ */ new Set;
|
|
80120
80181
|
for (const selection of selectionSet.selections) {
|
|
80121
|
-
if (selection.kind ===
|
|
80182
|
+
if (selection.kind === import_graphql52.Kind.FIELD) {
|
|
80122
80183
|
const responseKey = selection.alias?.value ?? selection.name.value;
|
|
80123
80184
|
if (parent[responseKey] === undefined) {
|
|
80124
80185
|
return;
|
|
@@ -80141,7 +80202,7 @@ function parentSatisfiedSelectionSet(parent, selectionSet) {
|
|
|
80141
80202
|
subschemas.add(subschema);
|
|
80142
80203
|
}
|
|
80143
80204
|
}
|
|
80144
|
-
} else if (selection.kind ===
|
|
80205
|
+
} else if (selection.kind === import_graphql52.Kind.INLINE_FRAGMENT) {
|
|
80145
80206
|
const inlineSatisfied = parentSatisfiedSelectionSet(parent, selection.selectionSet);
|
|
80146
80207
|
if (inlineSatisfied === undefined) {
|
|
80147
80208
|
return;
|
|
@@ -80205,6 +80266,7 @@ function delegateToSchema(options) {
|
|
|
80205
80266
|
context
|
|
80206
80267
|
} = options;
|
|
80207
80268
|
const request = createRequest({
|
|
80269
|
+
subgraphName: schema.name,
|
|
80208
80270
|
sourceSchema: info.schema,
|
|
80209
80271
|
sourceParentType: info.parentType,
|
|
80210
80272
|
sourceFieldName: info.fieldName,
|
|
@@ -80242,7 +80304,7 @@ function delegateRequest(options) {
|
|
|
80242
80304
|
}
|
|
80243
80305
|
return handleMaybePromise(() => getExecutor(delegationContext)(processedRequest), function handleExecutorResult(executorResult) {
|
|
80244
80306
|
if (isAsyncIterable(executorResult)) {
|
|
80245
|
-
if (delegationContext.operation === "query" &&
|
|
80307
|
+
if (delegationContext.operation === "query" && import_graphql52.isListType(delegationContext.returnType)) {
|
|
80246
80308
|
return new Repeater(async (push2, stop2) => {
|
|
80247
80309
|
const pushed = /* @__PURE__ */ new WeakSet;
|
|
80248
80310
|
let stopped = false;
|
|
@@ -80353,7 +80415,7 @@ function getDelegationContext({
|
|
|
80353
80415
|
};
|
|
80354
80416
|
}
|
|
80355
80417
|
function validateRequest(delegationContext, document) {
|
|
80356
|
-
const errors5 =
|
|
80418
|
+
const errors5 = import_graphql52.validate(delegationContext.targetSchema, document);
|
|
80357
80419
|
if (errors5.length > 0) {
|
|
80358
80420
|
if (errors5.length > 1) {
|
|
80359
80421
|
const combinedError = new AggregateError(errors5, errors5.map((error210) => error210.message).join(`,
|
|
@@ -80377,8 +80439,8 @@ function getExecutor(delegationContext) {
|
|
|
80377
80439
|
return executor2;
|
|
80378
80440
|
}
|
|
80379
80441
|
|
|
80380
|
-
// ../../node_modules/.bun/@graphql-tools+wrap@
|
|
80381
|
-
var
|
|
80442
|
+
// ../../node_modules/.bun/@graphql-tools+wrap@11.0.0+ded46c799560c44e/node_modules/@graphql-tools/wrap/dist/index.js
|
|
80443
|
+
var import_graphql53 = __toESM(require_graphql2(), 1);
|
|
80382
80444
|
function generateProxyingResolvers(subschemaConfig) {
|
|
80383
80445
|
const targetSchema = subschemaConfig.schema;
|
|
80384
80446
|
const createProxyingResolver = subschemaConfig.createProxyingResolver ?? defaultCreateProxyingResolver;
|
|
@@ -80464,21 +80526,21 @@ function createWrappingSchema(schema, proxyingResolvers) {
|
|
|
80464
80526
|
},
|
|
80465
80527
|
[MapperKind.OBJECT_TYPE]: (type) => {
|
|
80466
80528
|
const config3 = type.toConfig();
|
|
80467
|
-
return new
|
|
80529
|
+
return new import_graphql53.GraphQLObjectType({
|
|
80468
80530
|
...config3,
|
|
80469
80531
|
isTypeOf: undefined
|
|
80470
80532
|
});
|
|
80471
80533
|
},
|
|
80472
80534
|
[MapperKind.INTERFACE_TYPE]: (type) => {
|
|
80473
80535
|
const config3 = type.toConfig();
|
|
80474
|
-
return new
|
|
80536
|
+
return new import_graphql53.GraphQLInterfaceType({
|
|
80475
80537
|
...config3,
|
|
80476
80538
|
resolveType: undefined
|
|
80477
80539
|
});
|
|
80478
80540
|
},
|
|
80479
80541
|
[MapperKind.UNION_TYPE]: (type) => {
|
|
80480
80542
|
const config3 = type.toConfig();
|
|
80481
|
-
return new
|
|
80543
|
+
return new import_graphql53.GraphQLUnionType({
|
|
80482
80544
|
...config3,
|
|
80483
80545
|
resolveType: undefined
|
|
80484
80546
|
});
|
|
@@ -80492,14 +80554,14 @@ function createWrappingSchema(schema, proxyingResolvers) {
|
|
|
80492
80554
|
});
|
|
80493
80555
|
}
|
|
80494
80556
|
var getTypeInfo3 = memoize1(function getTypeInfo22(schema) {
|
|
80495
|
-
return new
|
|
80557
|
+
return new import_graphql53.TypeInfo(schema);
|
|
80496
80558
|
});
|
|
80497
80559
|
memoize2(function getTypeInfoWithType22(schema, type) {
|
|
80498
|
-
return
|
|
80560
|
+
return import_graphql53.versionInfo.major < 16 ? new import_graphql53.TypeInfo(schema, undefined, type) : new import_graphql53.TypeInfo(schema, type);
|
|
80499
80561
|
});
|
|
80500
80562
|
function getSchemaFromIntrospection(introspectionResult, options) {
|
|
80501
80563
|
if (introspectionResult?.data?.__schema) {
|
|
80502
|
-
return
|
|
80564
|
+
return import_graphql53.buildClientSchema(introspectionResult.data, options);
|
|
80503
80565
|
}
|
|
80504
80566
|
if (introspectionResult?.errors) {
|
|
80505
80567
|
const graphqlErrors = introspectionResult.errors.map((error43) => createGraphQLError(error43.message, error43));
|
|
@@ -80513,7 +80575,7 @@ function getSchemaFromIntrospection(introspectionResult, options) {
|
|
|
80513
80575
|
${inspect(introspectionResult)}`);
|
|
80514
80576
|
}
|
|
80515
80577
|
function schemaFromExecutor(executor2, context, options) {
|
|
80516
|
-
const parsedIntrospectionQuery =
|
|
80578
|
+
const parsedIntrospectionQuery = import_graphql53.parse(import_graphql53.getIntrospectionQuery(options), options);
|
|
80517
80579
|
return handleMaybePromise(() => handleMaybePromise(() => executor2({
|
|
80518
80580
|
document: parsedIntrospectionQuery,
|
|
80519
80581
|
context
|
|
@@ -80526,10 +80588,10 @@ function schemaFromExecutor(executor2, context, options) {
|
|
|
80526
80588
|
}), (introspection) => getSchemaFromIntrospection(introspection, options));
|
|
80527
80589
|
}
|
|
80528
80590
|
|
|
80529
|
-
// ../../node_modules/.bun/@graphql-tools+url-loader@
|
|
80591
|
+
// ../../node_modules/.bun/@graphql-tools+url-loader@9.0.0+ded46c799560c44e/node_modules/@graphql-tools/url-loader/esm/defaultAsyncFetch.js
|
|
80530
80592
|
var defaultAsyncFetch = $fetch;
|
|
80531
80593
|
|
|
80532
|
-
// ../../node_modules/.bun/@graphql-tools+url-loader@
|
|
80594
|
+
// ../../node_modules/.bun/@graphql-tools+url-loader@9.0.0+ded46c799560c44e/node_modules/@graphql-tools/url-loader/esm/defaultSyncFetch.js
|
|
80533
80595
|
var import_sync_fetch = __toESM(require_sync_fetch(), 1);
|
|
80534
80596
|
var defaultSyncFetch = (input, init) => {
|
|
80535
80597
|
if (typeof input === "string") {
|
|
@@ -80540,7 +80602,7 @@ var defaultSyncFetch = (input, init) => {
|
|
|
80540
80602
|
return import_sync_fetch.default(input, init);
|
|
80541
80603
|
};
|
|
80542
80604
|
|
|
80543
|
-
// ../../node_modules/.bun/@graphql-tools+url-loader@
|
|
80605
|
+
// ../../node_modules/.bun/@graphql-tools+url-loader@9.0.0+ded46c799560c44e/node_modules/@graphql-tools/url-loader/esm/index.js
|
|
80544
80606
|
var asyncImport = (moduleName) => import(`${moduleName}`);
|
|
80545
80607
|
var syncImport = (moduleName) => __require(`${moduleName}`);
|
|
80546
80608
|
var SubscriptionProtocol;
|
|
@@ -80692,7 +80754,7 @@ class UrlLoader {
|
|
|
80692
80754
|
if (!source.schema && !source.document && !source.rawSDL) {
|
|
80693
80755
|
throw new Error(`Invalid SDL response`);
|
|
80694
80756
|
}
|
|
80695
|
-
source.schema = source.schema || (source.document ?
|
|
80757
|
+
source.schema = source.schema || (source.document ? import_graphql54.buildASTSchema(source.document, options) : source.rawSDL ? import_graphql54.buildSchema(source.rawSDL, options) : undefined);
|
|
80696
80758
|
} else {
|
|
80697
80759
|
executor2 = this.getExecutorAsync(pointer, options);
|
|
80698
80760
|
source.schema = await schemaFromExecutor(executor2, {}, options);
|
|
@@ -80726,7 +80788,7 @@ class UrlLoader {
|
|
|
80726
80788
|
if (!source.schema && !source.document && !source.rawSDL) {
|
|
80727
80789
|
throw new Error(`Invalid SDL response`);
|
|
80728
80790
|
}
|
|
80729
|
-
source.schema = source.schema || (source.document ?
|
|
80791
|
+
source.schema = source.schema || (source.document ? import_graphql54.buildASTSchema(source.document, options) : source.rawSDL ? import_graphql54.buildSchema(source.rawSDL, options) : undefined);
|
|
80730
80792
|
} else {
|
|
80731
80793
|
executor2 = this.getExecutorSync(pointer, options);
|
|
80732
80794
|
source.schema = schemaFromExecutor(executor2, {}, options);
|
|
@@ -82135,7 +82197,7 @@ var portalQueries = (server, env3) => {
|
|
|
82135
82197
|
var package_default = {
|
|
82136
82198
|
name: "@settlemint/sdk-mcp",
|
|
82137
82199
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
82138
|
-
version: "2.6.2-
|
|
82200
|
+
version: "2.6.2-prfaedf028",
|
|
82139
82201
|
type: "module",
|
|
82140
82202
|
private: false,
|
|
82141
82203
|
license: "FSL-1.1-MIT",
|
|
@@ -82176,10 +82238,10 @@ var package_default = {
|
|
|
82176
82238
|
dependencies: {
|
|
82177
82239
|
"@commander-js/extra-typings": "14.0.0",
|
|
82178
82240
|
"@graphql-tools/load": "8.1.2",
|
|
82179
|
-
"@graphql-tools/url-loader": "
|
|
82241
|
+
"@graphql-tools/url-loader": "9.0.0",
|
|
82180
82242
|
"@modelcontextprotocol/sdk": "1.17.5",
|
|
82181
|
-
"@settlemint/sdk-js": "2.6.2-
|
|
82182
|
-
"@settlemint/sdk-utils": "2.6.2-
|
|
82243
|
+
"@settlemint/sdk-js": "2.6.2-prfaedf028",
|
|
82244
|
+
"@settlemint/sdk-utils": "2.6.2-prfaedf028",
|
|
82183
82245
|
commander: "14.0.0",
|
|
82184
82246
|
graphql: "16.11.0",
|
|
82185
82247
|
zod: "^4",
|
|
@@ -82999,7 +83061,7 @@ var registerBlockchainConcepts = (server) => {
|
|
|
82999
83061
|
};
|
|
83000
83062
|
|
|
83001
83063
|
// src/utils/sdl.ts
|
|
83002
|
-
var
|
|
83064
|
+
var import_graphql55 = __toESM(require_graphql2(), 1);
|
|
83003
83065
|
var processFieldTypes = (fields2, schema, collectedTypes) => {
|
|
83004
83066
|
for (const field of Object.values(fields2)) {
|
|
83005
83067
|
collectCustomTypes(field.type, schema, collectedTypes);
|
|
@@ -83020,7 +83082,7 @@ var collectCustomTypes = (type, schema, collectedTypes = new Set) => {
|
|
|
83020
83082
|
return collectedTypes;
|
|
83021
83083
|
}
|
|
83022
83084
|
collectedTypes.add(typeName);
|
|
83023
|
-
if (
|
|
83085
|
+
if (import_graphql55.isInputObjectType(schemaType) || import_graphql55.isObjectType(schemaType)) {
|
|
83024
83086
|
const fields2 = schemaType.getFields();
|
|
83025
83087
|
processFieldTypes(fields2, schema, collectedTypes);
|
|
83026
83088
|
}
|
|
@@ -83030,7 +83092,7 @@ var generateTypeSDL = (typeName, schema) => {
|
|
|
83030
83092
|
const type = schema[typeName];
|
|
83031
83093
|
if (!type)
|
|
83032
83094
|
return "";
|
|
83033
|
-
if (
|
|
83095
|
+
if (import_graphql55.isInputObjectType(type)) {
|
|
83034
83096
|
const fields2 = type.getFields();
|
|
83035
83097
|
const fieldSDLs = Object.values(fields2).map((field) => ` ${field.name}: ${field.type}`).join(`
|
|
83036
83098
|
`);
|
|
@@ -83038,7 +83100,7 @@ var generateTypeSDL = (typeName, schema) => {
|
|
|
83038
83100
|
${fieldSDLs}
|
|
83039
83101
|
}`;
|
|
83040
83102
|
}
|
|
83041
|
-
if (
|
|
83103
|
+
if (import_graphql55.isObjectType(type)) {
|
|
83042
83104
|
const fields2 = type.getFields();
|
|
83043
83105
|
const fieldSDLs = Object.values(fields2).map((field) => {
|
|
83044
83106
|
const args = field.args.length > 0 ? `(${field.args.map((arg) => `${arg.name}: ${arg.type}`).join(", ")})` : "";
|
|
@@ -83539,7 +83601,7 @@ var parseRawRequestArgs = (queryOrOptions, variables, requestHeaders) => {
|
|
|
83539
83601
|
};
|
|
83540
83602
|
|
|
83541
83603
|
// ../../node_modules/.bun/graphql-request@7.2.0+ded46c799560c44e/node_modules/graphql-request/build/legacy/lib/graphql.js
|
|
83542
|
-
var
|
|
83604
|
+
var import_graphql56 = __toESM(require_graphql2(), 1);
|
|
83543
83605
|
|
|
83544
83606
|
// ../../node_modules/.bun/graphql-request@7.2.0+ded46c799560c44e/node_modules/graphql-request/build/lib/http.js
|
|
83545
83607
|
var ACCEPT_HEADER = `Accept`;
|
|
@@ -83607,12 +83669,12 @@ var parseExecutionResult = (result) => {
|
|
|
83607
83669
|
var isRequestResultHaveErrors = (result) => result._tag === `Batch` ? result.executionResults.some(isExecutionResultHaveErrors) : isExecutionResultHaveErrors(result.executionResult);
|
|
83608
83670
|
var isExecutionResultHaveErrors = (result) => Array.isArray(result.errors) ? result.errors.length > 0 : Boolean(result.errors);
|
|
83609
83671
|
var isOperationDefinitionNode = (definition) => {
|
|
83610
|
-
return typeof definition === `object` && definition !== null && `kind` in definition && definition.kind ===
|
|
83672
|
+
return typeof definition === `object` && definition !== null && `kind` in definition && definition.kind === import_graphql56.Kind.OPERATION_DEFINITION;
|
|
83611
83673
|
};
|
|
83612
83674
|
|
|
83613
83675
|
// ../../node_modules/.bun/graphql-request@7.2.0+ded46c799560c44e/node_modules/graphql-request/build/legacy/helpers/analyzeDocument.js
|
|
83676
|
+
var import_graphql58 = __toESM(require_graphql2(), 1);
|
|
83614
83677
|
var import_graphql59 = __toESM(require_graphql2(), 1);
|
|
83615
|
-
var import_graphql60 = __toESM(require_graphql2(), 1);
|
|
83616
83678
|
var extractOperationName = (document) => {
|
|
83617
83679
|
let operationName = undefined;
|
|
83618
83680
|
const defs = document.definitions.filter(isOperationDefinitionNode);
|
|
@@ -83630,13 +83692,13 @@ var extractIsMutation = (document) => {
|
|
|
83630
83692
|
return isMutation;
|
|
83631
83693
|
};
|
|
83632
83694
|
var analyzeDocument = (document, excludeOperationName) => {
|
|
83633
|
-
const expression = typeof document === `string` ? document :
|
|
83695
|
+
const expression = typeof document === `string` ? document : import_graphql59.print(document);
|
|
83634
83696
|
let isMutation = false;
|
|
83635
83697
|
let operationName = undefined;
|
|
83636
83698
|
if (excludeOperationName) {
|
|
83637
83699
|
return { expression, isMutation, operationName };
|
|
83638
83700
|
}
|
|
83639
|
-
const docNode = tryCatch(() => typeof document === `string` ?
|
|
83701
|
+
const docNode = tryCatch(() => typeof document === `string` ? import_graphql58.parse(document) : document);
|
|
83640
83702
|
if (docNode instanceof Error) {
|
|
83641
83703
|
return { expression, isMutation, operationName };
|
|
83642
83704
|
}
|
|
@@ -84910,6 +84972,7 @@ var createBlockchainNetwork = graphql(`
|
|
|
84910
84972
|
$quorumGenesis: QuorumGenesisInput
|
|
84911
84973
|
$externalNodes: [BlockchainNetworkExternalNodeInput!]
|
|
84912
84974
|
$privateKeyId: ID
|
|
84975
|
+
$includePredeployedContracts: Boolean
|
|
84913
84976
|
) {
|
|
84914
84977
|
createBlockchainNetwork(
|
|
84915
84978
|
applicationId: $applicationId
|
|
@@ -84938,6 +85001,7 @@ var createBlockchainNetwork = graphql(`
|
|
|
84938
85001
|
quorumGenesis: $quorumGenesis
|
|
84939
85002
|
externalNodes: $externalNodes
|
|
84940
85003
|
keyMaterial: $privateKeyId
|
|
85004
|
+
includePredeployedContracts: $includePredeployedContracts
|
|
84941
85005
|
) {
|
|
84942
85006
|
...BlockchainNetwork
|
|
84943
85007
|
}
|
|
@@ -88246,4 +88310,4 @@ await main().catch((error44) => {
|
|
|
88246
88310
|
process.exit(1);
|
|
88247
88311
|
});
|
|
88248
88312
|
|
|
88249
|
-
//# debugId=
|
|
88313
|
+
//# debugId=8714F33C418BE3B264756E2164756E21
|