@apollo/client 3.9.0-rc.0 → 3.9.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 +158 -170
- package/README.md +4 -0
- package/apollo-client.cjs +3 -2
- 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/cache/inmemory/writeToStore.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/core.cjs +1 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +1 -1
- 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 +18 -18
- 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 +2 -1
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/internal.cjs +2 -1
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +2 -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 -44
- 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/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,59 +1,95 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
-
## 3.9.0
|
|
3
|
+
## 3.9.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
#### Memory optimizations
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- [#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
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
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.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
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.
|
|
14
14
|
|
|
15
|
-
- [#
|
|
15
|
+
- [#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`.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
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.
|
|
18
18
|
|
|
19
|
-
- [#
|
|
19
|
+
- [#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.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
- [#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.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
- [#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
|
|
24
24
|
|
|
25
|
-
-
|
|
25
|
+
- use LRU `WeakCache` instead of `Map` to keep a limited number of parsed results
|
|
26
|
+
- cache is initiated lazily, only when needed
|
|
27
|
+
- expose `parse.resetCache()` method
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
in case the operation would get an additional subscriber at a later point in time.
|
|
29
|
-
In practice, this could lead to a memory leak (#11393) and did not serve any
|
|
30
|
-
further purpose, as the resulting observable would only be subscribed to by
|
|
31
|
-
Apollo Client itself, and only once - it would be wrapped in a `Concast` before
|
|
32
|
-
being exposed to the user, and that `Concast` would handle subscribers on its
|
|
33
|
-
own.
|
|
29
|
+
- [#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`
|
|
34
30
|
|
|
35
|
-
- [#
|
|
31
|
+
- [#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.
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
- [#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`
|
|
38
34
|
|
|
39
|
-
- [#
|
|
35
|
+
- [#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`
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
- [#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`
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
- [#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
|
|
44
40
|
|
|
45
|
-
-
|
|
41
|
+
- use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results
|
|
42
|
+
- hash cache is initiated lazily, only when needed
|
|
43
|
+
- expose `persistedLink.resetHashCache()` method
|
|
44
|
+
- reset hash cache if the upstream server reports it doesn't accept persisted queries
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
but we previously didn't have a @deprecated tag in the DocBlocks.
|
|
46
|
+
- [#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
|
|
49
47
|
|
|
50
|
-
- [#
|
|
48
|
+
- [#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)
|
|
51
49
|
|
|
52
|
-
- [#
|
|
50
|
+
- [#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
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
- [#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`
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
#### Suspense-enabled data fetching on user interaction with `useLoadableQuery`
|
|
55
|
+
|
|
56
|
+
- [#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`.
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
function App() {
|
|
60
|
+
const [loadQuery, queryRef, { refetch, fetchMore, reset }] =
|
|
61
|
+
useLoadableQuery(query, options);
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
<button onClick={() => loadQuery(variables)}>Load query</button>
|
|
66
|
+
<Suspense fallback={<SuspenseFallback />}>
|
|
67
|
+
{queryRef && <Child queryRef={queryRef} />}
|
|
68
|
+
</Suspense>
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function Child({ queryRef }) {
|
|
74
|
+
const { data } = useReadQuery(queryRef);
|
|
75
|
+
|
|
76
|
+
// ...
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Begin preloading outside of React with `createQueryPreloader`
|
|
81
|
+
|
|
82
|
+
- [#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.
|
|
83
|
+
|
|
84
|
+
#### Testing utility improvements
|
|
85
|
+
|
|
86
|
+
- [#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
|
|
87
|
+
|
|
88
|
+
- [#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
|
|
89
|
+
|
|
90
|
+
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.
|
|
91
|
+
|
|
92
|
+
#### New `useQueryRefHandlers` hook
|
|
57
93
|
|
|
58
94
|
- [#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.
|
|
59
95
|
|
|
@@ -65,6 +101,8 @@
|
|
|
65
101
|
}
|
|
66
102
|
```
|
|
67
103
|
|
|
104
|
+
#### Bail out of `optimisticResponse` updates with the `IGNORE` sentinel object
|
|
105
|
+
|
|
68
106
|
- [#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.
|
|
69
107
|
|
|
70
108
|
Consider this example:
|
|
@@ -109,8 +147,6 @@
|
|
|
109
147
|
|
|
110
148
|
The `IGNORE` sentinel can be destructured from the second parameter in the callback function signature passed to `optimisticResponse`.
|
|
111
149
|
|
|
112
|
-
- [#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.
|
|
113
|
-
|
|
114
150
|
```tsx
|
|
115
151
|
const preloadQuery = createQueryPreloader(client);
|
|
116
152
|
const queryRef = preloadQuery(QUERY, { variables, ...otherOptions });
|
|
@@ -130,130 +166,11 @@
|
|
|
130
166
|
}
|
|
131
167
|
```
|
|
132
168
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
```ts
|
|
136
|
-
useQuery(QUERY, {
|
|
137
|
-
pollInterval: 1000,
|
|
138
|
-
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
139
|
-
});
|
|
140
|
-
// or define it globally
|
|
141
|
-
new ApolloClient({
|
|
142
|
-
defaultOptions: {
|
|
143
|
-
watchQuery: {
|
|
144
|
-
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
- [#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`.
|
|
151
|
-
|
|
152
|
-
Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore.
|
|
153
|
-
A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
154
|
-
|
|
155
|
-
### Patch Changes
|
|
156
|
-
|
|
157
|
-
- [#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
|
|
158
|
-
|
|
159
|
-
- use LRU `WeakCache` instead of `WeakMap` to keep a limited number of hash results
|
|
160
|
-
- hash cache is initiated lazily, only when needed
|
|
161
|
-
- expose `persistedLink.resetHashCache()` method
|
|
162
|
-
- reset hash cache if the upstream server reports it doesn't accept persisted queries
|
|
163
|
-
|
|
164
|
-
- [#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
|
|
165
|
-
|
|
166
|
-
- [#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
|
|
167
|
-
|
|
168
|
-
## 3.9.0-alpha.5
|
|
169
|
-
|
|
170
|
-
### Minor Changes
|
|
171
|
-
|
|
172
|
-
- [#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.
|
|
173
|
-
|
|
174
|
-
#### Warning: requires `@apollo/experimental-nextjs-app-support` update
|
|
175
|
-
|
|
176
|
-
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.
|
|
177
|
-
|
|
178
|
-
- [#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`.
|
|
179
|
-
|
|
180
|
-
```tsx
|
|
181
|
-
function App() {
|
|
182
|
-
const [loadQuery, queryRef, { refetch, fetchMore, reset }] =
|
|
183
|
-
useLoadableQuery(query, options);
|
|
184
|
-
|
|
185
|
-
return (
|
|
186
|
-
<>
|
|
187
|
-
<button onClick={() => loadQuery(variables)}>Load query</button>
|
|
188
|
-
<Suspense fallback={<SuspenseFallback />}>
|
|
189
|
-
{queryRef && <Child queryRef={queryRef} />}
|
|
190
|
-
</Suspense>
|
|
191
|
-
</>
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function Child({ queryRef }) {
|
|
196
|
-
const { data } = useReadQuery(queryRef);
|
|
197
|
-
|
|
198
|
-
// ...
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Patch Changes
|
|
203
|
-
|
|
204
|
-
- [#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.
|
|
205
|
-
|
|
206
|
-
- [#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
|
|
207
|
-
|
|
208
|
-
- use LRU `WeakCache` instead of `Map` to keep a limited number of parsed results
|
|
209
|
-
- cache is initiated lazily, only when needed
|
|
210
|
-
- expose `parse.resetCache()` method
|
|
211
|
-
|
|
212
|
-
- [#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`
|
|
169
|
+
#### Network adapters for multipart subscriptions usage with Relay and urql
|
|
213
170
|
|
|
214
|
-
- [#
|
|
171
|
+
- [#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
|
|
215
172
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- [#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`
|
|
219
|
-
|
|
220
|
-
- [#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
|
|
221
|
-
|
|
222
|
-
- [#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`
|
|
223
|
-
|
|
224
|
-
- [#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`.
|
|
225
|
-
|
|
226
|
-
- [#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)
|
|
227
|
-
|
|
228
|
-
## 3.8.8
|
|
229
|
-
|
|
230
|
-
### Patch Changes
|
|
231
|
-
|
|
232
|
-
- [#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.
|
|
233
|
-
|
|
234
|
-
- [#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
|
|
235
|
-
|
|
236
|
-
- [#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
|
|
237
|
-
|
|
238
|
-
## 3.9.0-alpha.4
|
|
239
|
-
|
|
240
|
-
### Minor Changes
|
|
241
|
-
|
|
242
|
-
- [#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
|
|
243
|
-
the Next.js "edge" runtime we now use an external package to wrap `react` imports
|
|
244
|
-
instead of importing React directly.
|
|
245
|
-
|
|
246
|
-
### Patch Changes
|
|
247
|
-
|
|
248
|
-
- [#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`
|
|
249
|
-
|
|
250
|
-
## 3.9.0-alpha.3
|
|
251
|
-
|
|
252
|
-
### Minor Changes
|
|
253
|
-
|
|
254
|
-
- [#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
|
|
255
|
-
|
|
256
|
-
### Relay
|
|
173
|
+
##### Relay
|
|
257
174
|
|
|
258
175
|
```tsx
|
|
259
176
|
import { createFetchMultipartSubscription } from "@apollo/client/utilities/subscriptions/relay";
|
|
@@ -271,7 +188,7 @@
|
|
|
271
188
|
});
|
|
272
189
|
```
|
|
273
190
|
|
|
274
|
-
|
|
191
|
+
##### Urql
|
|
275
192
|
|
|
276
193
|
```tsx
|
|
277
194
|
import { createFetchMultipartSubscription } from "@apollo/client/utilities/subscriptions/urql";
|
|
@@ -292,12 +209,60 @@
|
|
|
292
209
|
});
|
|
293
210
|
```
|
|
294
211
|
|
|
295
|
-
|
|
212
|
+
#### `skipPollAttempt` callback function
|
|
296
213
|
|
|
297
|
-
- [#
|
|
214
|
+
- [#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.
|
|
298
215
|
|
|
299
|
-
|
|
300
|
-
|
|
216
|
+
```ts
|
|
217
|
+
useQuery(QUERY, {
|
|
218
|
+
pollInterval: 1000,
|
|
219
|
+
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
220
|
+
});
|
|
221
|
+
// or define it globally
|
|
222
|
+
new ApolloClient({
|
|
223
|
+
defaultOptions: {
|
|
224
|
+
watchQuery: {
|
|
225
|
+
skipPollAttempt: () => document.hidden, // or !document.hasFocus()
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
#### `QueryManager.inFlightLinkObservables` now uses a strong `Trie` as an internal data structure
|
|
232
|
+
|
|
233
|
+
- [#11345](https://github.com/apollographql/apollo-client/pull/11345) [`1759066`](https://github.com/apollographql/apollo-client/commit/1759066a8f9a204e49228568aef9446a64890ff3) Thanks [@phryneas](https://github.com/phryneas)!
|
|
234
|
+
|
|
235
|
+
##### Warning: requires `@apollo/experimental-nextjs-app-support` update
|
|
236
|
+
|
|
237
|
+
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.
|
|
238
|
+
|
|
239
|
+
<details open>
|
|
240
|
+
<summary><h4>More Minor Changes</h4></summary>
|
|
241
|
+
|
|
242
|
+
- [#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.
|
|
243
|
+
|
|
244
|
+
- [#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.
|
|
245
|
+
|
|
246
|
+
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.
|
|
247
|
+
|
|
248
|
+
- [#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.
|
|
249
|
+
|
|
250
|
+
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.
|
|
251
|
+
|
|
252
|
+
- [#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
|
|
253
|
+
the Next.js "edge" runtime we now use an external package to wrap `react` imports
|
|
254
|
+
instead of importing React directly.
|
|
255
|
+
|
|
256
|
+
- [#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`.
|
|
257
|
+
|
|
258
|
+
</details>
|
|
259
|
+
|
|
260
|
+
<details open>
|
|
261
|
+
<summary><h3>Patch Changes</h3></summary>
|
|
262
|
+
|
|
263
|
+
- [#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.
|
|
264
|
+
|
|
265
|
+
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.
|
|
301
266
|
|
|
302
267
|
```js
|
|
303
268
|
import { ApolloClient, createHttpLink, InMemoryCache } from "@apollo/client";
|
|
@@ -329,29 +294,52 @@
|
|
|
329
294
|
}
|
|
330
295
|
```
|
|
331
296
|
|
|
332
|
-
- [#
|
|
297
|
+
- [#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.
|
|
298
|
+
|
|
299
|
+
The HOC and render prop APIs have already been deprecated since 2020,
|
|
300
|
+
but we previously didn't have a `@deprecated` tag in the DocBlocks.
|
|
301
|
+
|
|
302
|
+
- [#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
|
|
333
303
|
|
|
334
|
-
|
|
304
|
+
- [#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)
|
|
305
|
+
|
|
306
|
+
- [#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
|
|
307
|
+
|
|
308
|
+
- [#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.
|
|
309
|
+
|
|
310
|
+
- [#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`.
|
|
311
|
+
|
|
312
|
+
</details>
|
|
313
|
+
|
|
314
|
+
## 3.8.10
|
|
335
315
|
|
|
336
316
|
### Patch Changes
|
|
337
317
|
|
|
338
|
-
- [#
|
|
318
|
+
- [#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.
|
|
339
319
|
|
|
340
|
-
|
|
320
|
+
- [#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
|
|
341
321
|
|
|
342
|
-
|
|
322
|
+
## 3.8.9
|
|
323
|
+
|
|
324
|
+
### Patch Changes
|
|
343
325
|
|
|
344
|
-
- [#
|
|
326
|
+
- [#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.
|
|
345
327
|
|
|
346
|
-
|
|
328
|
+
- [#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.
|
|
347
329
|
|
|
348
|
-
|
|
330
|
+
- [#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.
|
|
349
331
|
|
|
350
|
-
- [#
|
|
332
|
+
- [#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.
|
|
351
333
|
|
|
352
|
-
|
|
334
|
+
## 3.8.8
|
|
353
335
|
|
|
354
|
-
|
|
336
|
+
### Patch Changes
|
|
337
|
+
|
|
338
|
+
- [#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.
|
|
339
|
+
|
|
340
|
+
- [#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
|
|
341
|
+
|
|
342
|
+
- [#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
|
|
355
343
|
|
|
356
344
|
## 3.8.7
|
|
357
345
|
|
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.0
|
|
36
|
+
var version = "3.9.0";
|
|
37
37
|
|
|
38
38
|
function maybe(thunk) {
|
|
39
39
|
try {
|
|
@@ -8221,7 +8221,8 @@ var InternalQueryReference = (function () {
|
|
|
8221
8221
|
break;
|
|
8222
8222
|
}
|
|
8223
8223
|
default: {
|
|
8224
|
-
if (result.data === this.result.data
|
|
8224
|
+
if (result.data === this.result.data &&
|
|
8225
|
+
result.networkStatus === this.result.networkStatus) {
|
|
8225
8226
|
return;
|
|
8226
8227
|
}
|
|
8227
8228
|
if (result.data === void 0) {
|