Skip to content

Commit

Permalink
remove deprecated watchFragment option, canonizeResults (#11949)
Browse files Browse the repository at this point in the history
* fix: remove deprecated watchFragment option canonizeResults

* chore: add changeset

* chore: update api-reports
  • Loading branch information
alessbell authored Jul 10, 2024
1 parent 3dd6432 commit 4528918
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 37 deletions.
2 changes: 0 additions & 2 deletions .api-reports/api-report-cache.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,6 @@ export type TypePolicy = {

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2231,8 +2231,6 @@ export interface UriFunction {

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2285,8 +2285,6 @@ TVariables

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1764,8 +1764,6 @@ interface UriFunction {

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_context.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1684,8 +1684,6 @@ interface UriFunction {

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_hoc.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1696,8 +1696,6 @@ interface UriFunction {

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_hooks.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2109,8 +2109,6 @@ export interface UseSuspenseQueryResult<TData = unknown, TVariables extends Oper

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_internal.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2127,8 +2127,6 @@ TVariables

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_ssr.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1669,8 +1669,6 @@ interface UriFunction {

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-testing.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1728,8 +1728,6 @@ export function wait(ms: number): Promise<void>;

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-testing_core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1685,8 +1685,6 @@ export function wait(ms: number): Promise<void>;

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-utilities.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2590,8 +2590,6 @@ export type VariableValue = (node: VariableNode) => any;

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2946,8 +2946,6 @@ TVariables

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
5 changes: 5 additions & 0 deletions .changeset/curly-vans-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Remove deprecated `watchFragment` option, `canonizeResults`
11 changes: 0 additions & 11 deletions src/cache/core/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ export interface WatchFragmentOptions<TData, TVars> {
* @docGroup 2. Cache options
*/
optimistic?: boolean;
/**
* @deprecated
* Using `canonizeResults` can result in memory leaks so we generally do not
* recommend using this option anymore.
* A future version of Apollo Client will contain a similar feature.
*
* Whether to canonize cache results before returning them. Canonization
* takes some extra time, but it speeds up future deep equality comparisons.
* Defaults to false.
*/
canonizeResults?: boolean;
}

/**
Expand Down

0 comments on commit 4528918

Please sign in to comment.