From bbeb330c02cb6875ed99b4def966ca22f4f80420 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Fri, 20 Dec 2024 09:52:00 -0700 Subject: [PATCH] Allow for FragmentType --- src/react/hooks/useSuspenseFragment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/react/hooks/useSuspenseFragment.ts b/src/react/hooks/useSuspenseFragment.ts index e3bd085ac7..de498328ec 100644 --- a/src/react/hooks/useSuspenseFragment.ts +++ b/src/react/hooks/useSuspenseFragment.ts @@ -1,6 +1,5 @@ import type { ApolloClient, - MaybeMasked, OperationVariables, Reference, StoreObject, @@ -13,6 +12,7 @@ import React, { useMemo } from "rehackt"; import type { FragmentKey } from "../internal/cache/types.js"; import { __use } from "./internal/__use.js"; import { wrapHook } from "./internal/index.js"; +import type { FragmentType, MaybeMasked } from "../../masking/index.js"; export interface UseSuspenseFragmentOptions extends Omit< @@ -23,7 +23,7 @@ export interface UseSuspenseFragmentOptions Cache.ReadFragmentOptions, "id" | "variables" | "returnPartialData" > { - from: StoreObject | Reference | string | null; + from: StoreObject | Reference | FragmentType> | string | null; // Override this field to make it optional (default: true). optimistic?: boolean; /**