@apollo/client 3.9.0-alpha.1 → 3.9.0-alpha.3
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 +221 -180
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +52 -40
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +52 -40
- package/cache/core/types/common.d.ts +2 -2
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +1 -2
- package/cache/index.d.ts.map +1 -1
- package/cache/index.js +1 -2
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +35 -0
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +1 -2
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/object-canon.d.ts +0 -5
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +0 -22
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +4 -6
- 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 +5 -6
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +2 -0
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +12 -4
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.js +2 -2
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +10 -11
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +0 -2
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +0 -2
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +4 -2
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +15 -14
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +39 -33
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +39 -33
- package/dev/dev.cjs +125 -101
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +125 -101
- package/dev/loadErrorMessageHandler.js +2 -2
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/invariantErrorCodes.js +96 -81
- package/link/core/ApolloLink.js +2 -2
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/http/checkFetcher.js +1 -1
- package/link/http/createHttpLink.js +1 -1
- package/link/http/http.cjs +3 -3
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +3 -3
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/utils/toPromise.js +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.js +1 -1
- package/package.json +27 -26
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +7 -2
- package/react/cache/QueryReference.js.map +1 -1
- package/react/context/ApolloConsumer.js +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloProvider.js +1 -1
- package/react/context/context.cjs +3 -3
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +3 -3
- package/react/hoc/hoc-utils.js +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- package/react/hoc/withApollo.js +1 -1
- package/react/hooks/hooks.cjs +15 -10
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +15 -10
- package/react/hooks/index.d.ts +1 -0
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useQuery.js +1 -1
- package/react/hooks/useReadQuery.d.ts +7 -4
- package/react/hooks/useReadQuery.d.ts.map +1 -1
- package/react/hooks/useReadQuery.js +1 -1
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.js +2 -2
- package/react/hooks/useSuspenseQuery.js +2 -2
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/parser/index.js +5 -5
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/testing/core/core.cjs +2 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +2 -2
- package/testing/core/mocking/mockLink.js +2 -2
- package/testing/internal/ObservableStream.d.ts +26 -0
- package/testing/internal/ObservableStream.d.ts.map +1 -0
- package/testing/internal/ObservableStream.js +101 -0
- package/testing/internal/ObservableStream.js.map +1 -0
- package/testing/internal/index.d.ts +1 -0
- package/testing/internal/index.d.ts.map +1 -1
- package/testing/internal/index.js +1 -0
- package/testing/internal/index.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +1 -0
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +2 -1
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +2 -1
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +2 -1
- package/utilities/common/canonicalStringify.d.ts +4 -0
- package/utilities/common/canonicalStringify.d.ts.map +1 -0
- package/utilities/common/canonicalStringify.js +37 -0
- package/utilities/common/canonicalStringify.js.map +1 -0
- package/utilities/globals/globals.cjs +29 -19
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +29 -19
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +28 -18
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/directives.js +4 -4
- package/utilities/graphql/fragments.js +3 -3
- package/utilities/graphql/getFromAST.js +8 -8
- package/utilities/graphql/storeUtils.d.ts +7 -2
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +8 -20
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/index.d.ts +2 -1
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js +1 -0
- package/utilities/index.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js +17 -34
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/subscriptions/relay/index.d.ts +6 -0
- package/utilities/subscriptions/relay/index.d.ts.map +1 -0
- package/utilities/subscriptions/relay/index.js +43 -0
- package/utilities/subscriptions/relay/index.js.map +1 -0
- package/utilities/subscriptions/relay/package.json +8 -0
- package/utilities/subscriptions/relay/relay.cjs +368 -0
- package/utilities/subscriptions/relay/relay.cjs.map +1 -0
- package/utilities/subscriptions/relay/relay.cjs.native.js +368 -0
- package/utilities/subscriptions/shared.d.ts +9 -0
- package/utilities/subscriptions/shared.d.ts.map +1 -0
- package/utilities/subscriptions/shared.js +7 -0
- package/utilities/subscriptions/shared.js.map +1 -0
- package/utilities/subscriptions/urql/index.d.ts +7 -0
- package/utilities/subscriptions/urql/index.d.ts.map +1 -0
- package/utilities/subscriptions/urql/index.js +40 -0
- package/utilities/subscriptions/urql/index.js.map +1 -0
- package/utilities/subscriptions/urql/package.json +8 -0
- package/utilities/subscriptions/urql/urql.cjs +364 -0
- package/utilities/subscriptions/urql/urql.cjs.map +1 -0
- package/utilities/subscriptions/urql/urql.cjs.native.js +364 -0
- package/utilities/utilities.cjs +80 -72
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +80 -72
- package/version.js +1 -1
package/cache/cache.cjs
CHANGED
|
@@ -370,6 +370,41 @@ exports.EntityStore = (function () {
|
|
|
370
370
|
changedFields_1[storeFieldName] = newValue;
|
|
371
371
|
needToMerge_1 = true;
|
|
372
372
|
fieldValue = newValue;
|
|
373
|
+
if (globalThis.__DEV__ !== false) {
|
|
374
|
+
var checkReference = function (ref) {
|
|
375
|
+
if (_this.lookup(ref.__ref) === undefined) {
|
|
376
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(2, ref);
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
if (utilities.isReference(newValue)) {
|
|
381
|
+
checkReference(newValue);
|
|
382
|
+
}
|
|
383
|
+
else if (Array.isArray(newValue)) {
|
|
384
|
+
var seenReference = false;
|
|
385
|
+
var someNonReference = void 0;
|
|
386
|
+
for (var _i = 0, newValue_1 = newValue; _i < newValue_1.length; _i++) {
|
|
387
|
+
var value = newValue_1[_i];
|
|
388
|
+
if (utilities.isReference(value)) {
|
|
389
|
+
seenReference = true;
|
|
390
|
+
if (checkReference(value))
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
if (typeof value === "object" && !!value) {
|
|
395
|
+
var id = _this.policies.identify(value)[0];
|
|
396
|
+
if (id) {
|
|
397
|
+
someNonReference = value;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if (seenReference && someNonReference !== undefined) {
|
|
402
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(3, someNonReference);
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
373
408
|
}
|
|
374
409
|
}
|
|
375
410
|
}
|
|
@@ -766,28 +801,6 @@ var ObjectCanon = (function () {
|
|
|
766
801
|
};
|
|
767
802
|
return ObjectCanon;
|
|
768
803
|
}());
|
|
769
|
-
var canonicalStringify = Object.assign(function (value) {
|
|
770
|
-
if (utilities.isNonNullObject(value)) {
|
|
771
|
-
if (stringifyCanon === void 0) {
|
|
772
|
-
resetCanonicalStringify();
|
|
773
|
-
}
|
|
774
|
-
var canonical = stringifyCanon.admit(value);
|
|
775
|
-
var json = stringifyCache.get(canonical);
|
|
776
|
-
if (json === void 0) {
|
|
777
|
-
stringifyCache.set(canonical, (json = JSON.stringify(canonical)));
|
|
778
|
-
}
|
|
779
|
-
return json;
|
|
780
|
-
}
|
|
781
|
-
return JSON.stringify(value);
|
|
782
|
-
}, {
|
|
783
|
-
reset: resetCanonicalStringify,
|
|
784
|
-
});
|
|
785
|
-
var stringifyCanon;
|
|
786
|
-
var stringifyCache;
|
|
787
|
-
function resetCanonicalStringify() {
|
|
788
|
-
stringifyCanon = new ObjectCanon();
|
|
789
|
-
stringifyCache = new (utilities.canUseWeakMap ? WeakMap : Map)();
|
|
790
|
-
}
|
|
791
804
|
|
|
792
805
|
function execSelectionSetKeyArgs(options) {
|
|
793
806
|
return [
|
|
@@ -854,7 +867,7 @@ var StoreReader = (function () {
|
|
|
854
867
|
selectionSet: utilities.getMainDefinition(query).selectionSet,
|
|
855
868
|
objectOrReference: rootRef,
|
|
856
869
|
enclosingRef: rootRef,
|
|
857
|
-
context: tslib.__assign({ store: store, query: query, policies: policies, variables: variables, varString: canonicalStringify(variables), canonizeResults: canonizeResults }, extractFragmentContext(query, this.config.fragments)),
|
|
870
|
+
context: tslib.__assign({ store: store, query: query, policies: policies, variables: variables, varString: utilities.canonicalStringify(variables), canonizeResults: canonizeResults }, extractFragmentContext(query, this.config.fragments)),
|
|
858
871
|
});
|
|
859
872
|
var missing;
|
|
860
873
|
if (execResult.missing) {
|
|
@@ -961,7 +974,7 @@ var StoreReader = (function () {
|
|
|
961
974
|
else {
|
|
962
975
|
var fragment = utilities.getFragmentFromSelection(selection, context.lookupFragment);
|
|
963
976
|
if (!fragment && selection.kind === graphql.Kind.FRAGMENT_SPREAD) {
|
|
964
|
-
throw globals.newInvariantError(
|
|
977
|
+
throw globals.newInvariantError(9, selection.name.value);
|
|
965
978
|
}
|
|
966
979
|
if (fragment && policies.fragmentMatches(fragment, typename)) {
|
|
967
980
|
fragment.selectionSet.selections.forEach(workSet.add, workSet);
|
|
@@ -1045,7 +1058,7 @@ function assertSelectionSetForIdValue(store, field, fieldValue) {
|
|
|
1045
1058
|
if (utilities.isNonNullObject(value)) {
|
|
1046
1059
|
globals.invariant(
|
|
1047
1060
|
!utilities.isReference(value),
|
|
1048
|
-
|
|
1061
|
+
10,
|
|
1049
1062
|
getTypenameFromStoreObject(store, value),
|
|
1050
1063
|
field.name.value
|
|
1051
1064
|
);
|
|
@@ -1137,7 +1150,7 @@ function keyFieldsFnFromSpecifier(specifier) {
|
|
|
1137
1150
|
hasOwn.call(object, schemaKeyPath[0])) {
|
|
1138
1151
|
extracted = extractKeyPath(object, schemaKeyPath, extractKey);
|
|
1139
1152
|
}
|
|
1140
|
-
globals.invariant(extracted !== void 0,
|
|
1153
|
+
globals.invariant(extracted !== void 0, 4, schemaKeyPath.join("."), object);
|
|
1141
1154
|
return extracted;
|
|
1142
1155
|
}));
|
|
1143
1156
|
return "".concat(context.typename, ":").concat(JSON.stringify(keyObject));
|
|
@@ -1239,7 +1252,6 @@ function normalize(value) {
|
|
|
1239
1252
|
return value;
|
|
1240
1253
|
}
|
|
1241
1254
|
|
|
1242
|
-
utilities.getStoreKeyName.setStringify(canonicalStringify);
|
|
1243
1255
|
function argsFromFieldSpecifier(spec) {
|
|
1244
1256
|
return spec.args !== void 0
|
|
1245
1257
|
? spec.args
|
|
@@ -1392,7 +1404,7 @@ var Policies = (function () {
|
|
|
1392
1404
|
var rootId = "ROOT_" + which.toUpperCase();
|
|
1393
1405
|
var old = this.rootTypenamesById[rootId];
|
|
1394
1406
|
if (typename !== old) {
|
|
1395
|
-
globals.invariant(!old || old === which,
|
|
1407
|
+
globals.invariant(!old || old === which, 5, which);
|
|
1396
1408
|
if (old)
|
|
1397
1409
|
delete this.rootIdsByTypename[old];
|
|
1398
1410
|
this.rootIdsByTypename[typename] = rootId;
|
|
@@ -1489,7 +1501,7 @@ var Policies = (function () {
|
|
|
1489
1501
|
if (supertypeSet.has(supertype)) {
|
|
1490
1502
|
if (!typenameSupertypeSet.has(supertype)) {
|
|
1491
1503
|
if (checkingFuzzySubtypes) {
|
|
1492
|
-
globalThis.__DEV__ !== false && globals.invariant.warn(
|
|
1504
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(6, typename, supertype);
|
|
1493
1505
|
}
|
|
1494
1506
|
typenameSupertypeSet.add(supertype);
|
|
1495
1507
|
}
|
|
@@ -1651,7 +1663,7 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
|
|
|
1651
1663
|
}
|
|
1652
1664
|
}
|
|
1653
1665
|
if (globalThis.__DEV__ !== false && options.from === void 0) {
|
|
1654
|
-
globalThis.__DEV__ !== false && globals.invariant.warn(
|
|
1666
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(7, utilities.stringifyForDisplay(Array.from(readFieldArgs)));
|
|
1655
1667
|
}
|
|
1656
1668
|
if (void 0 === options.variables) {
|
|
1657
1669
|
options.variables = variables;
|
|
@@ -1661,7 +1673,7 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
|
|
|
1661
1673
|
function makeMergeObjectsFunction(store) {
|
|
1662
1674
|
return function mergeObjects(existing, incoming) {
|
|
1663
1675
|
if (utilities.isArray(existing) || utilities.isArray(incoming)) {
|
|
1664
|
-
throw globals.newInvariantError(
|
|
1676
|
+
throw globals.newInvariantError(8);
|
|
1665
1677
|
}
|
|
1666
1678
|
if (utilities.isNonNullObject(existing) && utilities.isNonNullObject(incoming)) {
|
|
1667
1679
|
var eType = store.getFieldValue(existing, "__typename");
|
|
@@ -1712,7 +1724,7 @@ var StoreWriter = (function () {
|
|
|
1712
1724
|
variables = tslib.__assign(tslib.__assign({}, utilities.getDefaultValues(operationDefinition)), variables);
|
|
1713
1725
|
var context = tslib.__assign(tslib.__assign({ store: store, written: Object.create(null), merge: function (existing, incoming) {
|
|
1714
1726
|
return merger.merge(existing, incoming);
|
|
1715
|
-
}, variables: variables, varString: canonicalStringify(variables) }, extractFragmentContext(query, this.fragments)), { overwrite: !!overwrite, incomingById: new Map(), clientOnly: false, deferred: false, flavors: new Map() });
|
|
1727
|
+
}, variables: variables, varString: utilities.canonicalStringify(variables) }, extractFragmentContext(query, this.fragments)), { overwrite: !!overwrite, incomingById: new Map(), clientOnly: false, deferred: false, flavors: new Map() });
|
|
1716
1728
|
var ref = this.processSelectionSet({
|
|
1717
1729
|
result: result || Object.create(null),
|
|
1718
1730
|
dataId: dataId,
|
|
@@ -1721,7 +1733,7 @@ var StoreWriter = (function () {
|
|
|
1721
1733
|
context: context,
|
|
1722
1734
|
});
|
|
1723
1735
|
if (!utilities.isReference(ref)) {
|
|
1724
|
-
throw globals.newInvariantError(
|
|
1736
|
+
throw globals.newInvariantError(11, result);
|
|
1725
1737
|
}
|
|
1726
1738
|
context.incomingById.forEach(function (_a, dataId) {
|
|
1727
1739
|
var storeObject = _a.storeObject, mergeTree = _a.mergeTree, fieldNodeSet = _a.fieldNodeSet;
|
|
@@ -1826,7 +1838,7 @@ var StoreWriter = (function () {
|
|
|
1826
1838
|
!context.deferred &&
|
|
1827
1839
|
!utilities.addTypenameToDocument.added(field) &&
|
|
1828
1840
|
!policies.getReadFunction(typename, field.name.value)) {
|
|
1829
|
-
globalThis.__DEV__ !== false && globals.invariant.error(
|
|
1841
|
+
globalThis.__DEV__ !== false && globals.invariant.error(12, utilities.resultKeyNameFromField(field), result);
|
|
1830
1842
|
}
|
|
1831
1843
|
});
|
|
1832
1844
|
try {
|
|
@@ -1931,7 +1943,7 @@ var StoreWriter = (function () {
|
|
|
1931
1943
|
else {
|
|
1932
1944
|
var fragment = utilities.getFragmentFromSelection(selection, context.lookupFragment);
|
|
1933
1945
|
if (!fragment && selection.kind === graphql.Kind.FRAGMENT_SPREAD) {
|
|
1934
|
-
throw globals.newInvariantError(
|
|
1946
|
+
throw globals.newInvariantError(13, selection.name.value);
|
|
1935
1947
|
}
|
|
1936
1948
|
if (fragment &&
|
|
1937
1949
|
policies.fragmentMatches(fragment, typename, result, context.variables)) {
|
|
@@ -2073,7 +2085,7 @@ function warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {
|
|
|
2073
2085
|
}
|
|
2074
2086
|
});
|
|
2075
2087
|
}
|
|
2076
|
-
globalThis.__DEV__ !== false && globals.invariant.warn(
|
|
2088
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(14, fieldName, parentType, childTypenames.length
|
|
2077
2089
|
? "either ensure all objects of type " +
|
|
2078
2090
|
childTypenames.join(" and ") +
|
|
2079
2091
|
" have an ID or a custom merge function, or "
|
|
@@ -2131,7 +2143,7 @@ var InMemoryCache = (function (_super) {
|
|
|
2131
2143
|
var store = c.optimistic ? _this.optimisticData : _this.data;
|
|
2132
2144
|
if (supportsResultCaching(store)) {
|
|
2133
2145
|
var optimistic = c.optimistic, id = c.id, variables = c.variables;
|
|
2134
|
-
return store.makeCacheKey(c.query, c.callback, canonicalStringify({ optimistic: optimistic, id: id, variables: variables }));
|
|
2146
|
+
return store.makeCacheKey(c.query, c.callback, utilities.canonicalStringify({ optimistic: optimistic, id: id, variables: variables }));
|
|
2135
2147
|
}
|
|
2136
2148
|
},
|
|
2137
2149
|
});
|
|
@@ -2209,7 +2221,7 @@ var InMemoryCache = (function (_super) {
|
|
|
2209
2221
|
};
|
|
2210
2222
|
};
|
|
2211
2223
|
InMemoryCache.prototype.gc = function (options) {
|
|
2212
|
-
canonicalStringify.reset();
|
|
2224
|
+
utilities.canonicalStringify.reset();
|
|
2213
2225
|
var ids = this.optimisticData.gc();
|
|
2214
2226
|
if (options && !this.txCount) {
|
|
2215
2227
|
if (options.resetResultCache) {
|
|
@@ -2257,7 +2269,7 @@ var InMemoryCache = (function (_super) {
|
|
|
2257
2269
|
InMemoryCache.prototype.reset = function (options) {
|
|
2258
2270
|
var _this = this;
|
|
2259
2271
|
this.init();
|
|
2260
|
-
canonicalStringify.reset();
|
|
2272
|
+
utilities.canonicalStringify.reset();
|
|
2261
2273
|
if (options && options.discardWatches) {
|
|
2262
2274
|
this.watches.forEach(function (watch) { return _this.maybeBroadcastWatch.forget(watch); });
|
|
2263
2275
|
this.watches.clear();
|
|
@@ -2485,6 +2497,7 @@ var FragmentRegistry = (function () {
|
|
|
2485
2497
|
return FragmentRegistry;
|
|
2486
2498
|
}());
|
|
2487
2499
|
|
|
2500
|
+
exports.canonicalStringify = utilities.canonicalStringify;
|
|
2488
2501
|
exports.isReference = utilities.isReference;
|
|
2489
2502
|
exports.makeReference = utilities.makeReference;
|
|
2490
2503
|
exports.ApolloCache = ApolloCache;
|
|
@@ -2492,7 +2505,6 @@ exports.InMemoryCache = InMemoryCache;
|
|
|
2492
2505
|
exports.MissingFieldError = MissingFieldError;
|
|
2493
2506
|
exports.Policies = Policies;
|
|
2494
2507
|
exports.cacheSlot = cacheSlot;
|
|
2495
|
-
exports.canonicalStringify = canonicalStringify;
|
|
2496
2508
|
exports.createFragmentRegistry = createFragmentRegistry;
|
|
2497
2509
|
exports.defaultDataIdFromObject = defaultDataIdFromObject;
|
|
2498
2510
|
exports.fieldNameFromStoreName = fieldNameFromStoreName;
|