@apollo/client 4.0.0-alpha.8 → 4.0.0-alpha.9

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 (49) hide show
  1. package/.changeset/forty-tomatoes-punch.md +5 -0
  2. package/.changeset/fuzzy-tips-sit.md +5 -0
  3. package/.changeset/khaki-keys-deliver.md +5 -0
  4. package/.changeset/large-plants-know.md +5 -0
  5. package/.changeset/mean-lizards-think.md +5 -0
  6. package/.changeset/pre.json +6 -0
  7. package/.changeset/thin-peas-hear.md +16 -0
  8. package/CHANGELOG.md +29 -0
  9. package/__cjs/core/ObservableQuery.cjs +91 -28
  10. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  11. package/__cjs/core/ObservableQuery.d.cts +2 -1
  12. package/__cjs/core/QueryManager.cjs +2 -2
  13. package/__cjs/core/QueryManager.cjs.map +1 -1
  14. package/__cjs/core/watchQueryOptions.d.cts +2 -2
  15. package/__cjs/react/hooks/useLazyQuery.cjs +17 -20
  16. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  17. package/__cjs/react/hooks/useLazyQuery.d.cts +1 -1
  18. package/__cjs/react/hooks/useMutation.d.cts +1 -1
  19. package/__cjs/react/hooks/useQuery.d.cts +1 -1
  20. package/__cjs/react/query-preloader/createQueryPreloader.cjs +1 -0
  21. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  22. package/__cjs/react/types/types.documentation.d.cts +2 -2
  23. package/__cjs/testing/matchers/arrayWithLength.cjs +15 -0
  24. package/__cjs/testing/matchers/arrayWithLength.cjs.map +1 -0
  25. package/__cjs/testing/matchers/arrayWithLength.d.cts +3 -0
  26. package/__cjs/testing/matchers/index.cjs +2 -0
  27. package/__cjs/testing/matchers/index.cjs.map +1 -1
  28. package/__cjs/version.cjs +1 -1
  29. package/core/ObservableQuery.d.ts +2 -1
  30. package/core/ObservableQuery.js +91 -28
  31. package/core/ObservableQuery.js.map +1 -1
  32. package/core/QueryManager.js +2 -2
  33. package/core/QueryManager.js.map +1 -1
  34. package/core/watchQueryOptions.d.ts +2 -2
  35. package/package.json +1 -1
  36. package/react/hooks/useLazyQuery.d.ts +1 -1
  37. package/react/hooks/useLazyQuery.js +17 -20
  38. package/react/hooks/useLazyQuery.js.map +1 -1
  39. package/react/hooks/useMutation.d.ts +1 -1
  40. package/react/hooks/useQuery.d.ts +1 -1
  41. package/react/query-preloader/createQueryPreloader.js +1 -0
  42. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  43. package/react/types/types.documentation.d.ts +2 -2
  44. package/testing/matchers/arrayWithLength.d.ts +3 -0
  45. package/testing/matchers/arrayWithLength.js +11 -0
  46. package/testing/matchers/arrayWithLength.js.map +1 -0
  47. package/testing/matchers/index.js +2 -0
  48. package/testing/matchers/index.js.map +1 -1
  49. package/version.js +1 -1
@@ -462,7 +462,7 @@ export class QueryManager {
462
462
  variables: this.getVariables(query, options.variables),
463
463
  };
464
464
  if (typeof options.notifyOnNetworkStatusChange === "undefined") {
465
- options.notifyOnNetworkStatusChange = false;
465
+ options.notifyOnNetworkStatusChange = true;
466
466
  }
467
467
  const queryInfo = new QueryInfo(this);
468
468
  const observable = new ObservableQuery({
@@ -840,7 +840,7 @@ export class QueryManager {
840
840
  networkStatus = NetworkStatus.loading, query = options.query, emitLoadingState = false) {
841
841
  const variables = this.getVariables(query, options.variables);
842
842
  const defaults = this.defaultOptions.watchQuery;
843
- let { fetchPolicy = (defaults && defaults.fetchPolicy) || "cache-first", errorPolicy = (defaults && defaults.errorPolicy) || "none", returnPartialData = false, notifyOnNetworkStatusChange = false, context = {}, } = options;
843
+ let { fetchPolicy = (defaults && defaults.fetchPolicy) || "cache-first", errorPolicy = (defaults && defaults.errorPolicy) || "none", returnPartialData = false, notifyOnNetworkStatusChange = true, context = {}, } = options;
844
844
  if (this.prioritizeCacheValues &&
845
845
  (fetchPolicy === "network-only" || fetchPolicy === "cache-and-network")) {
846
846
  fetchPolicy = "cache-first";