Skip to content

Commit

Permalink
Revert "Add a defaultContext property on ApolloClient (apollographql#…
Browse files Browse the repository at this point in the history
…11275)"

This reverts commit 3862f9b.
  • Loading branch information
Troyblants authored Nov 3, 2023
1 parent be2029b commit 320fe29
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 383 deletions.
14 changes: 4 additions & 10 deletions .api-reports/api-report-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ export class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -171,7 +169,6 @@ export type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<DefaultContext>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -1684,7 +1681,7 @@ export type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1695,7 +1692,6 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1706,8 +1702,6 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
readonly documentTransform: DocumentTransform;
Expand Down Expand Up @@ -2198,9 +2192,9 @@ interface WriteContext extends ReadMergeModifyContext {
// src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" 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

Expand Down
14 changes: 4 additions & 10 deletions .api-reports/api-report-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<Context>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -206,7 +204,6 @@ type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<Context>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -1511,7 +1508,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1522,7 +1519,6 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<Context>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1532,8 +1528,6 @@ class QueryManager<TStore> {
cache: ApolloCache<TStore>;
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<Context>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -2214,9 +2208,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts
// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts
// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
Expand Down
14 changes: 4 additions & 10 deletions .api-reports/api-report-react_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -205,7 +203,6 @@ type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<DefaultContext>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -1307,7 +1304,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1318,7 +1315,6 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1328,8 +1324,6 @@ class QueryManager<TStore> {
cache: ApolloCache<TStore>;
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -1746,9 +1740,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts
// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts
// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
Expand Down
14 changes: 4 additions & 10 deletions .api-reports/api-report-react_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -206,7 +204,6 @@ type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<DefaultContext>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -1217,7 +1214,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1228,7 +1225,6 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1238,8 +1234,6 @@ class QueryManager<TStore> {
cache: ApolloCache<TStore>;
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -1644,9 +1638,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts
// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts
// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
Expand Down
14 changes: 4 additions & 10 deletions .api-reports/api-report-react_hoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -205,7 +203,6 @@ type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<DefaultContext>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -1285,7 +1282,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1296,7 +1293,6 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1306,8 +1302,6 @@ class QueryManager<TStore> {
cache: ApolloCache<TStore>;
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -1688,9 +1682,9 @@ export function withSubscription<TProps extends TGraphQLVariables | {} = {}, TDa
// src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts
// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts
// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
Expand Down
Loading

0 comments on commit 320fe29

Please sign in to comment.