Skip to content

Commit

Permalink
Allow for FragmentType
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Dec 20, 2024
1 parent b727b1d commit bbeb330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/react/hooks/useSuspenseFragment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {
ApolloClient,
MaybeMasked,
OperationVariables,
Reference,
StoreObject,
Expand All @@ -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<TData, TVars>
extends Omit<
Expand All @@ -23,7 +23,7 @@ export interface UseSuspenseFragmentOptions<TData, TVars>
Cache.ReadFragmentOptions<TData, TVars>,
"id" | "variables" | "returnPartialData"
> {
from: StoreObject | Reference | string | null;
from: StoreObject | Reference | FragmentType<NoInfer<TData>> | string | null;
// Override this field to make it optional (default: true).
optimistic?: boolean;
/**
Expand Down

0 comments on commit bbeb330

Please sign in to comment.