@stonecrop/graphql-client 0.4.29 → 0.4.31
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/graphql-client.js
CHANGED
|
@@ -1168,10 +1168,10 @@ class We extends Error {
|
|
|
1168
1168
|
const d = st(
|
|
1169
1169
|
(i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null)
|
|
1170
1170
|
);
|
|
1171
|
-
this.source = a ?? (d == null || (r = d[0]) === null || r === void 0 ? void 0 : r.source), this.positions = u ??
|
|
1171
|
+
this.source = a ?? (d == null || (r = d[0]) === null || r === void 0 ? void 0 : r.source), this.positions = u ?? d?.map((N) => N.start), this.locations = u && a ? u.map((N) => Je(a, N)) : d?.map((N) => Je(N.source, N.start));
|
|
1172
1172
|
const y = Ln(
|
|
1173
|
-
l
|
|
1174
|
-
) ? l
|
|
1173
|
+
l?.extensions
|
|
1174
|
+
) ? l?.extensions : void 0;
|
|
1175
1175
|
this.extensions = (s = f ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
1176
1176
|
message: {
|
|
1177
1177
|
writable: !0,
|
|
@@ -1382,7 +1382,7 @@ const Ot = {
|
|
|
1382
1382
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
1383
1383
|
}, qn = new Set(Object.keys(Ot));
|
|
1384
1384
|
function ot(e) {
|
|
1385
|
-
const t = e
|
|
1385
|
+
const t = e?.kind;
|
|
1386
1386
|
return typeof t == "string" && qn.has(t);
|
|
1387
1387
|
}
|
|
1388
1388
|
var fe;
|
|
@@ -3318,7 +3318,7 @@ function Ei(e, t, n = Ot) {
|
|
|
3318
3318
|
var N, E;
|
|
3319
3319
|
ot(c) || Oe(!1, `Invalid AST Node: ${Ke(c)}.`);
|
|
3320
3320
|
const C = O ? (N = i.get(c.kind)) === null || N === void 0 ? void 0 : N.leave : (E = i.get(c.kind)) === null || E === void 0 ? void 0 : E.enter;
|
|
3321
|
-
if (b = C
|
|
3321
|
+
if (b = C?.call(t, c, l, f, d, y), b === gi)
|
|
3322
3322
|
break;
|
|
3323
3323
|
if (b === !1) {
|
|
3324
3324
|
if (!O) {
|
|
@@ -3600,7 +3600,7 @@ const wi = 80, vi = {
|
|
|
3600
3600
|
};
|
|
3601
3601
|
function w(e, t = "") {
|
|
3602
3602
|
var n;
|
|
3603
|
-
return (n = e
|
|
3603
|
+
return (n = e?.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
|
|
3604
3604
|
}
|
|
3605
3605
|
function z(e) {
|
|
3606
3606
|
return D(`{
|
|
@@ -3617,14 +3617,13 @@ function be(e) {
|
|
|
3617
3617
|
}
|
|
3618
3618
|
function ct(e) {
|
|
3619
3619
|
var t;
|
|
3620
|
-
return (t = e
|
|
3620
|
+
return (t = e?.some((n) => n.includes(`
|
|
3621
3621
|
`))) !== null && t !== void 0 ? t : !1;
|
|
3622
3622
|
}
|
|
3623
3623
|
const ut = (e) => {
|
|
3624
|
-
var i, r;
|
|
3625
3624
|
let t;
|
|
3626
|
-
const n = e.definitions.filter((
|
|
3627
|
-
return n.length === 1 && (t =
|
|
3625
|
+
const n = e.definitions.filter((i) => i.kind === "OperationDefinition");
|
|
3626
|
+
return n.length === 1 && (t = n[0]?.name?.value), t;
|
|
3628
3627
|
}, Ue = (e) => {
|
|
3629
3628
|
if (typeof e == "string") {
|
|
3630
3629
|
let n;
|
|
@@ -3647,8 +3646,7 @@ class Ee extends Error {
|
|
|
3647
3646
|
super(i), Object.setPrototypeOf(this, Ee.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, Ee);
|
|
3648
3647
|
}
|
|
3649
3648
|
static extractMessage(t) {
|
|
3650
|
-
|
|
3651
|
-
return ((i = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : i.message) ?? `GraphQL Error (Code: ${t.status})`;
|
|
3649
|
+
return t.errors?.[0]?.message ?? `GraphQL Error (Code: ${t.status})`;
|
|
3652
3650
|
}
|
|
3653
3651
|
}
|
|
3654
3652
|
var Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|