diff --git a/.api-reports/api-report-react.api.md b/.api-reports/api-report-react.api.md index 9f6ff925885..132ab182b85 100644 --- a/.api-reports/api-report-react.api.md +++ b/.api-reports/api-report-react.api.md @@ -2238,7 +2238,7 @@ export function useSubscription(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; +export function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; // @public (undocumented) interface UseSuspenseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { diff --git a/.api-reports/api-report-react_hooks.api.md b/.api-reports/api-report-react_hooks.api.md index 15c11951d23..763ed0362d9 100644 --- a/.api-reports/api-report-react_hooks.api.md +++ b/.api-reports/api-report-react_hooks.api.md @@ -2071,7 +2071,7 @@ export function useSubscription(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; +export function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; // @public (undocumented) interface UseSuspenseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { diff --git a/.api-reports/api-report-react_internal.api.md b/.api-reports/api-report-react_internal.api.md index d870397734c..485141c4bdd 100644 --- a/.api-reports/api-report-react_internal.api.md +++ b/.api-reports/api-report-react_internal.api.md @@ -761,6 +761,13 @@ interface FieldSpecifier { variables?: Record; } +// @public (undocumented) +type FragmentCacheKey = [ +cacheId: string, +fragment: DocumentNode, +stringifiedVariables: string +]; + // @public (undocumented) interface FragmentKey { // (undocumented) @@ -1888,10 +1895,11 @@ class SuspenseCache { constructor(options?: SuspenseCacheOptions); // (undocumented) add(cacheKey: CacheKey, queryRef: InternalQueryReference): void; + // Warning: (ae-forgotten-export) The symbol "FragmentCacheKey" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FragmentReference" needs to be exported by the entry point index.d.ts // // (undocumented) - getFragmentRef(cacheKey: CacheKey, createObservable: () => Observable>): FragmentReference; + getFragmentRef(cacheKey: FragmentCacheKey, createObservable: () => Observable>): FragmentReference; // (undocumented) getQueryRef(cacheKey: CacheKey, createObservable: () => ObservableQuery): InternalQueryReference; } @@ -2118,6 +2126,26 @@ interface UseReadQueryResult { networkStatus: NetworkStatus; } +// Warning: (ae-forgotten-export) The symbol "UseSuspenseFragmentOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "UseSuspenseFragmentResult" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; + +// @public (undocumented) +interface UseSuspenseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { + client?: ApolloClient; + // (undocumented) + from: StoreObject | Reference | string; + // (undocumented) + optimistic?: boolean; +} + +// @public (undocumented) +type UseSuspenseFragmentResult = { + data: TData; +}; + // Warning: (ae-forgotten-export) The symbol "SuspenseQueryHookOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "UseSuspenseQueryResult" needs to be exported by the entry point index.d.ts // @@ -2245,6 +2273,10 @@ interface WrappableHooks { // // (undocumented) useReadQuery: typeof useReadQuery; + // Warning: (ae-forgotten-export) The symbol "useSuspenseFragment" needs to be exported by the entry point index.d.ts + // + // (undocumented) + useSuspenseFragment: typeof useSuspenseFragment; // Warning: (ae-forgotten-export) The symbol "useSuspenseQuery" needs to be exported by the entry point index.d.ts // // (undocumented) diff --git a/.api-reports/api-report.api.md b/.api-reports/api-report.api.md index 16b8bd29fab..1f5b973227a 100644 --- a/.api-reports/api-report.api.md +++ b/.api-reports/api-report.api.md @@ -2899,7 +2899,7 @@ export function useSubscription(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; +export function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; // @public (undocumented) interface UseSuspenseFragmentOptions extends Omit, NoInfer>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { diff --git a/.size-limits.json b/.size-limits.json index 12ee210460b..b17aafb386d 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,4 @@ { - "dist/apollo-client.min.cjs": 40532, + "dist/apollo-client.min.cjs": 40567, "import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 33060 }