@apollo/client 3.14.0-alpha.1 → 3.14.0
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/CHANGELOG.md +40 -0
- package/README.md +2 -2
- package/apollo-client.cjs +10 -6
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/ObservableQuery.d.ts +1 -0
- package/core/ObservableQuery.js +9 -5
- package/core/ObservableQuery.js.map +1 -1
- package/core/core.cjs +10 -6
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +10 -6
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/package.json +1 -1
- package/react/hooks/hooks.cjs +1 -1
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +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/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/.changeset/breezy-lions-rule.md +0 -5
- package/.changeset/chilled-cameras-scream.md +0 -5
- package/.changeset/great-jobs-fetch.md +0 -5
- package/.changeset/great-suns-cover.md +0 -5
- package/.changeset/perfect-donuts-roll.md +0 -5
- package/.changeset/popular-waves-drop.md +0 -5
- package/.changeset/pre.json +0 -19
- package/.changeset/shy-dragons-tease.md +0 -5
- package/.changeset/smooth-countries-cough.md +0 -5
- package/.changeset/spotty-walls-repair.md +0 -5
- package/.changeset/tidy-bulldogs-exercise.md +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#12752](https://github.com/apollographql/apollo-client/pull/12752) [`8b779b4`](https://github.com/apollographql/apollo-client/commit/8b779b428b9dc9dad3e78f02bba6646ff415631d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings to remaining APIs changed in Apollo Client 4.0.
|
|
8
|
+
|
|
9
|
+
- [#12746](https://github.com/apollographql/apollo-client/pull/12746) [`0bcd2f4`](https://github.com/apollographql/apollo-client/commit/0bcd2f4ead372eb5928bbd5c00b0bd48e497a5e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add warnings and deprecations for options and methods for all React APIs.
|
|
10
|
+
|
|
11
|
+
- [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `@deprecated` tags to all properties returned from any query API (e.g. `client.query`, `observableQuery.refetch`, etc.), `client.mutate`, and `client.subscribe` that are no longer available in Apollo Client 4.0.
|
|
12
|
+
|
|
13
|
+
- [#12746](https://github.com/apollographql/apollo-client/pull/12746) [`0bcd2f4`](https://github.com/apollographql/apollo-client/commit/0bcd2f4ead372eb5928bbd5c00b0bd48e497a5e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `preloadQuery.toPromise(queryRef)` as a replacement for `queryRef.toPromise()`. `queryRef.toPromise()` has been removed in Apollo Client 4.0 in favor of `preloadQuery.toPromise` and is now considered deprecated.
|
|
14
|
+
|
|
15
|
+
- [#12736](https://github.com/apollographql/apollo-client/pull/12736) [`ea89440`](https://github.com/apollographql/apollo-client/commit/ea8944013278060ef87dfa4de6663a21b5204880) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and deprecation warnings for `ApolloClient` options and methods.
|
|
16
|
+
|
|
17
|
+
- [#12763](https://github.com/apollographql/apollo-client/pull/12763) [`5de6a3d`](https://github.com/apollographql/apollo-client/commit/5de6a3d3189afa2a7c3bb2eb08d3c4394ae4a16d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`.
|
|
18
|
+
|
|
19
|
+
- [#12459](https://github.com/apollographql/apollo-client/pull/12459) [`1c5a031`](https://github.com/apollographql/apollo-client/commit/1c5a0313d388945aeda93b2c1992ad77f4416fa1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Reset `addTypenameTransform` and `fragments` caches when calling `cache.gc()` only when `resetResultCache` is `true`.
|
|
20
|
+
|
|
21
|
+
- [#12743](https://github.com/apollographql/apollo-client/pull/12743) [`92ad409`](https://github.com/apollographql/apollo-client/commit/92ad4097e5c83e0a780ede20db34e9e63fb98e8b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings for `addTypename` in `InMemoryCache` and `MockedProvider`.
|
|
22
|
+
|
|
23
|
+
- [#12743](https://github.com/apollographql/apollo-client/pull/12743) [`92ad409`](https://github.com/apollographql/apollo-client/commit/92ad4097e5c83e0a780ede20db34e9e63fb98e8b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings for `canonizeResults`.
|
|
24
|
+
|
|
25
|
+
- [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using a `standby` fetch policy with `client.query`.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- [#12750](https://github.com/apollographql/apollo-client/pull/12750) [`ecf3de1`](https://github.com/apollographql/apollo-client/commit/ecf3de1cc9a2cf3aaeba0c945909324b9e4b478a) Thanks [@phryneas](https://github.com/phryneas)! - Prevent field policies from overwriting/merging into supertype field policies.
|
|
30
|
+
|
|
31
|
+
## 3.14.0-rc.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- [#12763](https://github.com/apollographql/apollo-client/pull/12763) [`5de6a3d`](https://github.com/apollographql/apollo-client/commit/5de6a3d3189afa2a7c3bb2eb08d3c4394ae4a16d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`.
|
|
36
|
+
|
|
3
37
|
## 3.14.0-alpha.1
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
|
@@ -30,6 +64,12 @@
|
|
|
30
64
|
|
|
31
65
|
- [#12750](https://github.com/apollographql/apollo-client/pull/12750) [`ecf3de1`](https://github.com/apollographql/apollo-client/commit/ecf3de1cc9a2cf3aaeba0c945909324b9e4b478a) Thanks [@phryneas](https://github.com/phryneas)! - Prevent field policies from overwriting/merging into supertype field policies.
|
|
32
66
|
|
|
67
|
+
## 3.13.9
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- [#12804](https://github.com/apollographql/apollo-client/pull/12804) [`32c9aa9`](https://github.com/apollographql/apollo-client/commit/32c9aa9215fab72e9ab68ee71198ce242157f855) Thanks [@phryneas](https://github.com/phryneas)! - Fix a possible race condition on queries that were reobserved before they were subscribed to the first time.
|
|
72
|
+
|
|
33
73
|
## 3.13.8
|
|
34
74
|
|
|
35
75
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -52,8 +52,8 @@ npm install @apollo/client graphql
|
|
|
52
52
|
Deliver tomorrow's roadmap today with our comprehensive suite of API orchestration tools:
|
|
53
53
|
|
|
54
54
|
* [**Apollo Client**](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Type-safe apps with GraphQL-powered on-device caching ([React](https://www.apollographql.com/docs/react?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [iOS](https://www.apollographql.com/docs/ios?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [Kotlin](https://www.apollographql.com/docs/kotlin?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme))
|
|
55
|
-
* [**Apollo Connectors**](https://www.apollographql.com/connectors?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Compose all your GraphQL and REST APIs into one GraphQL endpoint
|
|
56
|
-
* [**Apollo MCP Server**](https://www.apollographql.com/
|
|
55
|
+
* [**Apollo Connectors**](https://www.apollographql.com/graphos/apollo-connectors?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Compose all your GraphQL and REST APIs into one GraphQL endpoint
|
|
56
|
+
* [**Apollo MCP Server**](https://www.apollographql.com/apollo-mcp-server?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- AI needs APIs. The fastest way to ship reliable AI experiences
|
|
57
57
|
* [**Apollo Router**](https://www.apollographql.com/docs/router?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Scale your APIs seamlessly with GraphQL Federation, Security, Auth, and more
|
|
58
58
|
* [**GraphOS**](https://www.apollographql.com/graphos?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Deploy, manage, govern, and explore your APIs ([start for free, no credit card needed](https://www.apollographql.com/pricing?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme))
|
|
59
59
|
|
package/apollo-client.cjs
CHANGED
|
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
|
|
|
31
31
|
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
33
|
|
|
34
|
-
var version = "3.14.0
|
|
34
|
+
var version = "3.14.0";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -5245,10 +5245,7 @@ var ObservableQuery = (function (_super) {
|
|
|
5245
5245
|
var _this = this;
|
|
5246
5246
|
var startedInactive = ObservableQuery.inactiveOnCreation.getValue();
|
|
5247
5247
|
_this = _super.call(this, function (observer) {
|
|
5248
|
-
|
|
5249
|
-
queryManager["queries"].set(_this.queryId, queryInfo);
|
|
5250
|
-
startedInactive = false;
|
|
5251
|
-
}
|
|
5248
|
+
_this._getOrCreateQuery();
|
|
5252
5249
|
try {
|
|
5253
5250
|
var subObserver = observer._subscription._observer;
|
|
5254
5251
|
if (subObserver && !subObserver.error) {
|
|
@@ -5277,6 +5274,13 @@ var ObservableQuery = (function (_super) {
|
|
|
5277
5274
|
_this.observers = new Set();
|
|
5278
5275
|
_this.subscriptions = new Set();
|
|
5279
5276
|
_this.dirty = false;
|
|
5277
|
+
_this._getOrCreateQuery = function () {
|
|
5278
|
+
if (startedInactive) {
|
|
5279
|
+
queryManager["queries"].set(_this.queryId, queryInfo);
|
|
5280
|
+
startedInactive = false;
|
|
5281
|
+
}
|
|
5282
|
+
return _this.queryManager.getOrCreateQuery(_this.queryId);
|
|
5283
|
+
};
|
|
5280
5284
|
_this.queryInfo = queryInfo;
|
|
5281
5285
|
_this.queryManager = queryManager;
|
|
5282
5286
|
_this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy);
|
|
@@ -5664,7 +5668,7 @@ var ObservableQuery = (function (_super) {
|
|
|
5664
5668
|
return options.fetchPolicy;
|
|
5665
5669
|
};
|
|
5666
5670
|
ObservableQuery.prototype.fetch = function (options, newNetworkStatus, query) {
|
|
5667
|
-
var queryInfo = this.
|
|
5671
|
+
var queryInfo = this._getOrCreateQuery();
|
|
5668
5672
|
queryInfo.setObservableQuery(this);
|
|
5669
5673
|
return this.queryManager["fetchConcastWithInfo"](queryInfo, options, newNetworkStatus, query);
|
|
5670
5674
|
};
|