@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.
- package/.changeset/forty-tomatoes-punch.md +5 -0
- package/.changeset/fuzzy-tips-sit.md +5 -0
- package/.changeset/khaki-keys-deliver.md +5 -0
- package/.changeset/large-plants-know.md +5 -0
- package/.changeset/mean-lizards-think.md +5 -0
- package/.changeset/pre.json +6 -0
- package/.changeset/thin-peas-hear.md +16 -0
- package/CHANGELOG.md +29 -0
- package/__cjs/core/ObservableQuery.cjs +91 -28
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +2 -1
- package/__cjs/core/QueryManager.cjs +2 -2
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/watchQueryOptions.d.cts +2 -2
- package/__cjs/react/hooks/useLazyQuery.cjs +17 -20
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs +1 -0
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/types/types.documentation.d.cts +2 -2
- package/__cjs/testing/matchers/arrayWithLength.cjs +15 -0
- package/__cjs/testing/matchers/arrayWithLength.cjs.map +1 -0
- package/__cjs/testing/matchers/arrayWithLength.d.cts +3 -0
- package/__cjs/testing/matchers/index.cjs +2 -0
- package/__cjs/testing/matchers/index.cjs.map +1 -1
- package/__cjs/version.cjs +1 -1
- package/core/ObservableQuery.d.ts +2 -1
- package/core/ObservableQuery.js +91 -28
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.js +2 -2
- package/core/QueryManager.js.map +1 -1
- package/core/watchQueryOptions.d.ts +2 -2
- package/package.json +1 -1
- package/react/hooks/useLazyQuery.d.ts +1 -1
- package/react/hooks/useLazyQuery.js +17 -20
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +1 -1
- package/react/hooks/useQuery.d.ts +1 -1
- package/react/query-preloader/createQueryPreloader.js +1 -0
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/types/types.documentation.d.ts +2 -2
- package/testing/matchers/arrayWithLength.d.ts +3 -0
- package/testing/matchers/arrayWithLength.js +11 -0
- package/testing/matchers/arrayWithLength.js.map +1 -0
- package/testing/matchers/index.js +2 -0
- package/testing/matchers/index.js.map +1 -1
- package/version.js +1 -1
package/core/QueryManager.js
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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";
|