Skip to content

Commit 079fe2e

Browse files
Split into separate paragraphs
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
1 parent b52bb8a commit 079fe2e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

docs/source/data/fragments.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,12 @@ You can use a technique called 'higher-kinded types' (HKT) to provide your own t
15591559
15601560
#### Example
15611561
1562-
Let's add our own type overrides for the `MaybeMasked` and `Unmasked` utility types. The `MaybeMasked` type is used throughout Apollo Client to conditionally return either the masked or unmasked type definition for a given type. The `Unmasked` type unwraps a masked type to its full result type and is used throughout Apollo Client where the full data type is needed for a given API (e.g. `client.writeQuery`).
1562+
Let's add our own type overrides for the `MaybeMasked` and `Unmasked` utility types.
1563+
1564+
The `MaybeMasked` type is used throughout Apollo Client to return the masked or unmasked type definition for a given type, assuming they have data masking types enabled and are "mask-able" - otherwise it will just return the "unmasked" type that is passed in.
1565+
(So when writing these types, you can assume that the user has data masking types enabled.)
1566+
1567+
The `Unmasked` type unwraps a masked type to its full result type and is used throughout Apollo Client where the full data type is needed for a given API (e.g. `client.writeQuery`).
15631568
15641569
For this example, we'll assume the operation types are generated using two variations:
15651570

0 commit comments

Comments
 (0)