Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated watchFragment option, canonizeResults #11949

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading