Skip to content

Commit 4528918

Browse files
authored
remove deprecated watchFragment option, canonizeResults (#11949)
* fix: remove deprecated watchFragment option canonizeResults * chore: add changeset * chore: update api-reports
1 parent 3dd6432 commit 4528918

15 files changed

+5
-37
lines changed

.api-reports/api-report-cache.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,6 @@ export type TypePolicy = {
976976

977977
// @public
978978
export interface WatchFragmentOptions<TData, TVars> {
979-
// @deprecated (undocumented)
980-
canonizeResults?: boolean;
981979
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
982980
fragmentName?: string;
983981
from: StoreObject | Reference | string;

.api-reports/api-report-core.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -2231,8 +2231,6 @@ export interface UriFunction {
22312231

22322232
// @public
22332233
export interface WatchFragmentOptions<TData, TVars> {
2234-
// @deprecated (undocumented)
2235-
canonizeResults?: boolean;
22362234
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
22372235
fragmentName?: string;
22382236
from: StoreObject | Reference | string;

.api-reports/api-report-react.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -2285,8 +2285,6 @@ TVariables
22852285

22862286
// @public
22872287
interface WatchFragmentOptions<TData, TVars> {
2288-
// @deprecated (undocumented)
2289-
canonizeResults?: boolean;
22902288
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
22912289
fragmentName?: string;
22922290
from: StoreObject | Reference | string;

.api-reports/api-report-react_components.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,6 @@ interface UriFunction {
17641764

17651765
// @public
17661766
interface WatchFragmentOptions<TData, TVars> {
1767-
// @deprecated (undocumented)
1768-
canonizeResults?: boolean;
17691767
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
17701768
fragmentName?: string;
17711769
from: StoreObject | Reference | string;

.api-reports/api-report-react_context.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1684,8 +1684,6 @@ interface UriFunction {
16841684

16851685
// @public
16861686
interface WatchFragmentOptions<TData, TVars> {
1687-
// @deprecated (undocumented)
1688-
canonizeResults?: boolean;
16891687
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
16901688
fragmentName?: string;
16911689
from: StoreObject | Reference | string;

.api-reports/api-report-react_hoc.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1696,8 +1696,6 @@ interface UriFunction {
16961696

16971697
// @public
16981698
interface WatchFragmentOptions<TData, TVars> {
1699-
// @deprecated (undocumented)
1700-
canonizeResults?: boolean;
17011699
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
17021700
fragmentName?: string;
17031701
from: StoreObject | Reference | string;

.api-reports/api-report-react_hooks.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -2109,8 +2109,6 @@ export interface UseSuspenseQueryResult<TData = unknown, TVariables extends Oper
21092109

21102110
// @public
21112111
interface WatchFragmentOptions<TData, TVars> {
2112-
// @deprecated (undocumented)
2113-
canonizeResults?: boolean;
21142112
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
21152113
fragmentName?: string;
21162114
from: StoreObject | Reference | string;

.api-reports/api-report-react_internal.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -2127,8 +2127,6 @@ TVariables
21272127

21282128
// @public
21292129
interface WatchFragmentOptions<TData, TVars> {
2130-
// @deprecated (undocumented)
2131-
canonizeResults?: boolean;
21322130
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
21332131
fragmentName?: string;
21342132
from: StoreObject | Reference | string;

.api-reports/api-report-react_ssr.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1669,8 +1669,6 @@ interface UriFunction {
16691669

16701670
// @public
16711671
interface WatchFragmentOptions<TData, TVars> {
1672-
// @deprecated (undocumented)
1673-
canonizeResults?: boolean;
16741672
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
16751673
fragmentName?: string;
16761674
from: StoreObject | Reference | string;

.api-reports/api-report-testing.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1728,8 +1728,6 @@ export function wait(ms: number): Promise<void>;
17281728

17291729
// @public
17301730
interface WatchFragmentOptions<TData, TVars> {
1731-
// @deprecated (undocumented)
1732-
canonizeResults?: boolean;
17331731
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
17341732
fragmentName?: string;
17351733
from: StoreObject | Reference | string;

.api-reports/api-report-testing_core.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1685,8 +1685,6 @@ export function wait(ms: number): Promise<void>;
16851685

16861686
// @public
16871687
interface WatchFragmentOptions<TData, TVars> {
1688-
// @deprecated (undocumented)
1689-
canonizeResults?: boolean;
16901688
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
16911689
fragmentName?: string;
16921690
from: StoreObject | Reference | string;

.api-reports/api-report-utilities.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -2590,8 +2590,6 @@ export type VariableValue = (node: VariableNode) => any;
25902590

25912591
// @public
25922592
interface WatchFragmentOptions<TData, TVars> {
2593-
// @deprecated (undocumented)
2594-
canonizeResults?: boolean;
25952593
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
25962594
fragmentName?: string;
25972595
from: StoreObject | Reference | string;

.api-reports/api-report.api.md

-2
Original file line numberDiff line numberDiff line change
@@ -2946,8 +2946,6 @@ TVariables
29462946

29472947
// @public
29482948
export interface WatchFragmentOptions<TData, TVars> {
2949-
// @deprecated (undocumented)
2950-
canonizeResults?: boolean;
29512949
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
29522950
fragmentName?: string;
29532951
from: StoreObject | Reference | string;

.changeset/curly-vans-draw.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
Remove deprecated `watchFragment` option, `canonizeResults`

src/cache/core/cache.ts

-11
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,6 @@ export interface WatchFragmentOptions<TData, TVars> {
6969
* @docGroup 2. Cache options
7070
*/
7171
optimistic?: boolean;
72-
/**
73-
* @deprecated
74-
* Using `canonizeResults` can result in memory leaks so we generally do not
75-
* recommend using this option anymore.
76-
* A future version of Apollo Client will contain a similar feature.
77-
*
78-
* Whether to canonize cache results before returning them. Canonization
79-
* takes some extra time, but it speeds up future deep equality comparisons.
80-
* Defaults to false.
81-
*/
82-
canonizeResults?: boolean;
8372
}
8473

8574
/**

0 commit comments

Comments
 (0)