@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.
Files changed (64) hide show
  1. package/.changeset/breezy-deers-dream.md +5 -0
  2. package/.changeset/curly-vans-draw.md +5 -0
  3. package/.changeset/early-tips-vanish.md +5 -0
  4. package/.changeset/good-suns-happen.md +5 -0
  5. package/.changeset/hungry-rings-help.md +5 -0
  6. package/.changeset/pink-flowers-switch.md +5 -0
  7. package/.changeset/pre.json +7 -0
  8. package/.changeset/proud-humans-begin.md +5 -0
  9. package/CHANGELOG.md +22 -0
  10. package/README.md +5 -5
  11. package/apollo-client.cjs +1393 -1405
  12. package/apollo-client.cjs.map +1 -1
  13. package/apollo-client.min.cjs +1 -1
  14. package/cache/cache.cjs +2 -7
  15. package/cache/cache.cjs.map +1 -1
  16. package/cache/cache.cjs.native.js +2 -7
  17. package/cache/core/cache.d.ts +0 -11
  18. package/cache/core/cache.js +2 -7
  19. package/cache/core/cache.js.map +1 -1
  20. package/config/jest/areApolloErrorsEqual.d.ts +3 -0
  21. package/config/jest/areApolloErrorsEqual.js +23 -0
  22. package/config/jest/areApolloErrorsEqual.js.map +1 -0
  23. package/config/jest/areGraphQlErrorsEqual.d.ts +3 -0
  24. package/config/jest/areGraphQlErrorsEqual.js +7 -0
  25. package/config/jest/areGraphQlErrorsEqual.js.map +1 -0
  26. package/config/jest/setup.js +4 -0
  27. package/config/jest/setup.js.map +1 -1
  28. package/core/ApolloClient.js +1 -1
  29. package/core/ApolloClient.js.map +1 -1
  30. package/core/QueryManager.d.ts +15 -14
  31. package/core/QueryManager.js +12 -13
  32. package/core/QueryManager.js.map +1 -1
  33. package/core/core.cjs +806 -806
  34. package/core/core.cjs.map +1 -1
  35. package/core/core.cjs.native.js +806 -806
  36. package/core/watchQueryOptions.d.ts +1 -1
  37. package/core/watchQueryOptions.js.map +1 -1
  38. package/dev/dev.cjs +1 -1
  39. package/dev/dev.cjs.map +1 -1
  40. package/dev/dev.cjs.native.js +1 -1
  41. package/package.json +8 -5
  42. package/react/hooks/hooks.cjs +26 -33
  43. package/react/hooks/hooks.cjs.map +1 -1
  44. package/react/hooks/hooks.cjs.native.js +26 -33
  45. package/react/hooks/useQuery.d.ts +2 -5
  46. package/react/hooks/useQuery.js +42 -53
  47. package/react/hooks/useQuery.js.map +1 -1
  48. package/react/internal/internal.cjs +1 -1
  49. package/react/internal/internal.cjs.map +1 -1
  50. package/react/internal/internal.cjs.native.js +1 -1
  51. package/react/types/types.d.ts +6 -1
  52. package/react/types/types.js.map +1 -1
  53. package/testing/core/mocking/mockQueryManager.d.ts +15 -0
  54. package/testing/core/mocking/mockQueryManager.js +5 -2
  55. package/testing/core/mocking/mockQueryManager.js.map +1 -1
  56. package/testing/experimental/createSchemaFetch.js +5 -12
  57. package/testing/experimental/createSchemaFetch.js.map +1 -1
  58. package/testing/experimental/experimental.cjs +3 -5
  59. package/testing/experimental/experimental.cjs.map +1 -1
  60. package/testing/experimental/experimental.cjs.native.js +3 -5
  61. package/utilities/globals/globals.cjs +1 -1
  62. package/utilities/globals/globals.cjs.map +1 -1
  63. package/utilities/globals/globals.cjs.native.js +1 -1
  64. 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) {