Skip to content

Commit 9f7df9e

Browse files
committed
Adjust type for consistency
1 parent 7227ca4 commit 9f7df9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/ApolloClient.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { execute } from "@apollo/client/link";
1515
import type { ClientAwarenessLink } from "@apollo/client/link/client-awareness";
1616
import type { LocalState } from "@apollo/client/local-state";
1717
import type { MaybeMasked, Unmasked } from "@apollo/client/masking";
18+
import type { DeepPartial } from "@apollo/client/utilities";
1819
import { DocumentTransform } from "@apollo/client/utilities";
1920
import { __DEV__ } from "@apollo/client/utilities/environment";
2021
import type { VariablesOption } from "@apollo/client/utilities/internal";
@@ -1188,7 +1189,9 @@ export class ApolloClient {
11881189
| ApolloClient.ObservableFragment<Array<TData>> {
11891190
const dataMasking = this.queryManager.dataMasking;
11901191

1191-
const mask = (data: TData): TData => {
1192+
const mask = (
1193+
data: TData | DeepPartial<TData> | null
1194+
): TData | DeepPartial<TData> | null => {
11921195
// The transform will remove fragment spreads from the fragment
11931196
// document when dataMasking is enabled. The `mask` function
11941197
// remains to apply warnings to fragments marked as

0 commit comments

Comments
 (0)