Skip to content

Commit

Permalink
deprecate canonizeResults (#11435)
Browse files Browse the repository at this point in the history
* deprecate `canonizeResults`
  • Loading branch information
phryneas committed Dec 18, 2023
1 parent 58db5c3 commit 5cce53e
Show file tree
Hide file tree
Showing 24 changed files with 176 additions and 52 deletions.
8 changes: 5 additions & 3 deletions .api-reports/api-report-cache.md
Expand Up @@ -129,7 +129,7 @@ namespace Cache_2 {
}
// (undocumented)
interface ReadOptions<TVariables = any, TData = any> extends DataProxy.Query<TVariables, TData> {
// (undocumented)
// @deprecated (undocumented)
canonizeResults?: boolean;
// (undocumented)
optimistic: boolean;
Expand Down Expand Up @@ -234,12 +234,14 @@ export namespace DataProxy {
}
// (undocumented)
export interface ReadFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData> {
// @deprecated (undocumented)
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
}
// (undocumented)
export interface ReadQueryOptions<TData, TVariables> extends Query<TVariables, TData> {
// @deprecated
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand Down Expand Up @@ -580,7 +582,7 @@ export class InMemoryCache extends ApolloCache<NormalizedCacheObject> {

// @public (undocumented)
export interface InMemoryCacheConfig extends ApolloReducerConfig {
// (undocumented)
// @deprecated (undocumented)
canonizeResults?: boolean;
// (undocumented)
fragments?: FragmentRegistryAPI;
Expand Down Expand Up @@ -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)

Expand Down
14 changes: 9 additions & 5 deletions .api-reports/api-report-core.md
Expand Up @@ -336,7 +336,7 @@ namespace Cache_2 {
}
// (undocumented)
interface ReadOptions<TVariables = any, TData = any> extends DataProxy.Query<TVariables, TData> {
// (undocumented)
// @deprecated (undocumented)
canonizeResults?: boolean;
// (undocumented)
optimistic: boolean;
Expand Down Expand Up @@ -482,12 +482,14 @@ export namespace DataProxy {
}
// (undocumented)
export interface ReadFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData> {
// @deprecated (undocumented)
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
}
// (undocumented)
export interface ReadQueryOptions<TData, TVariables> extends Query<TVariables, TData> {
// @deprecated
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand Down Expand Up @@ -1101,7 +1103,7 @@ export class InMemoryCache extends ApolloCache<NormalizedCacheObject> {

// @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
//
Expand Down Expand Up @@ -1831,6 +1833,7 @@ class QueryManager<TStore> {

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated (undocumented)
canonizeResults?: boolean;
context?: DefaultContext;
errorPolicy?: ErrorPolicy;
Expand Down Expand Up @@ -2158,6 +2161,7 @@ export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

// @public
export interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any> {
// @deprecated (undocumented)
canonizeResults?: boolean;
context?: DefaultContext;
errorPolicy?: ErrorPolicy;
Expand Down Expand Up @@ -2212,14 +2216,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)
Expand Down
13 changes: 9 additions & 4 deletions .api-reports/api-report-react.md
Expand Up @@ -456,7 +456,7 @@ namespace Cache_2 {
}
// (undocumented)
interface ReadOptions<TVariables = any, TData = any> extends DataProxy.Query<TVariables, TData> {
// (undocumented)
// @deprecated (undocumented)
canonizeResults?: boolean;
// (undocumented)
optimistic: boolean;
Expand Down Expand Up @@ -585,6 +585,7 @@ namespace DataProxy {
//
// (undocumented)
interface ReadFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData> {
// @deprecated (undocumented)
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand All @@ -593,6 +594,7 @@ namespace DataProxy {
//
// (undocumented)
interface ReadQueryOptions<TData, TVariables> extends Query<TVariables, TData> {
// @deprecated
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand Down Expand Up @@ -1060,6 +1062,7 @@ export type LoadableQueryHookFetchPolicy = Extract<WatchQueryFetchPolicy, "cache

// @public (undocumented)
export interface LoadableQueryHookOptions {
// @deprecated (undocumented)
canonizeResults?: boolean;
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient"
client?: ApolloClient<any>;
Expand Down Expand Up @@ -1751,6 +1754,7 @@ class QueryManager<TStore> {

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @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"
Expand Down Expand Up @@ -2371,6 +2375,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

// @public
interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any> {
// @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"
Expand All @@ -2394,7 +2399,7 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar

// 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
Expand All @@ -2410,8 +2415,8 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// 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/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
// src/react/hooks/useLoadableQuery.ts:50:5 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 8 additions & 4 deletions .api-reports/api-report-react_components.md
Expand Up @@ -409,7 +409,7 @@ namespace Cache_2 {
}
// (undocumented)
interface ReadOptions<TVariables = any, TData = any> extends DataProxy.Query<TVariables, TData> {
// (undocumented)
// @deprecated (undocumented)
canonizeResults?: boolean;
// (undocumented)
optimistic: boolean;
Expand Down Expand Up @@ -526,6 +526,7 @@ namespace DataProxy {
//
// (undocumented)
interface ReadFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData> {
// @deprecated (undocumented)
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand All @@ -534,6 +535,7 @@ namespace DataProxy {
//
// (undocumented)
interface ReadQueryOptions<TData, TVariables> extends Query<TVariables, TData> {
// @deprecated
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand Down Expand Up @@ -1445,6 +1447,7 @@ class QueryManager<TStore> {

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @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"
Expand Down Expand Up @@ -1724,6 +1727,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

// @public
interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any> {
// @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"
Expand All @@ -1748,7 +1752,7 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar

// 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
Expand All @@ -1764,8 +1768,8 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// 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)

Expand Down
12 changes: 8 additions & 4 deletions .api-reports/api-report-react_context.md
Expand Up @@ -392,7 +392,7 @@ namespace Cache_2 {
}
// (undocumented)
interface ReadOptions<TVariables = any, TData = any> extends DataProxy.Query<TVariables, TData> {
// (undocumented)
// @deprecated (undocumented)
canonizeResults?: boolean;
// (undocumented)
optimistic: boolean;
Expand Down Expand Up @@ -509,6 +509,7 @@ namespace DataProxy {
//
// (undocumented)
interface ReadFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData> {
// @deprecated (undocumented)
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand All @@ -517,6 +518,7 @@ namespace DataProxy {
//
// (undocumented)
interface ReadQueryOptions<TData, TVariables> extends Query<TVariables, TData> {
// @deprecated
canonizeResults?: boolean;
optimistic?: boolean;
returnPartialData?: boolean;
Expand Down Expand Up @@ -1353,6 +1355,7 @@ class QueryManager<TStore> {

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @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"
Expand Down Expand Up @@ -1620,6 +1623,7 @@ type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

// @public
interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any> {
// @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"
Expand All @@ -1644,7 +1648,7 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar

// 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
Expand All @@ -1660,8 +1664,8 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// 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)

Expand Down

0 comments on commit 5cce53e

Please sign in to comment.