@apollo/client 3.11.0-rc.0 → 3.11.0-rc.2
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/.changeset/breezy-deers-dream.md +5 -0
- package/.changeset/curly-vans-draw.md +5 -0
- package/.changeset/early-tips-vanish.md +5 -0
- package/.changeset/good-suns-happen.md +5 -0
- package/.changeset/hungry-rings-help.md +5 -0
- package/.changeset/pink-flowers-switch.md +5 -0
- package/.changeset/pre.json +7 -0
- package/.changeset/proud-humans-begin.md +5 -0
- package/CHANGELOG.md +22 -0
- package/README.md +5 -5
- package/apollo-client.cjs +1393 -1405
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +2 -7
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +2 -7
- package/cache/core/cache.d.ts +0 -11
- package/cache/core/cache.js +2 -7
- package/cache/core/cache.js.map +1 -1
- package/config/jest/areApolloErrorsEqual.d.ts +3 -0
- package/config/jest/areApolloErrorsEqual.js +23 -0
- package/config/jest/areApolloErrorsEqual.js.map +1 -0
- package/config/jest/areGraphQlErrorsEqual.d.ts +3 -0
- package/config/jest/areGraphQlErrorsEqual.js +7 -0
- package/config/jest/areGraphQlErrorsEqual.js.map +1 -0
- package/config/jest/setup.js +4 -0
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.js +1 -1
- package/core/ApolloClient.js.map +1 -1
- package/core/QueryManager.d.ts +15 -14
- package/core/QueryManager.js +12 -13
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +806 -806
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +806 -806
- package/core/watchQueryOptions.d.ts +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/package.json +8 -5
- package/react/hooks/hooks.cjs +26 -33
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +26 -33
- package/react/hooks/useQuery.d.ts +2 -5
- package/react/hooks/useQuery.js +42 -53
- package/react/hooks/useQuery.js.map +1 -1
- package/react/internal/internal.cjs +1 -1
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +1 -1
- package/react/types/types.d.ts +6 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +15 -0
- package/testing/core/mocking/mockQueryManager.js +5 -2
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/experimental/createSchemaFetch.js +5 -12
- package/testing/experimental/createSchemaFetch.js.map +1 -1
- package/testing/experimental/experimental.cjs +3 -5
- package/testing/experimental/experimental.cjs.map +1 -1
- package/testing/experimental/experimental.cjs.native.js +3 -5
- package/utilities/globals/globals.cjs +1 -1
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +1 -1
- package/version.js +1 -1
package/cache/cache.cjs
CHANGED
|
@@ -168,14 +168,9 @@ var ApolloCache = (function () {
|
|
|
168
168
|
};
|
|
169
169
|
ApolloCache.prototype.watchFragment = function (options) {
|
|
170
170
|
var _this = this;
|
|
171
|
-
var fragment = options.fragment, fragmentName = options.fragmentName, from = options.from, _a = options.optimistic, optimistic = _a === void 0 ? true : _a;
|
|
171
|
+
var fragment = options.fragment, fragmentName = options.fragmentName, from = options.from, _a = options.optimistic, optimistic = _a === void 0 ? true : _a, otherOptions = tslib.__rest(options, ["fragment", "fragmentName", "from", "optimistic"]);
|
|
172
172
|
var query = this.getFragmentDoc(fragment, fragmentName);
|
|
173
|
-
var diffOptions = {
|
|
174
|
-
returnPartialData: true,
|
|
175
|
-
id: typeof from === "string" ? from : this.identify(from),
|
|
176
|
-
query: query,
|
|
177
|
-
optimistic: optimistic,
|
|
178
|
-
};
|
|
173
|
+
var diffOptions = tslib.__assign(tslib.__assign({}, otherOptions), { returnPartialData: true, id: typeof from === "string" ? from : this.identify(from), query: query, optimistic: optimistic });
|
|
179
174
|
var latestDiff;
|
|
180
175
|
return new utilities.Observable(function (observer) {
|
|
181
176
|
return _this.watch(tslib.__assign(tslib.__assign({}, diffOptions), { immediate: true, callback: function (diff) {
|