You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/migrating/apollo-client-4-migration.mdx
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Apollo Client 3.14 introduces many deprecations and warnings that will help you
24
24
- Network errors are now passed through as-is without wrapping them in a separate error class, making them easier to debug
25
25
- TypeScript improvements
26
26
- The `variables` option used throughout various client APIs (e.g. `client.query` or `useQuery`) now requires that the `variables` option is provided if any variable is non-optional.
27
-
-return types are more precise, taking options into account - if you pass in the `returnPartialData` option, `data` on the return object will be `DeepPartial<TData>`
27
+
-Return types are more precise, taking options into account - if you pass in the `returnPartialData` option, `data` on the return object will be `DeepPartial<TData>`
28
28
- A new `dataState` property has been added that contains information about the state of the `data` property which can be used to accurately narrow down the type of `data`.
29
29
- Types are now generally colocated in a namespace with the API that owns them, making them more discoverable with clear ownership boundaries
30
30
- Selective core types, such as those used for data masking, can now be overridden to provide your own type implementations
To ease the migration process, we have provided a codemod that automatically updates your codebase.
63
63
64
-
This codemod consists of the following steps:
64
+
This codemod runs modifications in the following order:
65
65
66
66
<ol><li>
67
67
@@ -589,7 +589,9 @@ const client = new ApolloClient({
589
589
// ...
590
590
});
591
591
```
592
+
592
593
Previously, all Apollo Client instances were bundled with local state management functionality, even if you didn't use the `@client` directive. This change means local state management is now opt-in and reduces the size of your bundle when you aren't using this feature.
594
+
593
595
### Change `connectToDevTools`
594
596
595
597
The `connectToDevTools` option has been replaced with a new `devtools` option that contains an `enabled` property.
0 commit comments