Skip to content

Commit

Permalink
QueryManager: require all options (#11920)
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas authored Jul 15, 2024
1 parent 4a6e86a commit 5da4b21
Show file tree
Hide file tree
Showing 21 changed files with 701 additions and 426 deletions.
48 changes: 32 additions & 16 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1762,19 +1762,8 @@ export type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
documentTransform?: DocumentTransform;
queryDeduplication?: boolean;
onBroadcast?: () => void;
ssrMode?: boolean;
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts
constructor(options: QueryManagerOptions<TStore>);
// (undocumented)
readonly assumeImmutableResults: boolean;
// (undocumented)
Expand Down Expand Up @@ -1803,6 +1792,8 @@ class QueryManager<TStore> {
//
// (undocumented)
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
// Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getLocalState(): LocalState<TStore>;
// (undocumented)
Expand Down Expand Up @@ -1879,6 +1870,32 @@ class QueryManager<TStore> {
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
}

// @public (undocumented)
interface QueryManagerOptions<TStore> {
// (undocumented)
assumeImmutableResults: boolean;
// (undocumented)
cache: ApolloCache<TStore>;
// (undocumented)
clientAwareness: Record<string, string>;
// (undocumented)
defaultContext: Partial<DefaultContext> | undefined;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
documentTransform: DocumentTransform | null | undefined;
// (undocumented)
link: ApolloLink;
// (undocumented)
localState: LocalState<TStore>;
// (undocumented)
onBroadcast: undefined | (() => void);
// (undocumented)
queryDeduplication: boolean;
// (undocumented)
ssrMode: boolean;
}

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated
Expand Down Expand Up @@ -2300,9 +2317,8 @@ interface WriteContext extends ReadMergeModifyContext {
// 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:116:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:117: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:391:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:138:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:382:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:275:2 - (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
48 changes: 32 additions & 16 deletions .api-reports/api-report-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1539,19 +1539,8 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
documentTransform?: DocumentTransform;
queryDeduplication?: boolean;
onBroadcast?: () => void;
ssrMode?: boolean;
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<Context>;
});
// Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts
constructor(options: QueryManagerOptions<TStore>);
// (undocumented)
readonly assumeImmutableResults: boolean;
// (undocumented)
Expand Down Expand Up @@ -1582,6 +1571,8 @@ class QueryManager<TStore> {
//
// (undocumented)
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
// Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getLocalState(): LocalState<TStore>;
// (undocumented)
Expand Down Expand Up @@ -1661,6 +1652,32 @@ class QueryManager<TStore> {
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
}

// @public (undocumented)
interface QueryManagerOptions<TStore> {
// (undocumented)
assumeImmutableResults: boolean;
// (undocumented)
cache: ApolloCache<TStore>;
// (undocumented)
clientAwareness: Record<string, string>;
// (undocumented)
defaultContext: Partial<Context> | undefined;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
documentTransform: DocumentTransform | null | undefined;
// (undocumented)
link: ApolloLink;
// (undocumented)
localState: LocalState<TStore>;
// (undocumented)
onBroadcast: undefined | (() => void);
// (undocumented)
queryDeduplication: boolean;
// (undocumented)
ssrMode: boolean;
}

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated
Expand Down Expand Up @@ -2325,9 +2342,8 @@ 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:116:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:117: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:391:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:138:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:382:7 - (ae-forgotten-export) The symbol "UpdateQueries" 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:203:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:275:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
Expand Down
48 changes: 32 additions & 16 deletions .api-reports/api-report-react_components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,19 +1353,8 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
documentTransform?: DocumentTransform;
queryDeduplication?: boolean;
onBroadcast?: () => void;
ssrMode?: boolean;
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts
constructor(options: QueryManagerOptions<TStore>);
// (undocumented)
readonly assumeImmutableResults: boolean;
// (undocumented)
Expand Down Expand Up @@ -1396,6 +1385,8 @@ class QueryManager<TStore> {
//
// (undocumented)
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
// Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getLocalState(): LocalState<TStore>;
// (undocumented)
Expand Down Expand Up @@ -1475,6 +1466,32 @@ class QueryManager<TStore> {
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
}

// @public (undocumented)
interface QueryManagerOptions<TStore> {
// (undocumented)
assumeImmutableResults: boolean;
// (undocumented)
cache: ApolloCache<TStore>;
// (undocumented)
clientAwareness: Record<string, string>;
// (undocumented)
defaultContext: Partial<DefaultContext> | undefined;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
documentTransform: DocumentTransform | null | undefined;
// (undocumented)
link: ApolloLink;
// (undocumented)
localState: LocalState<TStore>;
// (undocumented)
onBroadcast: undefined | (() => void);
// (undocumented)
queryDeduplication: boolean;
// (undocumented)
ssrMode: boolean;
}

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated
Expand Down Expand Up @@ -1804,9 +1821,8 @@ 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:116:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:117: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:391:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:138:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:382:7 - (ae-forgotten-export) The symbol "UpdateQueries" 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:203:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:275:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
Expand Down
48 changes: 32 additions & 16 deletions .api-reports/api-report-react_context.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1281,19 +1281,8 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
documentTransform?: DocumentTransform;
queryDeduplication?: boolean;
onBroadcast?: () => void;
ssrMode?: boolean;
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts
constructor(options: QueryManagerOptions<TStore>);
// (undocumented)
readonly assumeImmutableResults: boolean;
// (undocumented)
Expand Down Expand Up @@ -1324,6 +1313,8 @@ class QueryManager<TStore> {
//
// (undocumented)
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
// Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getLocalState(): LocalState<TStore>;
// (undocumented)
Expand Down Expand Up @@ -1403,6 +1394,32 @@ class QueryManager<TStore> {
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
}

// @public (undocumented)
interface QueryManagerOptions<TStore> {
// (undocumented)
assumeImmutableResults: boolean;
// (undocumented)
cache: ApolloCache<TStore>;
// (undocumented)
clientAwareness: Record<string, string>;
// (undocumented)
defaultContext: Partial<DefaultContext> | undefined;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
documentTransform: DocumentTransform | null | undefined;
// (undocumented)
link: ApolloLink;
// (undocumented)
localState: LocalState<TStore>;
// (undocumented)
onBroadcast: undefined | (() => void);
// (undocumented)
queryDeduplication: boolean;
// (undocumented)
ssrMode: boolean;
}

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated
Expand Down Expand Up @@ -1724,9 +1741,8 @@ 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:116:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:117: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:391:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:138:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:382:7 - (ae-forgotten-export) The symbol "UpdateQueries" 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:203:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:275:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
Expand Down
48 changes: 32 additions & 16 deletions .api-reports/api-report-react_hoc.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1326,19 +1326,8 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
documentTransform?: DocumentTransform;
queryDeduplication?: boolean;
onBroadcast?: () => void;
ssrMode?: boolean;
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts
constructor(options: QueryManagerOptions<TStore>);
// (undocumented)
readonly assumeImmutableResults: boolean;
// (undocumented)
Expand Down Expand Up @@ -1369,6 +1358,8 @@ class QueryManager<TStore> {
//
// (undocumented)
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
// Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getLocalState(): LocalState<TStore>;
// (undocumented)
Expand Down Expand Up @@ -1448,6 +1439,32 @@ class QueryManager<TStore> {
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
}

// @public (undocumented)
interface QueryManagerOptions<TStore> {
// (undocumented)
assumeImmutableResults: boolean;
// (undocumented)
cache: ApolloCache<TStore>;
// (undocumented)
clientAwareness: Record<string, string>;
// (undocumented)
defaultContext: Partial<DefaultContext> | undefined;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
documentTransform: DocumentTransform | null | undefined;
// (undocumented)
link: ApolloLink;
// (undocumented)
localState: LocalState<TStore>;
// (undocumented)
onBroadcast: undefined | (() => void);
// (undocumented)
queryDeduplication: boolean;
// (undocumented)
ssrMode: boolean;
}

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated
Expand Down Expand Up @@ -1751,9 +1768,8 @@ 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:116:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:117: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:391:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:138:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:382:7 - (ae-forgotten-export) The symbol "UpdateQueries" 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:203:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:275:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
Expand Down
Loading

0 comments on commit 5da4b21

Please sign in to comment.