diff --git a/.api-reports/api-report-cache.md b/.api-reports/api-report-cache.md index 8cd3cb53be1..55957897f33 100644 --- a/.api-reports/api-report-cache.md +++ b/.api-reports/api-report-cache.md @@ -129,7 +129,7 @@ namespace Cache_2 { } // (undocumented) interface ReadOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -234,12 +234,14 @@ export namespace DataProxy { } // (undocumented) export interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -580,7 +582,7 @@ export class InMemoryCache extends ApolloCache { // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) fragments?: FragmentRegistryAPI; @@ -971,7 +973,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-core.md b/.api-reports/api-report-core.md index 6d463558c91..8a21bd547e7 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -336,7 +336,7 @@ namespace Cache_2 { } // (undocumented) interface ReadOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -482,12 +482,14 @@ export namespace DataProxy { } // (undocumented) export interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1101,7 +1103,7 @@ export class InMemoryCache extends ApolloCache { // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts // @@ -1827,6 +1829,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; errorPolicy?: ErrorPolicy; @@ -2154,6 +2157,7 @@ export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public export interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; errorPolicy?: ErrorPolicy; @@ -2208,14 +2212,14 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:124:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:158:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:399:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:261:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:310:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:316:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-react.md b/.api-reports/api-report-react.md index 1dbb6cc93e9..83cf738894d 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -456,7 +456,7 @@ namespace Cache_2 { } // (undocumented) interface ReadOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -582,6 +582,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -590,6 +591,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1053,6 +1055,7 @@ export type LoadableQueryHookFetchPolicy = Extract; @@ -1699,6 +1702,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: Context; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -2292,6 +2296,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: Context; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -2315,7 +2320,7 @@ interface WatchQueryOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -526,6 +526,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -534,6 +535,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1441,6 +1443,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1720,6 +1723,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1744,7 +1748,7 @@ interface WatchQueryOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -509,6 +509,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -517,6 +518,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1349,6 +1351,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1616,6 +1619,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1640,7 +1644,7 @@ interface WatchQueryOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -508,6 +508,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -516,6 +517,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1418,6 +1420,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1644,6 +1647,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1685,7 +1689,7 @@ export function withSubscription extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -549,6 +549,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -557,6 +558,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1004,6 +1006,7 @@ type LoadableQueryHookFetchPolicy = Extract; @@ -1617,6 +1620,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -2183,6 +2187,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -2206,7 +2211,7 @@ interface WatchQueryOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -479,6 +479,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -487,6 +488,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1335,6 +1337,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1602,6 +1605,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1626,7 +1630,7 @@ interface WatchQueryOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -473,6 +473,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -481,6 +482,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1420,6 +1422,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1655,6 +1658,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1688,7 +1692,7 @@ export function withWarningSpy(it: (...args: TArgs // Warnings were encountered during analysis: // -// src/cache/core/types/DataProxy.ts:141:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts +// src/cache/core/types/DataProxy.ts:153:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:100:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts @@ -1704,8 +1708,8 @@ export function withWarningSpy(it: (...args: TArgs // src/core/types.ts:156:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts // src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:261:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:310:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:316:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-testing_core.md b/.api-reports/api-report-testing_core.md index aceb1813901..af37ebb00ca 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -349,7 +349,7 @@ namespace Cache_2 { } // (undocumented) interface ReadOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -472,6 +472,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -480,6 +481,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1377,6 +1379,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1612,6 +1615,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -1645,7 +1649,7 @@ export function withWarningSpy(it: (...args: TArgs // Warnings were encountered during analysis: // -// src/cache/core/types/DataProxy.ts:141:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts +// src/cache/core/types/DataProxy.ts:153:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:100:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts @@ -1661,8 +1665,8 @@ export function withWarningSpy(it: (...args: TArgs // src/core/types.ts:156:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts // src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:261:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:310:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:316:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-utilities.md b/.api-reports/api-report-utilities.md index 3c7390fc6c8..ed560c243e5 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -405,7 +405,7 @@ namespace Cache_2 { } // (undocumented) interface ReadOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -609,6 +609,7 @@ namespace DataProxy { // // (undocumented) interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -617,6 +618,7 @@ namespace DataProxy { // // (undocumented) interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1351,7 +1353,7 @@ class InMemoryCache extends ApolloCache { // // @public (undocumented) interface InMemoryCacheConfig extends ApolloReducerConfig { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts // @@ -2182,6 +2184,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -2560,6 +2563,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" @@ -2617,13 +2621,13 @@ interface WriteContext extends ReadMergeModifyContext { // Warnings were encountered during analysis: // -// src/cache/core/types/DataProxy.ts:141:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts +// src/cache/core/types/DataProxy.ts:153:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:57:3 - (ae-forgotten-export) The symbol "TypePolicy" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "FieldReadFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:163:3 - (ae-forgotten-export) The symbol "FieldMergeFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/writeToStore.ts:65:7 - (ae-forgotten-export) The symbol "MergeTree" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:71:3 - (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts @@ -2635,8 +2639,8 @@ interface WriteContext extends ReadMergeModifyContext { // src/core/types.ts:156:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts // src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:261:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:310:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:316:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts // src/utilities/graphql/storeUtils.ts:226:12 - (ae-forgotten-export) The symbol "storeKeyNameStringify" needs to be exported by the entry point index.d.ts // src/utilities/policies/pagination.ts:76:3 - (ae-forgotten-export) The symbol "TRelayEdge" needs to be exported by the entry point index.d.ts // src/utilities/policies/pagination.ts:77:3 - (ae-forgotten-export) The symbol "TRelayPageInfo" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 3892961f98a..9c7473ebd0e 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -438,7 +438,7 @@ namespace Cache_2 { } // (undocumented) interface ReadOptions extends DataProxy.Query { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // (undocumented) optimistic: boolean; @@ -589,12 +589,14 @@ export namespace DataProxy { } // (undocumented) export interface ReadFragmentOptions extends Fragment { + // @deprecated (undocumented) canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { + // @deprecated canonizeResults?: boolean; optimistic?: boolean; returnPartialData?: boolean; @@ -1287,7 +1289,7 @@ export class InMemoryCache extends ApolloCache { // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { - // (undocumented) + // @deprecated (undocumented) canonizeResults?: boolean; // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts // @@ -1469,6 +1471,7 @@ export type LoadableQueryHookFetchPolicy = Extract; context?: DefaultContext; @@ -2257,6 +2260,7 @@ class QueryManager { // @public interface QueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; errorPolicy?: ErrorPolicy; @@ -2938,6 +2942,7 @@ export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; // @public export interface WatchQueryOptions { + // @deprecated (undocumented) canonizeResults?: boolean; context?: DefaultContext; errorPolicy?: ErrorPolicy; @@ -2992,14 +2997,14 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:132:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:124:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:158:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:399:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:261:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:310:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts +// src/core/watchQueryOptions.ts:316:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts // src/react/hooks/useBackgroundQuery.ts:30:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts // src/react/hooks/useBackgroundQuery.ts:31:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts diff --git a/.changeset/tough-timers-begin.md b/.changeset/tough-timers-begin.md new file mode 100644 index 00000000000..53fac70e002 --- /dev/null +++ b/.changeset/tough-timers-begin.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": minor +--- + +Deprecates `canonizeResults`. + +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 without the risk of memory leaks. diff --git a/docs/shared/useBackgroundQuery-options.mdx b/docs/shared/useBackgroundQuery-options.mdx index eb0157d6fdd..d00042a9c98 100644 --- a/docs/shared/useBackgroundQuery-options.mdx +++ b/docs/shared/useBackgroundQuery-options.mdx @@ -89,6 +89,10 @@ If you're using [Apollo Link](/react/api/link/introduction/), this object is the +> **⚠️ 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 without the risk of memory leaks. + If `true`, result objects read from the cache will be _canonized_, which means deeply-equal objects will also be `===` (literally the same object), allowing much more efficient comparison of past/present results. The default value is `false`. diff --git a/docs/shared/useFragment-options.mdx b/docs/shared/useFragment-options.mdx index e3ca1c63e3b..75a9be37b48 100644 --- a/docs/shared/useFragment-options.mdx +++ b/docs/shared/useFragment-options.mdx @@ -108,6 +108,10 @@ Each key in the object corresponds to a variable name, and that key's value corr +> **⚠️ 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 without the risk of memory leaks. + If `true`, result objects read from the cache will be _canonized_, which means deeply-equal objects will also be `===` (literally the same object), allowing much more efficient comparison of past/present results. The default value is `false`. diff --git a/docs/shared/useSuspenseQuery-options.mdx b/docs/shared/useSuspenseQuery-options.mdx index c87dc25c544..38d6189d21f 100644 --- a/docs/shared/useSuspenseQuery-options.mdx +++ b/docs/shared/useSuspenseQuery-options.mdx @@ -84,6 +84,10 @@ If you're using [Apollo Link](/react/api/link/introduction/), this object is the +> **⚠️ 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 without the risk of memory leaks. + If `true`, result objects read from the cache will be _canonized_, which means deeply-equal objects will also be `===` (literally the same object), allowing much more efficient comparison of past/present results. The default value is `false`. diff --git a/docs/source/api/cache/InMemoryCache.mdx b/docs/source/api/cache/InMemoryCache.mdx index 0bd104013ee..0cae2424737 100644 --- a/docs/source/api/cache/InMemoryCache.mdx +++ b/docs/source/api/cache/InMemoryCache.mdx @@ -140,6 +140,10 @@ By specifying the ID of another cached object, you can query arbitrary cached da +> **⚠️ 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 without the risk of memory leaks. + If `true`, result objects read from the cache will be _canonized_, which means deeply-equal objects will also be `===` (literally the same object), allowing much more efficient comparison of past/present results. The default value is `false`. @@ -591,6 +595,10 @@ A map of any GraphQL variable names and values required by `fragment`. +> **⚠️ 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 without the risk of memory leaks. + If `true`, result objects read from the cache will be _canonized_, which means deeply-equal objects will also be `===` (literally the same object), allowing much more efficient comparison of past/present results. The default value is `false`. diff --git a/docs/source/api/react/hooks.mdx b/docs/source/api/react/hooks.mdx index 9466e50f24d..9a729b1c3a6 100644 --- a/docs/source/api/react/hooks.mdx +++ b/docs/source/api/react/hooks.mdx @@ -443,7 +443,6 @@ function useFragment< optimistic?: boolean; variables?: TVars; returnPartialData?: boolean; - canonizeResults?: boolean; }): UseFragmentResult {} ``` diff --git a/docs/source/caching/garbage-collection.mdx b/docs/source/caching/garbage-collection.mdx index b77643a255a..80fc7e768a8 100644 --- a/docs/source/caching/garbage-collection.mdx +++ b/docs/source/caching/garbage-collection.mdx @@ -33,6 +33,10 @@ cache.gc({ }) ``` +> **⚠️ Deprecation warning for `canonizeResults**: +> 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 without the risk of memory leaks. + These additional `cache.gc` options can be useful for investigating memory usage patterns or leaks. Before taking heap snapshots or recording allocation timelines, it's a good idea to force _JavaScript_ garbage collection using your browser's devtools, to ensure memory released by the cache has been fully collected and returned to the heap. ### Configuring garbage collection diff --git a/src/cache/core/types/Cache.ts b/src/cache/core/types/Cache.ts index 58835e6aca5..0fa70742e15 100644 --- a/src/cache/core/types/Cache.ts +++ b/src/cache/core/types/Cache.ts @@ -14,6 +14,13 @@ export namespace Cache { previousResult?: any; optimistic: boolean; returnPartialData?: 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 without + * the risk of memory leaks. + */ canonizeResults?: boolean; } diff --git a/src/cache/core/types/DataProxy.ts b/src/cache/core/types/DataProxy.ts index 6dbdf47b75d..d340f187d4e 100644 --- a/src/cache/core/types/DataProxy.ts +++ b/src/cache/core/types/DataProxy.ts @@ -69,6 +69,13 @@ export namespace DataProxy { */ 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 without + * the risk of memory leaks. + * * Whether to canonize cache results before returning them. Canonization * takes some extra time, but it speeds up future deep equality comparisons. * Defaults to false. @@ -90,6 +97,11 @@ export namespace DataProxy { */ 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. diff --git a/src/cache/inmemory/types.ts b/src/cache/inmemory/types.ts index 207a802feb4..bd05ff7aacf 100644 --- a/src/cache/inmemory/types.ts +++ b/src/cache/inmemory/types.ts @@ -119,6 +119,13 @@ export type ReadQueryOptions = { query: DocumentNode; variables?: Object; previousResult?: any; + /** + * @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 without + * the risk of memory leaks. + */ canonizeResults?: boolean; rootId?: string; config?: ApolloReducerConfig; @@ -143,6 +150,12 @@ export interface InMemoryCacheConfig extends ApolloReducerConfig { * TODO: write docs page, add link here */ resultCacheMaxSize?: number; + /** + * @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. + */ canonizeResults?: boolean; fragments?: FragmentRegistryAPI; } diff --git a/src/core/watchQueryOptions.ts b/src/core/watchQueryOptions.ts index fc722c5ed9c..c4844826c75 100644 --- a/src/core/watchQueryOptions.ts +++ b/src/core/watchQueryOptions.ts @@ -106,6 +106,12 @@ export interface QueryOptions { partialRefetch?: 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 without + * the risk of memory leaks. + * * Whether to canonize cache results before returning them. Canonization * takes some extra time, but it speeds up future deep equality comparisons. * Defaults to false. diff --git a/src/react/types/types.ts b/src/react/types/types.ts index f6f7af613aa..1d30b6f983b 100644 --- a/src/react/types/types.ts +++ b/src/react/types/types.ts @@ -197,6 +197,12 @@ export type LoadableQueryHookFetchPolicy = Extract< export interface LoadableQueryHookOptions { /** + * @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 without + * the risk of memory leaks. + * * Whether to canonize cache results before returning them. Canonization * takes some extra time, but it speeds up future deep equality comparisons. * Defaults to false.