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
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -509,6 +509,19 @@ const client = new ApolloClient({
509
509
});
510
510
```
511
511
512
+
Additionally, you should enable the `TypeOverrides` for the `Defer20220824Handler`.
513
+
This will add the deferred chunk types to `ApolloLink.Result` and ensures that you handle incremental results correctly in custom links that might access `result` directly.
514
+
515
+
To do so, create a new `.d.ts` file in your project (e.g. `apollo-client.d.ts`) and add the following content:
Over time, we will introduce additional incremental handlers to support different proposals of the protocol.
@@ -517,19 +530,37 @@ Over time, we will introduce additional incremental handlers to support differen
517
530
518
531
## Enable data masking types
519
532
520
-
In Apollo Client 4, the data masking types are now pluggable to allow for more flexibility when working with different solutions like GraphQL Code Generator or `gql.tadqa` - all of which might have different typings for data masking.
533
+
In Apollo Client 4, the data masking types are now pluggable to allow for more flexibility when working with different solutions like GraphQL Code Generator or `gql.tadqa` - which might have different typings for data masking.
521
534
522
535
To configure the data masking types to be the same as they were in Apollo Client 3, create a `.d.ts` file in your project with the following content:
You can always combine multiple `TypeOverrides` of different kinds, so you can also combine this with the `Defer20220824Handler` type overrides from the previous section.
0 commit comments