@apollo/client 3.9.0-rc.1 → 3.9.1
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 +161 -177
- package/README.md +4 -0
- package/apollo-client.cjs +2 -7
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/core/types/DataProxy.d.ts +8 -16
- package/cache/core/types/DataProxy.js.map +1 -1
- package/cache/inmemory/types.d.ts +0 -1
- package/cache/inmemory/types.js.map +1 -1
- package/core/ApolloClient.d.ts +6 -1
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +22 -0
- package/core/ObservableQuery.js +22 -0
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.js +1 -7
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +2 -7
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +2 -7
- package/core/types.d.ts +5 -2
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +258 -128
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/dev.cjs +2 -2
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +2 -2
- package/invariantErrorCodes.js +1 -1
- package/package.json +12 -12
- package/react/components/types.d.ts +3 -0
- package/react/components/types.js.map +1 -1
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/useApolloClient.d.ts +15 -0
- package/react/hooks/useApolloClient.js +15 -0
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +35 -0
- package/react/hooks/useLazyQuery.js +35 -0
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.d.ts +69 -2
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +47 -0
- package/react/hooks/useMutation.js +47 -0
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +34 -0
- package/react/hooks/useQuery.js +34 -0
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.d.ts +5 -4
- package/react/hooks/useQueryRefHandlers.js +1 -1
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +17 -0
- package/react/hooks/useReactiveVar.js +17 -0
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +85 -0
- package/react/hooks/useSubscription.js +85 -0
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +39 -0
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +84 -52
- package/react/query-preloader/createQueryPreloader.js +5 -2
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/react.cjs.map +1 -1
- package/react/types/types.d.ts +552 -57
- package/react/types/types.documentation.d.ts +559 -0
- package/react/types/types.documentation.js +2 -0
- package/react/types/types.documentation.js.map +1 -0
- package/react/types/types.js.map +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/utilities/graphql/DocumentTransform.d.ts +12 -0
- package/utilities/graphql/DocumentTransform.js.map +1 -1
- package/version.js +1 -1
- package/.changeset/beige-geese-wink.md +0 -5
- package/.changeset/breezy-spiders-tap.md +0 -38
- package/.changeset/chatty-comics-yawn.md +0 -8
- package/.changeset/clean-items-smash.md +0 -5
- package/.changeset/cold-llamas-turn.md +0 -8
- package/.changeset/curvy-seas-hope.md +0 -13
- package/.changeset/dirty-kids-crash.md +0 -5
- package/.changeset/dirty-tigers-matter.md +0 -13
- package/.changeset/forty-cups-shop.md +0 -5
- package/.changeset/friendly-clouds-laugh.md +0 -7
- package/.changeset/hot-ducks-burn.md +0 -5
- package/.changeset/late-rabbits-protect.md +0 -7
- package/.changeset/mighty-coats-check.md +0 -47
- package/.changeset/pink-apricots-yawn.md +0 -5
- package/.changeset/polite-avocados-warn.md +0 -5
- package/.changeset/pre.json +0 -45
- package/.changeset/quick-hats-marry.md +0 -5
- package/.changeset/rare-snakes-melt.md +0 -24
- package/.changeset/shaggy-ears-scream.md +0 -5
- package/.changeset/shaggy-sheep-pull.md +0 -5
- package/.changeset/six-rocks-arrive.md +0 -5
- package/.changeset/sixty-boxes-rest.md +0 -8
- package/.changeset/smooth-plums-shout.md +0 -5
- package/.changeset/sour-sheep-walk.md +0 -7
- package/.changeset/spicy-drinks-camp.md +0 -5
- package/.changeset/strong-terms-perform.md +0 -46
- package/.changeset/swift-zoos-collect.md +0 -19
- package/.changeset/thick-mice-collect.md +0 -5
- package/.changeset/thick-tips-cry.md +0 -9
- package/.changeset/thirty-ties-arrive.md +0 -26
- package/.changeset/tough-timers-begin.md +0 -8
- package/.changeset/unlucky-rats-decide.md +0 -5
- package/.changeset/violet-lions-draw.md +0 -5
- package/.changeset/wet-forks-rhyme.md +0 -5
- package/.changeset/wild-dolphins-jog.md +0 -5
- package/.changeset/wise-news-grab.md +0 -7
- package/.changeset/yellow-flies-repeat.md +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,73 +1,105 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
-
## 3.9.
|
|
3
|
+
## 3.9.1
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#11516](https://github.com/apollographql/apollo-client/pull/11516) [`8390fea`](https://github.com/apollographql/apollo-client/commit/8390fea13175bada8361ba5f0df2e43197085aba) Thanks [@phryneas](https://github.com/phryneas)! - Fix an incorrect string substitution in a warning message.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- [#11515](https://github.com/apollographql/apollo-client/pull/11515) [`c9bf93b`](https://github.com/apollographql/apollo-client/commit/c9bf93bdc2816f7fdba96961e1435f463f440bd1) Thanks [@vladar](https://github.com/vladar)! - Avoid redundant refetchQueries call for mutation with no-cache policy (fixes #10238)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- [#11545](https://github.com/apollographql/apollo-client/pull/11545) [`84a6bea`](https://github.com/apollographql/apollo-client/commit/84a6beaeae69acdffea49ba6b8242752cc188172) Thanks [@alessbell](https://github.com/alessbell)! - Remove error thrown by `inFlightLinkObservables` intended to be removed before 3.9 release.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## 3.9.0
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### Minor Changes
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
#### Memory optimizations
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
- [#11424](https://github.com/apollographql/apollo-client/pull/11424) [`62f3b6d`](https://github.com/apollographql/apollo-client/commit/62f3b6d0e89611e27d9f29812ee60e5db5963fd6) Thanks [@phryneas](https://github.com/phryneas)! - Simplify RetryLink, fix potential memory leak
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Historically, `RetryLink` would keep a `values` array of all previous values, in case the operation would get an additional subscriber at a later point in time.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
In practice, this could lead to a memory leak ([#11393](https://github.com/apollographql/apollo-client/pull/11393)) and did not serve any further purpose, as the resulting observable would only be subscribed to by Apollo Client itself, and only once - it would be wrapped in a `Concast` before being exposed to the user, and that `Concast` would handle subscribers on its own.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
- [#11435](https://github.com/apollographql/apollo-client/pull/11435) [`5cce53e`](https://github.com/apollographql/apollo-client/commit/5cce53e83b976f85d2d2b06e28cc38f01324fea1) Thanks [@phryneas](https://github.com/phryneas)! - Deprecates `canonizeResults`.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
28
28
|
|
|
29
|
-
- [#
|
|
29
|
+
- [#11254](https://github.com/apollographql/apollo-client/pull/11254) [`d08970d`](https://github.com/apollographql/apollo-client/commit/d08970d348cf4ad6d80c6baf85b4a4cd4034a3bb) Thanks [@benjamn](https://github.com/benjamn)! - Decouple `canonicalStringify` from `ObjectCanon` for better time and memory performance.
|
|
30
30
|
|
|
31
|
-
- [#
|
|
31
|
+
- [#11356](https://github.com/apollographql/apollo-client/pull/11356) [`cc4ac7e`](https://github.com/apollographql/apollo-client/commit/cc4ac7e1917f046bcd177882727864eed40b910e) Thanks [@phryneas](https://github.com/phryneas)! - Fix a potential memory leak in `FragmentRegistry.transform` and `FragmentRegistry.findFragmentSpreads` that would hold on to passed-in `DocumentNodes` for too long.
|
|
32
32
|
|
|
33
|
-
- [#
|
|
33
|
+
- [#11370](https://github.com/apollographql/apollo-client/pull/11370) [`25e2cb4`](https://github.com/apollographql/apollo-client/commit/25e2cb431c76ec5aa88202eaacbd98fad42edc7f) Thanks [@phryneas](https://github.com/phryneas)! - `parse` function: improve memory management
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
- use LRU `WeakCache` instead of `Map` to keep a limited number of parsed results
|
|
36
|
+
- cache is initiated lazily, only when needed
|
|
37
|
+
- expose `parse.resetCache()` method
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
- [#11389](https://github.com/apollographql/apollo-client/pull/11389) [`139acd1`](https://github.com/apollographql/apollo-client/commit/139acd1153afa1445b69dcb4e139668ab8c5889a) Thanks [@phryneas](https://github.com/phryneas)! - `documentTransform`: use `optimism` and `WeakCache` instead of directly storing data on the `Trie`
|
|
38
40
|
|
|
39
|
-
- [#
|
|
41
|
+
- [#11358](https://github.com/apollographql/apollo-client/pull/11358) [`7d939f8`](https://github.com/apollographql/apollo-client/commit/7d939f80fbc2c419c58a6c55b6a35ee7474d0379) Thanks [@phryneas](https://github.com/phryneas)! - Fixes a potential memory leak in `Concast` that might have been triggered when `Concast` was used outside of Apollo Client.
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
in case the operation would get an additional subscriber at a later point in time.
|
|
43
|
-
In practice, this could lead to a memory leak (#11393) and did not serve any
|
|
44
|
-
further purpose, as the resulting observable would only be subscribed to by
|
|
45
|
-
Apollo Client itself, and only once - it would be wrapped in a `Concast` before
|
|
46
|
-
being exposed to the user, and that `Concast` would handle subscribers on its
|
|
47
|
-
own.
|
|
43
|
+
- [#11344](https://github.com/apollographql/apollo-client/pull/11344) [`bd26676`](https://github.com/apollographql/apollo-client/commit/bd2667619700139af32a45364794d11f845ab6cf) Thanks [@phryneas](https://github.com/phryneas)! - Add a `resetCache` method to `DocumentTransform` and hook `InMemoryCache.addTypenameTransform` up to `InMemoryCache.gc`
|
|
48
44
|
|
|
49
|
-
- [#
|
|
45
|
+
- [#11367](https://github.com/apollographql/apollo-client/pull/11367) [`30d17bf`](https://github.com/apollographql/apollo-client/commit/30d17bfebe44dbfa7b78c8982cfeb49afd37129c) Thanks [@phryneas](https://github.com/phryneas)! - `print`: use `WeakCache` instead of `WeakMap`
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
- [#11387](https://github.com/apollographql/apollo-client/pull/11387) [`4dce867`](https://github.com/apollographql/apollo-client/commit/4dce8673b1757d8a3a4edd2996d780e86fad14e3) Thanks [@phryneas](https://github.com/phryneas)! - `QueryManager.transformCache`: use `WeakCache` instead of `WeakMap`
|
|
52
48
|
|
|
53
|
-
- [#
|
|
49
|
+
- [#11369](https://github.com/apollographql/apollo-client/pull/11369) [`2a47164`](https://github.com/apollographql/apollo-client/commit/2a471646616e3af1b5c039e961f8d5717fad8f32) Thanks [@phryneas](https://github.com/phryneas)! - Persisted Query Link: improve memory management
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
- use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results
|
|
52
|
+
- hash cache is initiated lazily, only when needed
|
|
53
|
+
- expose `persistedLink.resetHashCache()` method
|
|
54
|
+
- reset hash cache if the upstream server reports it doesn't accept persisted queries
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
- [#10804](https://github.com/apollographql/apollo-client/pull/10804) [`221dd99`](https://github.com/apollographql/apollo-client/commit/221dd99ffd1990f8bd0392543af35e9b08d0fed8) Thanks [@phryneas](https://github.com/phryneas)! - use WeakMap in React Native with Hermes
|
|
58
57
|
|
|
59
|
-
- [#
|
|
58
|
+
- [#11355](https://github.com/apollographql/apollo-client/pull/11355) [`7d8e184`](https://github.com/apollographql/apollo-client/commit/7d8e18493cd13134726c6643cbf0fadb08be2d37) Thanks [@phryneas](https://github.com/phryneas)! - InMemoryCache.gc now also triggers FragmentRegistry.resetCaches (if there is a FragmentRegistry)
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
but we previously didn't have a @deprecated tag in the DocBlocks.
|
|
60
|
+
- [#11409](https://github.com/apollographql/apollo-client/pull/11409) [`2e7203b`](https://github.com/apollographql/apollo-client/commit/2e7203b3a9618952ddb522627ded7cceabd7f250) Thanks [@phryneas](https://github.com/phryneas)! - Adds an experimental `ApolloClient.getMemoryInternals` helper
|
|
63
61
|
|
|
64
|
-
- [#
|
|
62
|
+
- [#11343](https://github.com/apollographql/apollo-client/pull/11343) [`776631d`](https://github.com/apollographql/apollo-client/commit/776631de4500d56252f6f5fdaf29a81c41dfbdc7) Thanks [@phryneas](https://github.com/phryneas)! - Add `reset` method to `print`, hook up to `InMemoryCache.gc`
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
#### Suspense-enabled data fetching on user interaction with `useLoadableQuery`
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
- [#11300](https://github.com/apollographql/apollo-client/pull/11300) [`a815873`](https://github.com/apollographql/apollo-client/commit/a8158733cfa3e65180ec23518d657ea41894bb2b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduces a new `useLoadableQuery` hook. This hook works similarly to `useBackgroundQuery` in that it returns a `queryRef` that can be used to suspend a component via the `useReadQuery` hook. It provides a more ergonomic way to load the query during a user interaction (for example when wanting to preload some data) that would otherwise be clunky with `useBackgroundQuery`.
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
```tsx
|
|
69
|
+
function App() {
|
|
70
|
+
const [loadQuery, queryRef, { refetch, fetchMore, reset }] =
|
|
71
|
+
useLoadableQuery(query, options);
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<>
|
|
75
|
+
<button onClick={() => loadQuery(variables)}>Load query</button>
|
|
76
|
+
<Suspense fallback={<SuspenseFallback />}>
|
|
77
|
+
{queryRef && <Child queryRef={queryRef} />}
|
|
78
|
+
</Suspense>
|
|
79
|
+
</>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function Child({ queryRef }) {
|
|
84
|
+
const { data } = useReadQuery(queryRef);
|
|
85
|
+
|
|
86
|
+
// ...
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Begin preloading outside of React with `createQueryPreloader`
|
|
91
|
+
|
|
92
|
+
- [#11412](https://github.com/apollographql/apollo-client/pull/11412) [`58db5c3`](https://github.com/apollographql/apollo-client/commit/58db5c3295b88162f91019f0898f6baa4b9cced6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to start preloading a query outside React to begin fetching as early as possible. Call `createQueryPreloader` to create a `preloadQuery` function which can be called to start fetching a query. This returns a `queryRef` which is passed to `useReadQuery` and suspended until the query is done fetching.
|
|
93
|
+
|
|
94
|
+
#### Testing utility improvements
|
|
95
|
+
|
|
96
|
+
- [#11178](https://github.com/apollographql/apollo-client/pull/11178) [`4d64a6f`](https://github.com/apollographql/apollo-client/commit/4d64a6fa2ad5abe6f7f172c164f5e1fc2cb89829) Thanks [@sebakerckhof](https://github.com/sebakerckhof)! - Support re-using of mocks in the MockedProvider
|
|
97
|
+
|
|
98
|
+
- [#6701](https://github.com/apollographql/apollo-client/pull/6701) [`8d2b4e1`](https://github.com/apollographql/apollo-client/commit/8d2b4e107d7c21563894ced3a65d631183b58fd9) Thanks [@prowe](https://github.com/prowe)! - Ability to dynamically match mocks
|
|
99
|
+
|
|
100
|
+
Adds support for a new property `MockedResponse.variableMatcher`: a predicate function that accepts a `variables` param. If `true`, the `variables` will be passed into the `ResultFunction` to help dynamically build a response.
|
|
101
|
+
|
|
102
|
+
#### New `useQueryRefHandlers` hook
|
|
71
103
|
|
|
72
104
|
- [#11412](https://github.com/apollographql/apollo-client/pull/11412) [`58db5c3`](https://github.com/apollographql/apollo-client/commit/58db5c3295b88162f91019f0898f6baa4b9cced6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Create a new `useQueryRefHandlers` hook that returns `refetch` and `fetchMore` functions for a given `queryRef`. This is useful to get access to handlers for a `queryRef` that was created by `createQueryPreloader` or when the handlers for a `queryRef` produced by a different component are inaccessible.
|
|
73
105
|
|
|
@@ -79,6 +111,8 @@
|
|
|
79
111
|
}
|
|
80
112
|
```
|
|
81
113
|
|
|
114
|
+
#### Bail out of `optimisticResponse` updates with the `IGNORE` sentinel object
|
|
115
|
+
|
|
82
116
|
- [#11410](https://github.com/apollographql/apollo-client/pull/11410) [`07fcf6a`](https://github.com/apollographql/apollo-client/commit/07fcf6a3bf5bc78ffe6f3e598897246b4da02cbb) Thanks [@sf-twingate](https://github.com/sf-twingate)! - Allow returning `IGNORE` sentinel object from `optimisticResponse` functions to bail-out from the optimistic update.
|
|
83
117
|
|
|
84
118
|
Consider this example:
|
|
@@ -123,8 +157,6 @@
|
|
|
123
157
|
|
|
124
158
|
The `IGNORE` sentinel can be destructured from the second parameter in the callback function signature passed to `optimisticResponse`.
|
|
125
159
|
|
|
126
|
-
- [#11412](https://github.com/apollographql/apollo-client/pull/11412) [`58db5c3`](https://github.com/apollographql/apollo-client/commit/58db5c3295b88162f91019f0898f6baa4b9cced6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to start preloading a query outside React to begin fetching as early as possible. Call `createQueryPreloader` to create a `preloadQuery` function which can be called to start fetching a query. This returns a `queryRef` which is passed to `useReadQuery` and suspended until the query is done fetching.
|
|
127
|
-
|
|
128
160
|
```tsx
|
|
129
161
|
const preloadQuery = createQueryPreloader(client);
|
|
130
162
|
const queryRef = preloadQuery(QUERY, { variables, ...otherOptions });
|
|
@@ -144,130 +176,11 @@
|
|
|
144
176
|
}
|
|
145
177
|
```
|
|
146
178
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```ts
|
|
150
|
-
useQuery(QUERY, {
|
|
151
|
-
pollInterval: 1000,
|
|
152
|
-
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
153
|
-
});
|
|
154
|
-
// or define it globally
|
|
155
|
-
new ApolloClient({
|
|
156
|
-
defaultOptions: {
|
|
157
|
-
watchQuery: {
|
|
158
|
-
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
- [#11435](https://github.com/apollographql/apollo-client/pull/11435) [`5cce53e`](https://github.com/apollographql/apollo-client/commit/5cce53e83b976f85d2d2b06e28cc38f01324fea1) Thanks [@phryneas](https://github.com/phryneas)! - Deprecates `canonizeResults`.
|
|
165
|
-
|
|
166
|
-
Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore.
|
|
167
|
-
A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
179
|
+
#### Network adapters for multipart subscriptions usage with Relay and urql
|
|
168
180
|
|
|
169
|
-
|
|
181
|
+
- [#11301](https://github.com/apollographql/apollo-client/pull/11301) [`46ab032`](https://github.com/apollographql/apollo-client/commit/46ab032af83a01f184bfcce5edba4b55dbb2962a) Thanks [@alessbell](https://github.com/alessbell)! - Add multipart subscription network adapters for Relay and urql
|
|
170
182
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
- use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results
|
|
174
|
-
- hash cache is initiated lazily, only when needed
|
|
175
|
-
- expose `persistedLink.resetHashCache()` method
|
|
176
|
-
- reset hash cache if the upstream server reports it doesn't accept persisted queries
|
|
177
|
-
|
|
178
|
-
- [#10804](https://github.com/apollographql/apollo-client/pull/10804) [`221dd99`](https://github.com/apollographql/apollo-client/commit/221dd99ffd1990f8bd0392543af35e9b08d0fed8) Thanks [@phryneas](https://github.com/phryneas)! - use WeakMap in React Native with Hermes
|
|
179
|
-
|
|
180
|
-
- [#11409](https://github.com/apollographql/apollo-client/pull/11409) [`2e7203b`](https://github.com/apollographql/apollo-client/commit/2e7203b3a9618952ddb522627ded7cceabd7f250) Thanks [@phryneas](https://github.com/phryneas)! - Adds an experimental `ApolloClient.getMemoryInternals` helper
|
|
181
|
-
|
|
182
|
-
## 3.9.0-alpha.5
|
|
183
|
-
|
|
184
|
-
### Minor Changes
|
|
185
|
-
|
|
186
|
-
- [#11345](https://github.com/apollographql/apollo-client/pull/11345) [`1759066a8`](https://github.com/apollographql/apollo-client/commit/1759066a8f9a204e49228568aef9446a64890ff3) Thanks [@phryneas](https://github.com/phryneas)! - `QueryManager.inFlightLinkObservables` now uses a strong `Trie` as an internal data structure.
|
|
187
|
-
|
|
188
|
-
#### Warning: requires `@apollo/experimental-nextjs-app-support` update
|
|
189
|
-
|
|
190
|
-
If you are using `@apollo/experimental-nextjs-app-support`, you will need to update that to at least 0.5.2, as it accesses this internal data structure.
|
|
191
|
-
|
|
192
|
-
- [#11300](https://github.com/apollographql/apollo-client/pull/11300) [`a8158733c`](https://github.com/apollographql/apollo-client/commit/a8158733cfa3e65180ec23518d657ea41894bb2b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduces a new `useLoadableQuery` hook. This hook works similarly to `useBackgroundQuery` in that it returns a `queryRef` that can be used to suspend a component via the `useReadQuery` hook. It provides a more ergonomic way to load the query during a user interaction (for example when wanting to preload some data) that would otherwise be clunky with `useBackgroundQuery`.
|
|
193
|
-
|
|
194
|
-
```tsx
|
|
195
|
-
function App() {
|
|
196
|
-
const [loadQuery, queryRef, { refetch, fetchMore, reset }] =
|
|
197
|
-
useLoadableQuery(query, options);
|
|
198
|
-
|
|
199
|
-
return (
|
|
200
|
-
<>
|
|
201
|
-
<button onClick={() => loadQuery(variables)}>Load query</button>
|
|
202
|
-
<Suspense fallback={<SuspenseFallback />}>
|
|
203
|
-
{queryRef && <Child queryRef={queryRef} />}
|
|
204
|
-
</Suspense>
|
|
205
|
-
</>
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
function Child({ queryRef }) {
|
|
210
|
-
const { data } = useReadQuery(queryRef);
|
|
211
|
-
|
|
212
|
-
// ...
|
|
213
|
-
}
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### Patch Changes
|
|
217
|
-
|
|
218
|
-
- [#11356](https://github.com/apollographql/apollo-client/pull/11356) [`cc4ac7e19`](https://github.com/apollographql/apollo-client/commit/cc4ac7e1917f046bcd177882727864eed40b910e) Thanks [@phryneas](https://github.com/phryneas)! - Fix a potential memory leak in `FragmentRegistry.transform` and `FragmentRegistry.findFragmentSpreads` that would hold on to passed-in `DocumentNodes` for too long.
|
|
219
|
-
|
|
220
|
-
- [#11370](https://github.com/apollographql/apollo-client/pull/11370) [`25e2cb431`](https://github.com/apollographql/apollo-client/commit/25e2cb431c76ec5aa88202eaacbd98fad42edc7f) Thanks [@phryneas](https://github.com/phryneas)! - `parse` function: improve memory management
|
|
221
|
-
|
|
222
|
-
- use LRU `WeakCache` instead of `Map` to keep a limited number of parsed results
|
|
223
|
-
- cache is initiated lazily, only when needed
|
|
224
|
-
- expose `parse.resetCache()` method
|
|
225
|
-
|
|
226
|
-
- [#11389](https://github.com/apollographql/apollo-client/pull/11389) [`139acd115`](https://github.com/apollographql/apollo-client/commit/139acd1153afa1445b69dcb4e139668ab8c5889a) Thanks [@phryneas](https://github.com/phryneas)! - `documentTransform`: use `optimism` and `WeakCache` instead of directly storing data on the `Trie`
|
|
227
|
-
|
|
228
|
-
- [#11358](https://github.com/apollographql/apollo-client/pull/11358) [`7d939f80f`](https://github.com/apollographql/apollo-client/commit/7d939f80fbc2c419c58a6c55b6a35ee7474d0379) Thanks [@phryneas](https://github.com/phryneas)! - Fixes a potential memory leak in `Concast` that might have been triggered when `Concast` was used outside of Apollo Client.
|
|
229
|
-
|
|
230
|
-
- [#11344](https://github.com/apollographql/apollo-client/pull/11344) [`bd2667619`](https://github.com/apollographql/apollo-client/commit/bd2667619700139af32a45364794d11f845ab6cf) Thanks [@phryneas](https://github.com/phryneas)! - Add a `resetCache` method to `DocumentTransform` and hook `InMemoryCache.addTypenameTransform` up to `InMemoryCache.gc`
|
|
231
|
-
|
|
232
|
-
- [#11367](https://github.com/apollographql/apollo-client/pull/11367) [`30d17bfeb`](https://github.com/apollographql/apollo-client/commit/30d17bfebe44dbfa7b78c8982cfeb49afd37129c) Thanks [@phryneas](https://github.com/phryneas)! - `print`: use `WeakCache` instead of `WeakMap`
|
|
233
|
-
|
|
234
|
-
- [#11385](https://github.com/apollographql/apollo-client/pull/11385) [`d9ca4f082`](https://github.com/apollographql/apollo-client/commit/d9ca4f0821c66ae4f03cf35a7ac93fe604cc6de3) Thanks [@phryneas](https://github.com/phryneas)! - ensure `defaultContext` is also used for mutations and subscriptions
|
|
235
|
-
|
|
236
|
-
- [#11387](https://github.com/apollographql/apollo-client/pull/11387) [`4dce8673b`](https://github.com/apollographql/apollo-client/commit/4dce8673b1757d8a3a4edd2996d780e86fad14e3) Thanks [@phryneas](https://github.com/phryneas)! - `QueryManager.transformCache`: use `WeakCache` instead of `WeakMap`
|
|
237
|
-
|
|
238
|
-
- [#11371](https://github.com/apollographql/apollo-client/pull/11371) [`ebd8fe2c1`](https://github.com/apollographql/apollo-client/commit/ebd8fe2c1b8b50bfeb2da20aeca5671300fb5564) Thanks [@phryneas](https://github.com/phryneas)! - Clarify types of `EntityStore.makeCacheKey`.
|
|
239
|
-
|
|
240
|
-
- [#11355](https://github.com/apollographql/apollo-client/pull/11355) [`7d8e18493`](https://github.com/apollographql/apollo-client/commit/7d8e18493cd13134726c6643cbf0fadb08be2d37) Thanks [@phryneas](https://github.com/phryneas)! - InMemoryCache.gc now also triggers FragmentRegistry.resetCaches (if there is a FragmentRegistry)
|
|
241
|
-
|
|
242
|
-
## 3.8.8
|
|
243
|
-
|
|
244
|
-
### Patch Changes
|
|
245
|
-
|
|
246
|
-
- [#11200](https://github.com/apollographql/apollo-client/pull/11200) [`ae5091a21`](https://github.com/apollographql/apollo-client/commit/ae5091a21f0feff1486503071ea8dc002cf1be41) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Enable `strict` in tsconfig for the entire project.
|
|
247
|
-
|
|
248
|
-
- [#11332](https://github.com/apollographql/apollo-client/pull/11332) [`291aea56b`](https://github.com/apollographql/apollo-client/commit/291aea56bfaed3987a98be7fe4e6160114b62d2d) Thanks [@asvishnyakov](https://github.com/asvishnyakov)! - Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core
|
|
249
|
-
|
|
250
|
-
- [#10931](https://github.com/apollographql/apollo-client/pull/10931) [`e5acf910e`](https://github.com/apollographql/apollo-client/commit/e5acf910e39752b453540b6751046d1c19b66350) Thanks [@phryneas](https://github.com/phryneas)! - `useMutation`: also reset internal state on reset
|
|
251
|
-
|
|
252
|
-
## 3.9.0-alpha.4
|
|
253
|
-
|
|
254
|
-
### Minor Changes
|
|
255
|
-
|
|
256
|
-
- [#11175](https://github.com/apollographql/apollo-client/pull/11175) [`d6d14911c`](https://github.com/apollographql/apollo-client/commit/d6d14911c40782cd6d69167b6f6169c890091ccb) Thanks [@phryneas](https://github.com/phryneas)! - To work around issues in React Server Components, especially with bundling for
|
|
257
|
-
the Next.js "edge" runtime we now use an external package to wrap `react` imports
|
|
258
|
-
instead of importing React directly.
|
|
259
|
-
|
|
260
|
-
### Patch Changes
|
|
261
|
-
|
|
262
|
-
- [#11343](https://github.com/apollographql/apollo-client/pull/11343) [`776631de4`](https://github.com/apollographql/apollo-client/commit/776631de4500d56252f6f5fdaf29a81c41dfbdc7) Thanks [@phryneas](https://github.com/phryneas)! - Add `reset` method to `print`, hook up to `InMemoryCache.gc`
|
|
263
|
-
|
|
264
|
-
## 3.9.0-alpha.3
|
|
265
|
-
|
|
266
|
-
### Minor Changes
|
|
267
|
-
|
|
268
|
-
- [#11301](https://github.com/apollographql/apollo-client/pull/11301) [`46ab032af`](https://github.com/apollographql/apollo-client/commit/46ab032af83a01f184bfcce5edba4b55dbb2962a) Thanks [@alessbell](https://github.com/alessbell)! - Add multipart subscription network adapters for Relay and urql
|
|
269
|
-
|
|
270
|
-
### Relay
|
|
183
|
+
##### Relay
|
|
271
184
|
|
|
272
185
|
```tsx
|
|
273
186
|
import { createFetchMultipartSubscription } from "@apollo/client/utilities/subscriptions/relay";
|
|
@@ -285,7 +198,7 @@
|
|
|
285
198
|
});
|
|
286
199
|
```
|
|
287
200
|
|
|
288
|
-
|
|
201
|
+
##### Urql
|
|
289
202
|
|
|
290
203
|
```tsx
|
|
291
204
|
import { createFetchMultipartSubscription } from "@apollo/client/utilities/subscriptions/urql";
|
|
@@ -306,12 +219,60 @@
|
|
|
306
219
|
});
|
|
307
220
|
```
|
|
308
221
|
|
|
309
|
-
|
|
222
|
+
#### `skipPollAttempt` callback function
|
|
223
|
+
|
|
224
|
+
- [#11397](https://github.com/apollographql/apollo-client/pull/11397) [`3f7eecb`](https://github.com/apollographql/apollo-client/commit/3f7eecbfbd4f4444cffcaac7dd9fd225c8c2a401) Thanks [@aditya-kumawat](https://github.com/aditya-kumawat)! - Adds a new `skipPollAttempt` callback function that's called whenever a refetch attempt occurs while polling. If the function returns `true`, the refetch is skipped and not reattempted until the next poll interval. This will solve the frequent use-case of disabling polling when the window is inactive.
|
|
225
|
+
|
|
226
|
+
```ts
|
|
227
|
+
useQuery(QUERY, {
|
|
228
|
+
pollInterval: 1000,
|
|
229
|
+
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
230
|
+
});
|
|
231
|
+
// or define it globally
|
|
232
|
+
new ApolloClient({
|
|
233
|
+
defaultOptions: {
|
|
234
|
+
watchQuery: {
|
|
235
|
+
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
```
|
|
310
240
|
|
|
311
|
-
|
|
241
|
+
#### `QueryManager.inFlightLinkObservables` now uses a strong `Trie` as an internal data structure
|
|
312
242
|
|
|
313
|
-
|
|
314
|
-
|
|
243
|
+
- [#11345](https://github.com/apollographql/apollo-client/pull/11345) [`1759066`](https://github.com/apollographql/apollo-client/commit/1759066a8f9a204e49228568aef9446a64890ff3) Thanks [@phryneas](https://github.com/phryneas)!
|
|
244
|
+
|
|
245
|
+
##### Warning: requires `@apollo/experimental-nextjs-app-support` update
|
|
246
|
+
|
|
247
|
+
If you are using `@apollo/experimental-nextjs-app-support`, you will need to update that to at least 0.5.2, as it accesses this internal data structure.
|
|
248
|
+
|
|
249
|
+
<details open>
|
|
250
|
+
<summary><h4>More Minor Changes</h4></summary>
|
|
251
|
+
|
|
252
|
+
- [#11202](https://github.com/apollographql/apollo-client/pull/11202) [`7c2bc08`](https://github.com/apollographql/apollo-client/commit/7c2bc08b2ab46b9aa181d187a27aec2ad7129599) Thanks [@benjamn](https://github.com/benjamn)! - Prevent `QueryInfo#markResult` mutation of `result.data` and return cache data consistently whether complete or incomplete.
|
|
253
|
+
|
|
254
|
+
- [#11442](https://github.com/apollographql/apollo-client/pull/11442) [`4b6f2bc`](https://github.com/apollographql/apollo-client/commit/4b6f2bccf3ba94643b38689b32edd2839e47aec1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the need to call `retain` from `useLoadableQuery` since `useReadQuery` will now retain the query. This means that a `queryRef` that is not consumed by `useReadQuery` within the given `autoDisposeTimeoutMs` will now be auto diposed for you.
|
|
255
|
+
|
|
256
|
+
Thanks to [#11412](https://github.com/apollographql/apollo-client/pull/11412), disposed query refs will be automatically resubscribed to the query when consumed by `useReadQuery` after it has been disposed.
|
|
257
|
+
|
|
258
|
+
- [#11438](https://github.com/apollographql/apollo-client/pull/11438) [`6d46ab9`](https://github.com/apollographql/apollo-client/commit/6d46ab930a5e9bd5cae153d3b75b8966784fcd4e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the need to call `retain` from `useBackgroundQuery` since `useReadQuery` will now retain the query. This means that a `queryRef` that is not consumed by `useReadQuery` within the given `autoDisposeTimeoutMs` will now be auto diposed for you.
|
|
259
|
+
|
|
260
|
+
Thanks to [#11412](https://github.com/apollographql/apollo-client/pull/11412), disposed query refs will be automatically resubscribed to the query when consumed by `useReadQuery` after it has been disposed.
|
|
261
|
+
|
|
262
|
+
- [#11175](https://github.com/apollographql/apollo-client/pull/11175) [`d6d1491`](https://github.com/apollographql/apollo-client/commit/d6d14911c40782cd6d69167b6f6169c890091ccb) Thanks [@phryneas](https://github.com/phryneas)! - To work around issues in React Server Components, especially with bundling for
|
|
263
|
+
the Next.js "edge" runtime we now use an external package to wrap `react` imports
|
|
264
|
+
instead of importing React directly.
|
|
265
|
+
|
|
266
|
+
- [#11495](https://github.com/apollographql/apollo-client/pull/11495) [`1190aa5`](https://github.com/apollographql/apollo-client/commit/1190aa59a106217f7192c1f81099adfa5e4365c1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Increase the default memory limits for `executeSelectionSet` and `executeSelectionSetArray`.
|
|
267
|
+
|
|
268
|
+
</details>
|
|
269
|
+
|
|
270
|
+
<details open>
|
|
271
|
+
<summary><h3>Patch Changes</h3></summary>
|
|
272
|
+
|
|
273
|
+
- [#11275](https://github.com/apollographql/apollo-client/pull/11275) [`3862f9b`](https://github.com/apollographql/apollo-client/commit/3862f9ba9086394c4cf4c2ecd99e8e0f6cf44885) Thanks [@phryneas](https://github.com/phryneas)! - Add a `defaultContext` option and property on `ApolloClient`, e.g. for keeping track of changing auth tokens or dependency injection.
|
|
274
|
+
|
|
275
|
+
This can be used e.g. in authentication scenarios, where a new token might be generated outside of the link chain and should passed into the link chain.
|
|
315
276
|
|
|
316
277
|
```js
|
|
317
278
|
import { ApolloClient, createHttpLink, InMemoryCache } from "@apollo/client";
|
|
@@ -343,29 +304,52 @@
|
|
|
343
304
|
}
|
|
344
305
|
```
|
|
345
306
|
|
|
346
|
-
- [#
|
|
307
|
+
- [#11443](https://github.com/apollographql/apollo-client/pull/11443) [`ff5a332`](https://github.com/apollographql/apollo-client/commit/ff5a332ff8b190c418df25371e36719d70061ebe) Thanks [@phryneas](https://github.com/phryneas)! - Adds a deprecation warning to the HOC and render prop APIs.
|
|
308
|
+
|
|
309
|
+
The HOC and render prop APIs have already been deprecated since 2020,
|
|
310
|
+
but we previously didn't have a `@deprecated` tag in the DocBlocks.
|
|
347
311
|
|
|
348
|
-
|
|
312
|
+
- [#11385](https://github.com/apollographql/apollo-client/pull/11385) [`d9ca4f0`](https://github.com/apollographql/apollo-client/commit/d9ca4f0821c66ae4f03cf35a7ac93fe604cc6de3) Thanks [@phryneas](https://github.com/phryneas)! - ensure `defaultContext` is also used for mutations and subscriptions
|
|
313
|
+
|
|
314
|
+
- [#11503](https://github.com/apollographql/apollo-client/pull/11503) [`67f62e3`](https://github.com/apollographql/apollo-client/commit/67f62e359bc471787d066319326e5582b4a635c8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Release changes from [`v3.8.10`](https://github.com/apollographql/apollo-client/releases/tag/v3.8.10)
|
|
315
|
+
|
|
316
|
+
- [#11078](https://github.com/apollographql/apollo-client/pull/11078) [`14edebe`](https://github.com/apollographql/apollo-client/commit/14edebebefb7634c32b921d02c1c85c6c8737989) Thanks [@phryneas](https://github.com/phryneas)! - ObservableQuery: prevent reporting results of previous queries if the variables changed since
|
|
317
|
+
|
|
318
|
+
- [#11439](https://github.com/apollographql/apollo-client/pull/11439) [`33454f0`](https://github.com/apollographql/apollo-client/commit/33454f0a40a05ea2b00633bda20a84d0ec3a4f4d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Address bundling issue introduced in [#11412](https://github.com/apollographql/apollo-client/pull/11412) where the `react/cache` internals ended up duplicated in the bundle. This was due to the fact that we had a `react/hooks` entrypoint that imported these files along with the newly introduced `createQueryPreloader` function, which lived outside of the `react/hooks` folder.
|
|
319
|
+
|
|
320
|
+
- [#11371](https://github.com/apollographql/apollo-client/pull/11371) [`ebd8fe2`](https://github.com/apollographql/apollo-client/commit/ebd8fe2c1b8b50bfeb2da20aeca5671300fb5564) Thanks [@phryneas](https://github.com/phryneas)! - Clarify types of `EntityStore.makeCacheKey`.
|
|
321
|
+
|
|
322
|
+
</details>
|
|
323
|
+
|
|
324
|
+
## 3.8.10
|
|
349
325
|
|
|
350
326
|
### Patch Changes
|
|
351
327
|
|
|
352
|
-
- [#
|
|
328
|
+
- [#11489](https://github.com/apollographql/apollo-client/pull/11489) [`abfd02a`](https://github.com/apollographql/apollo-client/commit/abfd02abeb8585e44377e9e87e5d20e5d95be002) Thanks [@gronxb](https://github.com/gronxb)! - Fix `networkStatus` with `useSuspenseQuery` not properly updating to ready state when using a `cache-and-network` fetch policy that returns data equal to what is already in the cache.
|
|
353
329
|
|
|
354
|
-
|
|
330
|
+
- [#11483](https://github.com/apollographql/apollo-client/pull/11483) [`6394dda`](https://github.com/apollographql/apollo-client/commit/6394dda47fa83d9ddd922e0d05e62bd872e4ea8e) Thanks [@pipopotamasu](https://github.com/pipopotamasu)! - Fix cache override warning output
|
|
355
331
|
|
|
356
|
-
|
|
332
|
+
## 3.8.9
|
|
357
333
|
|
|
358
|
-
|
|
334
|
+
### Patch Changes
|
|
359
335
|
|
|
360
|
-
|
|
336
|
+
- [#11472](https://github.com/apollographql/apollo-client/pull/11472) [`afc844d`](https://github.com/apollographql/apollo-client/commit/afc844dd8d6f9f7a3e2003f9a5b541291dfe3fb4) Thanks [@alessbell](https://github.com/alessbell)! - Fix delay: Infinity when set on a MockResponse passed to Mocked Provider so it indefinitely enters loading state.
|
|
361
337
|
|
|
362
|
-
|
|
338
|
+
- [#11464](https://github.com/apollographql/apollo-client/pull/11464) [`aac12b2`](https://github.com/apollographql/apollo-client/commit/aac12b221a6cb776d4941b6c8aadf04f0f0acd27) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent `useFragment` from excessively unsubscribing and resubscribing the fragment with the cache on every render.
|
|
339
|
+
|
|
340
|
+
- [#11449](https://github.com/apollographql/apollo-client/pull/11449) [`f40cda4`](https://github.com/apollographql/apollo-client/commit/f40cda45841e93b056c781c19651b54464f7346a) Thanks [@phryneas](https://github.com/phryneas)! - Removes refences to the typescript "dom" lib.
|
|
363
341
|
|
|
364
|
-
- [#
|
|
342
|
+
- [#11470](https://github.com/apollographql/apollo-client/pull/11470) [`e293bc9`](https://github.com/apollographql/apollo-client/commit/e293bc90d6f7937a6fc7c169f7b16eeb39d5fd49) Thanks [@phryneas](https://github.com/phryneas)! - Remove an unnecessary check from parseAndCheckHttpResponse.
|
|
365
343
|
|
|
366
|
-
|
|
344
|
+
## 3.8.8
|
|
367
345
|
|
|
368
|
-
|
|
346
|
+
### Patch Changes
|
|
347
|
+
|
|
348
|
+
- [#11200](https://github.com/apollographql/apollo-client/pull/11200) [`ae5091a21`](https://github.com/apollographql/apollo-client/commit/ae5091a21f0feff1486503071ea8dc002cf1be41) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Enable `strict` in tsconfig for the entire project.
|
|
349
|
+
|
|
350
|
+
- [#11332](https://github.com/apollographql/apollo-client/pull/11332) [`291aea56b`](https://github.com/apollographql/apollo-client/commit/291aea56bfaed3987a98be7fe4e6160114b62d2d) Thanks [@asvishnyakov](https://github.com/asvishnyakov)! - Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core
|
|
351
|
+
|
|
352
|
+
- [#10931](https://github.com/apollographql/apollo-client/pull/10931) [`e5acf910e`](https://github.com/apollographql/apollo-client/commit/e5acf910e39752b453540b6751046d1c19b66350) Thanks [@phryneas](https://github.com/phryneas)! - `useMutation`: also reset internal state on reset
|
|
369
353
|
|
|
370
354
|
## 3.8.7
|
|
371
355
|
|
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL.
|
|
13
13
|
|
|
14
|
+
| ☑️ Apollo Client User Survey |
|
|
15
|
+
| :----- |
|
|
16
|
+
| What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=Readme). Your responses will help us understand Apollo Client usage and allow us to serve you better. |
|
|
17
|
+
|
|
14
18
|
## Documentation
|
|
15
19
|
|
|
16
20
|
All Apollo Client documentation, including React integration articles and helpful recipes, can be found at: <br/>
|
package/apollo-client.cjs
CHANGED
|
@@ -33,7 +33,7 @@ var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
|
33
33
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
34
34
|
var React__namespace$1 = /*#__PURE__*/_interopNamespace(React$1);
|
|
35
35
|
|
|
36
|
-
var version = "3.9.
|
|
36
|
+
var version = "3.9.1";
|
|
37
37
|
|
|
38
38
|
function maybe(thunk) {
|
|
39
39
|
try {
|
|
@@ -6026,11 +6026,6 @@ var QueryManager = (function () {
|
|
|
6026
6026
|
if ((this.onBroadcast = onBroadcast)) {
|
|
6027
6027
|
this.mutationStore = Object.create(null);
|
|
6028
6028
|
}
|
|
6029
|
-
Object.defineProperty(this.inFlightLinkObservables, "get", {
|
|
6030
|
-
value: function () {
|
|
6031
|
-
throw new Error("This version of Apollo Client requires at least @apollo/experimental-nextjs-app-support version 0.5.2.");
|
|
6032
|
-
},
|
|
6033
|
-
});
|
|
6034
6029
|
}
|
|
6035
6030
|
QueryManager.prototype.stop = function () {
|
|
6036
6031
|
var _this = this;
|
|
@@ -6217,7 +6212,7 @@ var QueryManager = (function () {
|
|
|
6217
6212
|
}
|
|
6218
6213
|
}
|
|
6219
6214
|
if (cacheWrites.length > 0 ||
|
|
6220
|
-
mutation.refetchQueries ||
|
|
6215
|
+
(mutation.refetchQueries || "").length > 0 ||
|
|
6221
6216
|
mutation.update ||
|
|
6222
6217
|
mutation.onQueryUpdated ||
|
|
6223
6218
|
mutation.removeOptimistic) {
|