@apollo/client 3.7.11 → 3.7.12
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/apollo-client.cjs +17 -12
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/core.cjs +1 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +1 -1
- package/invariantErrorCodes.js +1 -1
- package/link/http/http.cjs +16 -11
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +16 -11
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js +16 -11
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/package.json +14 -14
- package/version.js +1 -1
package/apollo-client.cjs
CHANGED
|
@@ -1360,7 +1360,7 @@ var concat = ApolloLink.concat;
|
|
|
1360
1360
|
|
|
1361
1361
|
var execute = ApolloLink.execute;
|
|
1362
1362
|
|
|
1363
|
-
var version = '3.7.
|
|
1363
|
+
var version = '3.7.12';
|
|
1364
1364
|
|
|
1365
1365
|
function isNodeResponse(value) {
|
|
1366
1366
|
return !!value.body;
|
|
@@ -1563,12 +1563,12 @@ var ApolloError = (function (_super) {
|
|
|
1563
1563
|
|
|
1564
1564
|
var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
|
|
1565
1565
|
function readMultipartBody(response, observer) {
|
|
1566
|
-
var _a, _b, _c, _d;
|
|
1566
|
+
var _a, _b, _c, _d, _e;
|
|
1567
1567
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
1568
|
-
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running,
|
|
1569
|
-
var
|
|
1570
|
-
return tslib.__generator(this, function (
|
|
1571
|
-
switch (
|
|
1568
|
+
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _f, value, done, chunk, bi, message, i, headers, contentType_1, body, result, next;
|
|
1569
|
+
var _g, _h;
|
|
1570
|
+
return tslib.__generator(this, function (_j) {
|
|
1571
|
+
switch (_j.label) {
|
|
1572
1572
|
case 0:
|
|
1573
1573
|
if (TextDecoder === undefined) {
|
|
1574
1574
|
throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");
|
|
@@ -1583,22 +1583,22 @@ function readMultipartBody(response, observer) {
|
|
|
1583
1583
|
buffer = "";
|
|
1584
1584
|
iterator = responseIterator(response);
|
|
1585
1585
|
running = true;
|
|
1586
|
-
|
|
1586
|
+
_j.label = 1;
|
|
1587
1587
|
case 1:
|
|
1588
1588
|
if (!running) return [3, 3];
|
|
1589
1589
|
return [4, iterator.next()];
|
|
1590
1590
|
case 2:
|
|
1591
|
-
|
|
1591
|
+
_f = _j.sent(), value = _f.value, done = _f.done;
|
|
1592
1592
|
chunk = typeof value === "string" ? value : decoder.decode(value);
|
|
1593
1593
|
running = !done;
|
|
1594
1594
|
buffer += chunk;
|
|
1595
1595
|
bi = buffer.indexOf(boundary);
|
|
1596
1596
|
while (bi > -1) {
|
|
1597
1597
|
message = void 0;
|
|
1598
|
-
|
|
1598
|
+
_g = [
|
|
1599
1599
|
buffer.slice(0, bi),
|
|
1600
1600
|
buffer.slice(bi + boundary.length),
|
|
1601
|
-
], message =
|
|
1601
|
+
], message = _g[0], buffer = _g[1];
|
|
1602
1602
|
if (message.trim()) {
|
|
1603
1603
|
i = message.indexOf("\r\n\r\n");
|
|
1604
1604
|
headers = parseHeaders(message.slice(0, i));
|
|
@@ -1621,7 +1621,7 @@ function readMultipartBody(response, observer) {
|
|
|
1621
1621
|
next = tslib.__assign({}, result.payload);
|
|
1622
1622
|
}
|
|
1623
1623
|
if ("errors" in result) {
|
|
1624
|
-
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (
|
|
1624
|
+
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_h = {}, _h[PROTOCOL_ERRORS_SYMBOL] = result.errors, _h)) });
|
|
1625
1625
|
}
|
|
1626
1626
|
(_b = observer.next) === null || _b === void 0 ? void 0 : _b.call(observer, next);
|
|
1627
1627
|
}
|
|
@@ -1629,6 +1629,11 @@ function readMultipartBody(response, observer) {
|
|
|
1629
1629
|
(_c = observer.next) === null || _c === void 0 ? void 0 : _c.call(observer, result);
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
|
+
else if (Object.keys(result).length === 1 &&
|
|
1633
|
+
"hasNext" in result &&
|
|
1634
|
+
!result.hasNext) {
|
|
1635
|
+
(_d = observer.complete) === null || _d === void 0 ? void 0 : _d.call(observer);
|
|
1636
|
+
}
|
|
1632
1637
|
}
|
|
1633
1638
|
catch (err) {
|
|
1634
1639
|
handleError(err, observer);
|
|
@@ -1638,7 +1643,7 @@ function readMultipartBody(response, observer) {
|
|
|
1638
1643
|
}
|
|
1639
1644
|
return [3, 1];
|
|
1640
1645
|
case 3:
|
|
1641
|
-
(
|
|
1646
|
+
(_e = observer.complete) === null || _e === void 0 ? void 0 : _e.call(observer);
|
|
1642
1647
|
return [2];
|
|
1643
1648
|
}
|
|
1644
1649
|
});
|