@apollo/client 3.4.7 → 3.4.11
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/README.md +2 -2
- package/apollo-client.cjs.js +155 -156
- package/apollo-client.cjs.js.map +1 -1
- package/apollo-core.cjs.js +140 -103
- package/apollo-core.cjs.js.map +1 -1
- package/apollo-core.cjs.min.js +1 -1
- package/cache/cache.cjs.js +29 -28
- package/cache/cache.cjs.js.map +1 -1
- package/cache/index.d.ts +1 -0
- package/cache/index.d.ts.map +1 -1
- package/cache/index.js +1 -3
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.js +2 -2
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/object-canon.d.ts +1 -0
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +1 -0
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +13 -10
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.js +4 -4
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.js +2 -2
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +3 -3
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +2 -2
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +7 -6
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +79 -46
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +10 -10
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs.js +109 -75
- package/core/core.cjs.js.map +1 -1
- package/core/index.js +1 -1
- package/core/index.js.map +1 -1
- package/errors/errors.cjs.js +1 -2
- package/errors/errors.cjs.js.map +1 -1
- package/errors/index.d.ts +1 -0
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js +1 -3
- package/errors/index.js.map +1 -1
- package/invariantErrorCodes.js +56 -81
- package/link/core/ApolloLink.js +2 -2
- package/link/core/ApolloLink.js.map +1 -1
- package/link/core/core.cjs.js +4 -6
- package/link/core/core.cjs.js.map +1 -1
- package/link/core/index.d.ts +1 -0
- package/link/core/index.d.ts.map +1 -1
- package/link/core/index.js +1 -3
- package/link/core/index.js.map +1 -1
- package/link/http/checkFetcher.js +2 -2
- package/link/http/checkFetcher.js.map +1 -1
- package/link/http/createHttpLink.d.ts +1 -0
- package/link/http/createHttpLink.d.ts.map +1 -1
- package/link/http/createHttpLink.js +1 -0
- package/link/http/createHttpLink.js.map +1 -1
- package/link/http/http.cjs.js +3 -3
- package/link/http/http.cjs.js.map +1 -1
- package/link/http/index.d.ts +1 -0
- package/link/http/index.d.ts.map +1 -1
- package/link/http/index.js +1 -0
- package/link/http/index.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.d.ts.map +1 -1
- package/link/http/serializeFetchParameter.js +2 -2
- package/link/http/serializeFetchParameter.js.map +1 -1
- package/link/persisted-queries/index.d.ts +1 -1
- package/link/persisted-queries/index.d.ts.map +1 -1
- package/link/persisted-queries/index.js +4 -4
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.js +8 -5
- package/link/persisted-queries/persisted-queries.cjs.js.map +1 -1
- package/link/utils/index.d.ts +1 -0
- package/link/utils/index.d.ts.map +1 -1
- package/link/utils/index.js +1 -0
- package/link/utils/index.js.map +1 -1
- package/link/utils/toPromise.d.ts.map +1 -1
- package/link/utils/toPromise.js +1 -1
- package/link/utils/toPromise.js.map +1 -1
- package/link/utils/utils.cjs.js +3 -3
- package/link/utils/utils.cjs.js.map +1 -1
- package/link/utils/validateOperation.d.ts.map +1 -1
- package/link/utils/validateOperation.js +2 -2
- package/link/utils/validateOperation.js.map +1 -1
- package/package.json +11 -11
- package/react/context/ApolloConsumer.d.ts.map +1 -1
- package/react/context/ApolloConsumer.js +2 -2
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloProvider.d.ts.map +1 -1
- package/react/context/ApolloProvider.js +2 -2
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/context/context.cjs.js +5 -5
- package/react/context/context.cjs.js.map +1 -1
- package/react/context/index.d.ts +1 -0
- package/react/context/index.d.ts.map +1 -1
- package/react/context/index.js +1 -0
- package/react/context/index.js.map +1 -1
- package/react/data/OperationData.d.ts.map +1 -1
- package/react/data/OperationData.js +3 -3
- package/react/data/OperationData.js.map +1 -1
- package/react/data/QueryData.d.ts.map +1 -1
- package/react/data/QueryData.js +9 -11
- package/react/data/QueryData.js.map +1 -1
- package/react/data/data.cjs.js +14 -16
- package/react/data/data.cjs.js.map +1 -1
- package/react/data/index.d.ts +1 -0
- package/react/data/index.d.ts.map +1 -1
- package/react/data/index.js +1 -0
- package/react/data/index.js.map +1 -1
- package/react/hoc/hoc-utils.d.ts.map +1 -1
- package/react/hoc/hoc-utils.js +2 -2
- package/react/hoc/hoc-utils.js.map +1 -1
- package/react/hoc/hoc.cjs.js +5 -5
- package/react/hoc/hoc.cjs.js.map +1 -1
- package/react/hoc/index.d.ts +1 -0
- package/react/hoc/index.d.ts.map +1 -1
- package/react/hoc/index.js +1 -0
- package/react/hoc/index.js.map +1 -1
- package/react/hoc/withApollo.d.ts.map +1 -1
- package/react/hoc/withApollo.js +2 -2
- package/react/hoc/withApollo.js.map +1 -1
- package/react/hooks/hooks.cjs.js +3 -3
- package/react/hooks/hooks.cjs.js.map +1 -1
- package/react/hooks/index.d.ts +1 -0
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js +1 -0
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts.map +1 -1
- package/react/hooks/useApolloClient.js +2 -2
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +1 -0
- package/react/hooks/useSubscription.d.ts.map +1 -1
- package/react/hooks/useSubscription.js +1 -0
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/utils/useAfterFastRefresh.d.ts +1 -0
- package/react/hooks/utils/useAfterFastRefresh.d.ts.map +1 -1
- package/react/hooks/utils/useAfterFastRefresh.js +1 -0
- package/react/hooks/utils/useAfterFastRefresh.js.map +1 -1
- package/react/hooks/utils/useBaseQuery.d.ts +1 -0
- package/react/hooks/utils/useBaseQuery.d.ts.map +1 -1
- package/react/hooks/utils/useBaseQuery.js +1 -0
- package/react/hooks/utils/useBaseQuery.js.map +1 -1
- package/react/index.d.ts +1 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +1 -3
- package/react/index.js.map +1 -1
- package/react/parser/index.d.ts.map +1 -1
- package/react/parser/index.js +5 -5
- package/react/parser/index.js.map +1 -1
- package/react/parser/parser.cjs.js +10 -10
- package/react/parser/parser.cjs.js.map +1 -1
- package/react/react.cjs.js +2 -3
- package/react/react.cjs.js.map +1 -1
- package/testing/index.d.ts +1 -0
- package/testing/index.d.ts.map +1 -1
- package/testing/index.js +1 -3
- package/testing/index.js.map +1 -1
- package/testing/testing.cjs.js +3 -5
- package/testing/testing.cjs.js.map +1 -1
- package/utilities/common/mergeDeep.js +1 -1
- package/utilities/common/mergeDeep.js.map +1 -1
- package/utilities/globals/DEV.js +2 -2
- package/utilities/globals/DEV.js.map +1 -1
- package/utilities/{common → globals}/global.d.ts +0 -0
- package/utilities/globals/global.d.ts.map +1 -0
- package/utilities/{common → globals}/global.js +0 -0
- package/utilities/globals/global.js.map +1 -0
- package/utilities/globals/globals.cjs.js +57 -0
- package/utilities/globals/globals.cjs.js.map +1 -0
- package/utilities/globals/index.d.ts +5 -2
- package/utilities/globals/index.d.ts.map +1 -1
- package/utilities/globals/index.js +8 -1
- package/utilities/globals/index.js.map +1 -1
- package/utilities/{common → globals}/maybe.d.ts +0 -0
- package/utilities/globals/maybe.d.ts.map +1 -0
- package/utilities/{common → globals}/maybe.js +0 -0
- package/utilities/globals/maybe.js.map +1 -0
- package/utilities/globals/package.json +7 -0
- package/utilities/graphql/directives.d.ts.map +1 -1
- package/utilities/graphql/directives.js +5 -5
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.d.ts.map +1 -1
- package/utilities/graphql/fragments.js +5 -5
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.d.ts.map +1 -1
- package/utilities/graphql/getFromAST.js +9 -9
- package/utilities/graphql/getFromAST.js.map +1 -1
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +2 -2
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.d.ts.map +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +1 -3
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js +1 -5
- package/utilities/index.js.map +1 -1
- package/utilities/observables/Concast.js +1 -1
- package/utilities/observables/Concast.js.map +1 -1
- package/utilities/package.json +1 -3
- package/utilities/policies/pagination.js +2 -2
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/testing/mocking/mockFetch.js +1 -1
- package/utilities/testing/mocking/mockFetch.js.map +1 -1
- package/utilities/testing/mocking/mockLink.d.ts.map +1 -1
- package/utilities/testing/mocking/mockLink.js +2 -2
- package/utilities/testing/mocking/mockLink.js.map +1 -1
- package/utilities/testing/mocking/mockWatchQuery.js +1 -1
- package/utilities/testing/mocking/mockWatchQuery.js.map +1 -1
- package/utilities/testing/observableToPromise.js +1 -1
- package/utilities/testing/observableToPromise.js.map +1 -1
- package/utilities/utilities.cjs.js +30 -71
- package/utilities/utilities.cjs.js.map +1 -1
- package/version.js +1 -1
- package/utilities/common/global.d.ts.map +0 -1
- package/utilities/common/global.js.map +0 -1
- package/utilities/common/maybe.d.ts.map +0 -1
- package/utilities/common/maybe.js.map +0 -1
package/cache/cache.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var utilities = require('../utilities');
|
|
5
|
+
var globals = require('../utilities/globals');
|
|
7
6
|
var tslib = require('tslib');
|
|
8
7
|
var optimism = require('optimism');
|
|
8
|
+
var utilities = require('../utilities');
|
|
9
9
|
var equality = require('@wry/equality');
|
|
10
10
|
var trie = require('@wry/trie');
|
|
11
11
|
var context = require('@wry/context');
|
|
@@ -203,7 +203,7 @@ exports.EntityStore = (function () {
|
|
|
203
203
|
: newer;
|
|
204
204
|
if (!incoming)
|
|
205
205
|
return;
|
|
206
|
-
__DEV__ ?
|
|
206
|
+
__DEV__ ? globals.invariant(typeof dataId === "string", "store.merge expects a string ID") : globals.invariant(typeof dataId === "string", 1);
|
|
207
207
|
var merged = new utilities.DeepMerger(storeObjectReconciler).merge(existing, incoming);
|
|
208
208
|
this.data[dataId] = merged;
|
|
209
209
|
if (merged !== existing) {
|
|
@@ -794,7 +794,7 @@ var StoreReader = (function () {
|
|
|
794
794
|
!context.store.has(objectOrReference.__ref)) {
|
|
795
795
|
return {
|
|
796
796
|
result: this.canon.empty,
|
|
797
|
-
missing: [missingFromInvariant(__DEV__ ? new
|
|
797
|
+
missing: [missingFromInvariant(__DEV__ ? new globals.InvariantError("Dangling reference to missing " + objectOrReference.__ref + " object") : new globals.InvariantError(5), context)],
|
|
798
798
|
};
|
|
799
799
|
}
|
|
800
800
|
var variables = context.variables, policies = context.policies, store = context.store;
|
|
@@ -831,9 +831,9 @@ var StoreReader = (function () {
|
|
|
831
831
|
context.path.push(resultName);
|
|
832
832
|
if (fieldValue === void 0) {
|
|
833
833
|
if (!utilities.addTypenameToDocument.added(selection)) {
|
|
834
|
-
getMissing().push(missingFromInvariant(__DEV__ ? new
|
|
834
|
+
getMissing().push(missingFromInvariant(__DEV__ ? new globals.InvariantError("Can't find field '" + selection.name.value + "' on " + (utilities.isReference(objectOrReference)
|
|
835
835
|
? objectOrReference.__ref + " object"
|
|
836
|
-
: "object " + JSON.stringify(objectOrReference, null, 2))) : new
|
|
836
|
+
: "object " + JSON.stringify(objectOrReference, null, 2))) : new globals.InvariantError(6), context));
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
else if (Array.isArray(fieldValue)) {
|
|
@@ -860,7 +860,7 @@ var StoreReader = (function () {
|
|
|
860
860
|
if (fieldValue !== void 0) {
|
|
861
861
|
objectsToMerge.push((_a = {}, _a[resultName] = fieldValue, _a));
|
|
862
862
|
}
|
|
863
|
-
|
|
863
|
+
globals.invariant(context.path.pop() === resultName);
|
|
864
864
|
}
|
|
865
865
|
else {
|
|
866
866
|
var fragment = utilities.getFragmentFromSelection(selection, context.fragmentMap);
|
|
@@ -885,7 +885,7 @@ var StoreReader = (function () {
|
|
|
885
885
|
missing = missing || [];
|
|
886
886
|
missing.push.apply(missing, childResult.missing);
|
|
887
887
|
}
|
|
888
|
-
|
|
888
|
+
globals.invariant(context.path.pop() === i);
|
|
889
889
|
return childResult.result;
|
|
890
890
|
}
|
|
891
891
|
if (field.selectionSet) {
|
|
@@ -915,7 +915,7 @@ var StoreReader = (function () {
|
|
|
915
915
|
if (__DEV__) {
|
|
916
916
|
assertSelectionSetForIdValue(context.store, field, item);
|
|
917
917
|
}
|
|
918
|
-
|
|
918
|
+
globals.invariant(context.path.pop() === i);
|
|
919
919
|
return item;
|
|
920
920
|
});
|
|
921
921
|
return {
|
|
@@ -930,7 +930,7 @@ function assertSelectionSetForIdValue(store, field, fieldValue) {
|
|
|
930
930
|
var workSet_1 = new Set([fieldValue]);
|
|
931
931
|
workSet_1.forEach(function (value) {
|
|
932
932
|
if (utilities.isNonNullObject(value)) {
|
|
933
|
-
__DEV__ ?
|
|
933
|
+
__DEV__ ? globals.invariant(!utilities.isReference(value), "Missing selection set for object of type " + getTypenameFromStoreObject(store, value) + " returned for query field " + field.name.value) : globals.invariant(!utilities.isReference(value), 7);
|
|
934
934
|
Object.values(value).forEach(workSet_1.add, workSet_1);
|
|
935
935
|
}
|
|
936
936
|
});
|
|
@@ -969,7 +969,7 @@ var StoreWriter = (function () {
|
|
|
969
969
|
context: context,
|
|
970
970
|
});
|
|
971
971
|
if (!utilities.isReference(ref)) {
|
|
972
|
-
throw __DEV__ ? new
|
|
972
|
+
throw __DEV__ ? new globals.InvariantError("Could not identify object " + JSON.stringify(result)) : new globals.InvariantError(8);
|
|
973
973
|
}
|
|
974
974
|
context.incomingById.forEach(function (_a, dataId) {
|
|
975
975
|
var fields = _a.fields, mergeTree = _a.mergeTree, selections = _a.selections;
|
|
@@ -1078,7 +1078,7 @@ var StoreWriter = (function () {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
else if (!context.clientOnly &&
|
|
1080
1080
|
!utilities.addTypenameToDocument.added(selection)) {
|
|
1081
|
-
__DEV__ &&
|
|
1081
|
+
__DEV__ && globals.invariant.error(("Missing field '" + utilities.resultKeyNameFromField(selection) + "' while writing result " + JSON.stringify(result, null, 2)).substring(0, 1000));
|
|
1082
1082
|
}
|
|
1083
1083
|
context.clientOnly = wasClientOnly;
|
|
1084
1084
|
}
|
|
@@ -1158,7 +1158,7 @@ var StoreWriter = (function () {
|
|
|
1158
1158
|
changedFields_1.set(storeFieldName, aVal);
|
|
1159
1159
|
}
|
|
1160
1160
|
if (getStorageArgs) {
|
|
1161
|
-
|
|
1161
|
+
globals.invariant(getStorageArgs.pop() === storeFieldName);
|
|
1162
1162
|
}
|
|
1163
1163
|
});
|
|
1164
1164
|
if (changedFields_1) {
|
|
@@ -1253,7 +1253,7 @@ function warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
|
-
__DEV__ &&
|
|
1256
|
+
__DEV__ && globals.invariant.warn("Cache data may be lost when replacing the " + fieldName + " field of a " + parentType + " object.\n\nTo address this problem (which is not a bug in Apollo Client), " + (childTypenames.length
|
|
1257
1257
|
? "either ensure all objects of type " +
|
|
1258
1258
|
childTypenames.join(" and ") + " have an ID or a custom merge function, or "
|
|
1259
1259
|
: "") + "define a custom merge function for the " + typeDotName + " field, so InMemoryCache can safely merge these objects:\n\n existing: " + JSON.stringify(existing).slice(0, 1000) + "\n incoming: " + JSON.stringify(incoming).slice(0, 1000) + "\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n");
|
|
@@ -1466,7 +1466,7 @@ var Policies = (function () {
|
|
|
1466
1466
|
var rootId = "ROOT_" + which.toUpperCase();
|
|
1467
1467
|
var old = this.rootTypenamesById[rootId];
|
|
1468
1468
|
if (typename !== old) {
|
|
1469
|
-
__DEV__ ?
|
|
1469
|
+
__DEV__ ? globals.invariant(!old || old === which, "Cannot change root " + which + " __typename more than once") : globals.invariant(!old || old === which, 2);
|
|
1470
1470
|
if (old)
|
|
1471
1471
|
delete this.rootIdsByTypename[old];
|
|
1472
1472
|
this.rootIdsByTypename[typename] = rootId;
|
|
@@ -1550,7 +1550,7 @@ var Policies = (function () {
|
|
|
1550
1550
|
if (supertypeSet.has(supertype)) {
|
|
1551
1551
|
if (!typenameSupertypeSet.has(supertype)) {
|
|
1552
1552
|
if (checkingFuzzySubtypes) {
|
|
1553
|
-
__DEV__ &&
|
|
1553
|
+
__DEV__ && globals.invariant.warn("Inferring subtype " + typename + " of supertype " + supertype);
|
|
1554
1554
|
}
|
|
1555
1555
|
typenameSupertypeSet.add(supertype);
|
|
1556
1556
|
}
|
|
@@ -1693,11 +1693,11 @@ function makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, contex
|
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
1695
|
else {
|
|
1696
|
-
__DEV__ &&
|
|
1696
|
+
__DEV__ && globals.invariant.warn("Unexpected readField arguments: " + utilities.stringifyForDisplay(Array.from(arguments)));
|
|
1697
1697
|
return;
|
|
1698
1698
|
}
|
|
1699
1699
|
if (__DEV__ && options.from === void 0) {
|
|
1700
|
-
__DEV__ &&
|
|
1700
|
+
__DEV__ && globals.invariant.warn("Undefined 'from' passed to readField with arguments " + utilities.stringifyForDisplay(Array.from(arguments)));
|
|
1701
1701
|
}
|
|
1702
1702
|
if (void 0 === options.variables) {
|
|
1703
1703
|
options.variables = variables;
|
|
@@ -1710,7 +1710,7 @@ function makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, contex
|
|
|
1710
1710
|
function makeMergeObjectsFunction(store) {
|
|
1711
1711
|
return function mergeObjects(existing, incoming) {
|
|
1712
1712
|
if (Array.isArray(existing) || Array.isArray(incoming)) {
|
|
1713
|
-
throw __DEV__ ? new
|
|
1713
|
+
throw __DEV__ ? new globals.InvariantError("Cannot automatically merge arrays") : new globals.InvariantError(3);
|
|
1714
1714
|
}
|
|
1715
1715
|
if (utilities.isNonNullObject(existing) &&
|
|
1716
1716
|
utilities.isNonNullObject(incoming)) {
|
|
@@ -1791,24 +1791,27 @@ function makeAliasMap(selectionSet, fragmentMap) {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
function computeKeyObject(response, specifier, strict, aliasMap) {
|
|
1793
1793
|
var keyObj = Object.create(null);
|
|
1794
|
-
var
|
|
1794
|
+
var lastResponseKey;
|
|
1795
|
+
var lastActualKey;
|
|
1795
1796
|
specifier.forEach(function (s) {
|
|
1796
1797
|
if (Array.isArray(s)) {
|
|
1797
|
-
if (typeof
|
|
1798
|
+
if (typeof lastActualKey === "string" &&
|
|
1799
|
+
typeof lastResponseKey === "string") {
|
|
1798
1800
|
var subsets = aliasMap && aliasMap.subsets;
|
|
1799
|
-
var subset = subsets && subsets[
|
|
1800
|
-
keyObj[
|
|
1801
|
+
var subset = subsets && subsets[lastActualKey];
|
|
1802
|
+
keyObj[lastActualKey] =
|
|
1803
|
+
computeKeyObject(response[lastResponseKey], s, strict, subset);
|
|
1801
1804
|
}
|
|
1802
1805
|
}
|
|
1803
1806
|
else {
|
|
1804
1807
|
var aliases = aliasMap && aliasMap.aliases;
|
|
1805
1808
|
var responseName = aliases && aliases[s] || s;
|
|
1806
1809
|
if (hasOwn.call(response, responseName)) {
|
|
1807
|
-
keyObj[
|
|
1810
|
+
keyObj[lastActualKey = s] = response[lastResponseKey = responseName];
|
|
1808
1811
|
}
|
|
1809
1812
|
else {
|
|
1810
|
-
__DEV__ ?
|
|
1811
|
-
|
|
1813
|
+
__DEV__ ? globals.invariant(!strict, "Missing field '" + responseName + "' while computing key fields") : globals.invariant(!strict, 4);
|
|
1814
|
+
lastResponseKey = lastActualKey = void 0;
|
|
1812
1815
|
}
|
|
1813
1816
|
}
|
|
1814
1817
|
});
|
|
@@ -2100,8 +2103,6 @@ var InMemoryCache = (function (_super) {
|
|
|
2100
2103
|
return InMemoryCache;
|
|
2101
2104
|
}(ApolloCache));
|
|
2102
2105
|
|
|
2103
|
-
__DEV__ ? tsInvariant.invariant("boolean" === typeof utilities.DEV, utilities.DEV) : tsInvariant.invariant("boolean" === typeof utilities.DEV, 1);
|
|
2104
|
-
|
|
2105
2106
|
exports.isReference = utilities.isReference;
|
|
2106
2107
|
exports.makeReference = utilities.makeReference;
|
|
2107
2108
|
exports.ApolloCache = ApolloCache;
|