Socket
Socket
Sign inDemoInstall

@apollo/client

Package Overview
Dependencies
Maintainers
4
Versions
575
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo/client - npm Package Compare versions

Comparing version 3.9.6 to 3.9.7

26

core/LocalState.js

@@ -45,5 +45,5 @@ import { __assign, __awaiter, __generator } from "tslib";

LocalState.prototype.runResolvers = function (_a) {
var document = _a.document, remoteResult = _a.remoteResult, context = _a.context, variables = _a.variables, _b = _a.onlyRunForcedResolvers, onlyRunForcedResolvers = _b === void 0 ? false : _b;
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_c) {
return __awaiter(this, arguments, void 0, function (_b) {
var document = _b.document, remoteResult = _b.remoteResult, context = _b.context, variables = _b.variables, _c = _b.onlyRunForcedResolvers, onlyRunForcedResolvers = _c === void 0 ? false : _c;
return __generator(this, function (_d) {
if (document) {

@@ -87,6 +87,6 @@ return [2 /*return*/, this.resolveDocument(document, remoteResult.data, context, variables, this.fragmentMatcher, onlyRunForcedResolvers).then(function (localResult) { return (__assign(__assign({}, remoteResult), { data: localResult.result })); })];

// used alongside the original operation variables.
LocalState.prototype.addExportedVariables = function (document, variables, context) {
if (variables === void 0) { variables = {}; }
if (context === void 0) { context = {}; }
return __awaiter(this, void 0, void 0, function () {
LocalState.prototype.addExportedVariables = function (document_1) {
return __awaiter(this, arguments, void 0, function (document, variables, context) {
if (variables === void 0) { variables = {}; }
if (context === void 0) { context = {}; }
return __generator(this, function (_a) {

@@ -129,9 +129,9 @@ if (document) {

};
LocalState.prototype.resolveDocument = function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {
if (context === void 0) { context = {}; }
if (variables === void 0) { variables = {}; }
if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }
if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }
return __awaiter(this, void 0, void 0, function () {
LocalState.prototype.resolveDocument = function (document_1, rootValue_1) {
return __awaiter(this, arguments, void 0, function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {
var mainDefinition, fragments, fragmentMap, selectionsToResolve, definitionOperation, defaultOperationType, _a, cache, client, execContext, isClientFieldDescendant;
if (context === void 0) { context = {}; }
if (variables === void 0) { variables = {}; }
if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }
if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }
return __generator(this, function (_b) {

@@ -138,0 +138,0 @@ mainDefinition = getMainDefinition(document);

@@ -83,8 +83,8 @@ import { __assign, __awaiter, __generator } from "tslib";

QueryManager.prototype.mutate = function (_a) {
var _b, _c;
var mutation = _a.mutation, variables = _a.variables, optimisticResponse = _a.optimisticResponse, updateQueries = _a.updateQueries, _d = _a.refetchQueries, refetchQueries = _d === void 0 ? [] : _d, _e = _a.awaitRefetchQueries, awaitRefetchQueries = _e === void 0 ? false : _e, updateWithProxyFn = _a.update, onQueryUpdated = _a.onQueryUpdated, _f = _a.fetchPolicy, fetchPolicy = _f === void 0 ? ((_b = this.defaultOptions.mutate) === null || _b === void 0 ? void 0 : _b.fetchPolicy) || "network-only" : _f, _g = _a.errorPolicy, errorPolicy = _g === void 0 ? ((_c = this.defaultOptions.mutate) === null || _c === void 0 ? void 0 : _c.errorPolicy) || "none" : _g, keepRootFields = _a.keepRootFields, context = _a.context;
return __awaiter(this, void 0, void 0, function () {
return __awaiter(this, arguments, void 0, function (_b) {
var mutationId, hasClientExports, mutationStoreValue, isOptimistic, self;
return __generator(this, function (_h) {
switch (_h.label) {
var _c, _d;
var mutation = _b.mutation, variables = _b.variables, optimisticResponse = _b.optimisticResponse, updateQueries = _b.updateQueries, _e = _b.refetchQueries, refetchQueries = _e === void 0 ? [] : _e, _f = _b.awaitRefetchQueries, awaitRefetchQueries = _f === void 0 ? false : _f, updateWithProxyFn = _b.update, onQueryUpdated = _b.onQueryUpdated, _g = _b.fetchPolicy, fetchPolicy = _g === void 0 ? ((_c = this.defaultOptions.mutate) === null || _c === void 0 ? void 0 : _c.fetchPolicy) || "network-only" : _g, _h = _b.errorPolicy, errorPolicy = _h === void 0 ? ((_d = this.defaultOptions.mutate) === null || _d === void 0 ? void 0 : _d.errorPolicy) || "none" : _h, keepRootFields = _b.keepRootFields, context = _b.context;
return __generator(this, function (_j) {
switch (_j.label) {
case 0:

@@ -100,4 +100,4 @@ invariant(mutation, 26);

case 1:
variables = (_h.sent());
_h.label = 2;
variables = (_j.sent());
_j.label = 2;
case 2:

@@ -104,0 +104,0 @@ mutationStoreValue = this.mutationStore &&

@@ -431,3 +431,3 @@ 'use strict';

var version = "3.9.6";
var version = "3.9.7";

@@ -434,0 +434,0 @@ function maybe(thunk) {

@@ -184,6 +184,6 @@ 'use strict';

function readMultipartBody(response, nextValue) {
var _a;
return tslib.__awaiter(this, void 0, void 0, function () {
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _b, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _c, _d;
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _a, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _b, _c;
var _d;
return tslib.__generator(this, function (_e) {

@@ -196,3 +196,3 @@ switch (_e.label) {

decoder = new TextDecoder("utf-8");
contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get("content-type");
contentType = (_d = response.headers) === null || _d === void 0 ? void 0 : _d.get("content-type");
delimiter = "boundary=";

@@ -211,3 +211,3 @@ boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?

case 2:
_b = _e.sent(), value = _b.value, done = _b.done;
_a = _e.sent(), value = _a.value, done = _a.done;
chunk = typeof value === "string" ? value : decoder.decode(value);

@@ -220,6 +220,6 @@ searchFrom = buffer.length - boundary.length + 1;

message = void 0;
_c = [
_b = [
buffer.slice(0, bi),
buffer.slice(bi + boundary.length),
], message = _c[0], buffer = _c[1];
], message = _b[0], buffer = _b[1];
i = message.indexOf("\r\n\r\n");

@@ -243,6 +243,9 @@ headers = parseHeaders(message.slice(0, i));

if ("payload" in result) {
if (Object.keys(result).length === 1 && result.payload === null) {
return [2 ];
}
next = tslib.__assign({}, result.payload);
}
if ("errors" in result) {
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_d = {}, _d[errors.PROTOCOL_ERRORS_SYMBOL] = result.errors, _d)) });
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_c = {}, _c[errors.PROTOCOL_ERRORS_SYMBOL] = result.errors, _c)) });
}

@@ -249,0 +252,0 @@ nextValue(next);

@@ -8,6 +8,6 @@ import { __assign, __awaiter, __generator } from "tslib";

export function readMultipartBody(response, nextValue) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _b, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _c, _d;
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _a, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _b, _c;
var _d;
return __generator(this, function (_e) {

@@ -20,3 +20,3 @@ switch (_e.label) {

decoder = new TextDecoder("utf-8");
contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get("content-type");
contentType = (_d = response.headers) === null || _d === void 0 ? void 0 : _d.get("content-type");
delimiter = "boundary=";

@@ -35,3 +35,3 @@ boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?

case 2:
_b = _e.sent(), value = _b.value, done = _b.done;
_a = _e.sent(), value = _a.value, done = _a.done;
chunk = typeof value === "string" ? value : decoder.decode(value);

@@ -44,6 +44,6 @@ searchFrom = buffer.length - boundary.length + 1;

message = void 0;
_c = [
_b = [
buffer.slice(0, bi),
buffer.slice(bi + boundary.length),
], message = _c[0], buffer = _c[1];
], message = _b[0], buffer = _b[1];
i = message.indexOf("\r\n\r\n");

@@ -67,6 +67,9 @@ headers = parseHeaders(message.slice(0, i));

if ("payload" in result) {
if (Object.keys(result).length === 1 && result.payload === null) {
return [2 /*return*/];
}
next = __assign({}, result.payload);
}
if ("errors" in result) {
next = __assign(__assign({}, next), { extensions: __assign(__assign({}, ("extensions" in next ? next.extensions : null)), (_d = {}, _d[PROTOCOL_ERRORS_SYMBOL] = result.errors, _d)) });
next = __assign(__assign({}, next), { extensions: __assign(__assign({}, ("extensions" in next ? next.extensions : null)), (_c = {}, _c[PROTOCOL_ERRORS_SYMBOL] = result.errors, _c)) });
}

@@ -73,0 +76,0 @@ nextValue(next);

{
"name": "@apollo/client",
"version": "3.9.6",
"version": "3.9.7",
"description": "A fully-featured caching GraphQL client.",

@@ -70,8 +70,8 @@ "private": false,

"devDependencies": {
"@arethetypeswrong/cli": "0.13.10",
"@babel/parser": "7.23.9",
"@arethetypeswrong/cli": "0.15.1",
"@babel/parser": "7.24.0",
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.1",
"@graphql-tools/schema": "10.0.3",
"@microsoft/api-extractor": "7.40.2",
"@microsoft/api-extractor": "7.42.3",
"@rollup/plugin-node-resolve": "11.2.1",

@@ -91,13 +91,13 @@ "@size-limit/esbuild-why": "11.0.2",

"@types/lodash": "4.14.202",
"@types/node": "20.11.24",
"@types/node": "20.11.25",
"@types/node-fetch": "2.6.11",
"@types/react": "18.2.61",
"@types/react-dom": "18.2.19",
"@types/react": "18.2.64",
"@types/react-dom": "18.2.21",
"@types/relay-runtime": "14.1.23",
"@types/use-sync-external-store": "0.0.6",
"@typescript-eslint/eslint-plugin": "7.0.1",
"@typescript-eslint/parser": "7.0.1",
"@typescript-eslint/rule-tester": "7.0.1",
"@typescript-eslint/types": "7.0.1",
"@typescript-eslint/utils": "7.0.1",
"@typescript-eslint/eslint-plugin": "7.1.1",
"@typescript-eslint/parser": "7.1.1",
"@typescript-eslint/rule-tester": "7.1.1",
"@typescript-eslint/types": "7.1.1",
"@typescript-eslint/utils": "7.1.1",
"acorn": "8.11.3",

@@ -107,3 +107,3 @@ "blob-polyfill": "7.0.20220408",

"cross-fetch": "4.0.0",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-import-resolver-typescript": "3.6.1",

@@ -113,3 +113,3 @@ "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c",

"eslint-plugin-testing-library": "6.2.0",
"expect-type": "0.17.3",
"expect-type": "0.18.0",
"fetch-mock": "9.11.0",

@@ -130,3 +130,3 @@ "glob": "8.1.0",

"react-error-boundary": "4.0.13",
"recast": "0.23.5",
"recast": "0.23.6",
"resolve": "1.22.8",

@@ -140,4 +140,4 @@ "rimraf": "5.0.5",

"subscriptions-transport-ws": "0.11.0",
"terser": "5.27.1",
"ts-api-utils": "1.2.1",
"terser": "5.29.1",
"ts-api-utils": "1.3.0",
"ts-jest": "29.1.2",

@@ -148,3 +148,3 @@ "ts-jest-resolver": "2.0.1",

"typedoc": "0.25.0",
"typescript": "5.3.3",
"typescript": "5.4.2",
"wait-for-observables": "1.0.3",

@@ -151,0 +151,0 @@ "web-streams-polyfill": "3.3.3",

@@ -103,3 +103,3 @@ 'use strict';

return React__namespace.useCallback(function () {
return (RenderDispatcher !== null && RenderDispatcher === getRenderDispatcher());
return (RenderDispatcher != null && RenderDispatcher === getRenderDispatcher());
}, []);

@@ -106,0 +106,0 @@ }

@@ -14,5 +14,5 @@ import * as React from "rehackt";

return React.useCallback(function () {
return (RenderDispatcher !== null && RenderDispatcher === getRenderDispatcher());
return (RenderDispatcher != null && RenderDispatcher === getRenderDispatcher());
}, []);
}
//# sourceMappingURL=useRenderGuard.js.map

@@ -40,5 +40,5 @@ import { __asyncGenerator, __await, __awaiter, __extends, __generator } from "tslib";

}
IteratorStream.prototype.take = function (_a) {
var _b = _a === void 0 ? {} : _a, _c = _b.timeout, timeout = _c === void 0 ? 100 : _c;
return __awaiter(this, void 0, void 0, function () {
IteratorStream.prototype.take = function () {
return __awaiter(this, arguments, void 0, function (_a) {
var _b = _a === void 0 ? {} : _a, _c = _b.timeout, timeout = _c === void 0 ? 100 : _c;
return __generator(this, function (_d) {

@@ -45,0 +45,0 @@ return [2 /*return*/, Promise.race([

@@ -115,7 +115,7 @@ var _a, _b;

},
peekRender: function (options) {
if (options === void 0) { options = {}; }
return __awaiter(this, void 0, void 0, function () {
peekRender: function () {
return __awaiter(this, arguments, void 0, function (options) {
var render;
var _a;
if (options === void 0) { options = {}; }
return __generator(this, function (_b) {

@@ -133,7 +133,7 @@ if (iteratorPosition < Profiler.renders.length) {

},
takeRender: function (options) {
if (options === void 0) { options = {}; }
return __awaiter(this, void 0, void 0, function () {
takeRender: function () {
return __awaiter(this, arguments, void 0, function (options) {
var env_1, _disabledActWarnings, error, e_1, e_2;
var _a;
if (options === void 0) { options = {}; }
return __generator(this, function (_b) {

@@ -140,0 +140,0 @@ switch (_b.label) {

@@ -7,3 +7,3 @@ 'use strict';

var version = "3.9.6";
var version = "3.9.7";

@@ -10,0 +10,0 @@ function maybe(thunk) {

@@ -183,6 +183,6 @@ 'use strict';

function readMultipartBody(response, nextValue) {
var _a;
return tslib.__awaiter(this, void 0, void 0, function () {
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _b, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _c, _d;
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _a, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _b, _c;
var _d;
return tslib.__generator(this, function (_e) {

@@ -195,3 +195,3 @@ switch (_e.label) {

decoder = new TextDecoder("utf-8");
contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get("content-type");
contentType = (_d = response.headers) === null || _d === void 0 ? void 0 : _d.get("content-type");
delimiter = "boundary=";

@@ -210,3 +210,3 @@ boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?

case 2:
_b = _e.sent(), value = _b.value, done = _b.done;
_a = _e.sent(), value = _a.value, done = _a.done;
chunk = typeof value === "string" ? value : decoder.decode(value);

@@ -219,6 +219,6 @@ searchFrom = buffer.length - boundary.length + 1;

message = void 0;
_c = [
_b = [
buffer.slice(0, bi),
buffer.slice(bi + boundary.length),
], message = _c[0], buffer = _c[1];
], message = _b[0], buffer = _b[1];
i = message.indexOf("\r\n\r\n");

@@ -242,6 +242,9 @@ headers = parseHeaders(message.slice(0, i));

if ("payload" in result) {
if (Object.keys(result).length === 1 && result.payload === null) {
return [2 ];
}
next = tslib.__assign({}, result.payload);
}
if ("errors" in result) {
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_d = {}, _d[errors.PROTOCOL_ERRORS_SYMBOL] = result.errors, _d)) });
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_c = {}, _c[errors.PROTOCOL_ERRORS_SYMBOL] = result.errors, _c)) });
}

@@ -248,0 +251,0 @@ nextValue(next);

@@ -182,6 +182,6 @@ 'use strict';

function readMultipartBody(response, nextValue) {
var _a;
return tslib.__awaiter(this, void 0, void 0, function () {
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _b, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _c, _d;
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _a, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;
var _b, _c;
var _d;
return tslib.__generator(this, function (_e) {

@@ -194,3 +194,3 @@ switch (_e.label) {

decoder = new TextDecoder("utf-8");
contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get("content-type");
contentType = (_d = response.headers) === null || _d === void 0 ? void 0 : _d.get("content-type");
delimiter = "boundary=";

@@ -209,3 +209,3 @@ boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?

case 2:
_b = _e.sent(), value = _b.value, done = _b.done;
_a = _e.sent(), value = _a.value, done = _a.done;
chunk = typeof value === "string" ? value : decoder.decode(value);

@@ -218,6 +218,6 @@ searchFrom = buffer.length - boundary.length + 1;

message = void 0;
_c = [
_b = [
buffer.slice(0, bi),
buffer.slice(bi + boundary.length),
], message = _c[0], buffer = _c[1];
], message = _b[0], buffer = _b[1];
i = message.indexOf("\r\n\r\n");

@@ -241,6 +241,9 @@ headers = parseHeaders(message.slice(0, i));

if ("payload" in result) {
if (Object.keys(result).length === 1 && result.payload === null) {
return [2 ];
}
next = tslib.__assign({}, result.payload);
}
if ("errors" in result) {
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_d = {}, _d[errors.PROTOCOL_ERRORS_SYMBOL] = result.errors, _d)) });
next = tslib.__assign(tslib.__assign({}, next), { extensions: tslib.__assign(tslib.__assign({}, ("extensions" in next ? next.extensions : null)), (_c = {}, _c[errors.PROTOCOL_ERRORS_SYMBOL] = result.errors, _c)) });
}

@@ -247,0 +250,0 @@ nextValue(next);

@@ -1,2 +0,2 @@

export var version = "3.9.6";
export var version = "3.9.7";
//# sourceMappingURL=version.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc