Skip to content

Commit

Permalink
API updates for this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Sep 14, 2023
1 parent 4aa485b commit 1e7c5c6
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 181 deletions.
4 changes: 2 additions & 2 deletions .api-reports/api-report-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace Cache_2 {
// (undocumented)
interface BatchOptions<TCache extends ApolloCache<any>, TUpdateResult = void> {
// (undocumented)
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff: Cache_2.DiffResult<any> | undefined) => any;
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff?: Cache_2.DiffResult<any> | undefined) => any;
// (undocumented)
optimistic?: string | boolean;
// (undocumented)
Expand Down Expand Up @@ -885,7 +885,7 @@ export type StoreValue = number | string | string[] | Reference | Reference[] |
class Stump extends Layer {
constructor(root: EntityStore.Root);
// (undocumented)
merge(): any;
merge(older: string | StoreObject, newer: string | StoreObject): void;
// (undocumented)
removeLayer(): this;
}
Expand Down
34 changes: 15 additions & 19 deletions .api-reports/api-report-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ namespace Cache_2 {
// (undocumented)
interface BatchOptions<TCache extends ApolloCache<any>, TUpdateResult = void> {
// (undocumented)
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff: Cache_2.DiffResult<any> | undefined) => any;
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff?: Cache_2.DiffResult<any> | undefined) => any;
// (undocumented)
optimistic?: string | boolean;
// (undocumented)
Expand Down Expand Up @@ -426,7 +426,7 @@ class Concast<T> extends Observable<T> {
// (undocumented)
cancel: (reason: any) => void;
// (undocumented)
readonly promise: Promise<T>;
readonly promise: Promise<T | undefined>;
// (undocumented)
removeObserver(observer: Observer<T>): void;
}
Expand Down Expand Up @@ -922,8 +922,6 @@ export class HttpLink extends ApolloLink {
constructor(options?: HttpOptions);
// (undocumented)
options: HttpOptions;
// (undocumented)
requester: RequestHandler;
}

// @public (undocumented)
Expand Down Expand Up @@ -1157,15 +1155,13 @@ class LocalState<TCacheShape> {
// Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts
constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions<TCacheShape>);
// (undocumented)
addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{
[x: string]: any;
}>;
addExportedVariables<TVars extends OperationVariables>(document: DocumentNode, variables?: TVars, context?: {}): Promise<TVars>;
// (undocumented)
addResolvers(resolvers: Resolvers | Resolvers[]): void;
// (undocumented)
clientQuery(document: DocumentNode): DocumentNode | null;
// (undocumented)
getFragmentMatcher(): FragmentMatcher;
getFragmentMatcher(): FragmentMatcher | undefined;
// (undocumented)
getResolvers(): Resolvers;
// (undocumented)
Expand Down Expand Up @@ -1548,7 +1544,7 @@ export type OptimisticStoreItem = {
};

// @public (undocumented)
type OptionsUnion<TData, TVariables extends OperationVariables, TContext> = WatchQueryOptions<TVariables, TData> | QueryOptions<TVariables, TData> | MutationOptions<TData, TVariables, TContext>;
type OptionsUnion<TData, TVariables extends OperationVariables, TContext> = WatchQueryOptions<TVariables, TData> | QueryOptions<TVariables, TData> | MutationOptions<TData, TVariables, TContext, any>;

// @public (undocumented)
export function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise<any>;
Expand Down Expand Up @@ -1628,7 +1624,7 @@ class QueryInfo {
document: DocumentNode;
variables: Record<string, any> | undefined;
networkStatus?: NetworkStatus;
observableQuery?: ObservableQuery<any>;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
Expand All @@ -1650,7 +1646,7 @@ class QueryInfo {
// (undocumented)
notify(): void;
// (undocumented)
readonly observableQuery: ObservableQuery<any> | null;
readonly observableQuery: ObservableQuery<any, any> | null;
// (undocumented)
readonly queryId: string;
// (undocumented)
Expand All @@ -1660,7 +1656,7 @@ class QueryInfo {
// (undocumented)
setDiff(diff: Cache_2.DiffResult<any> | null): void;
// (undocumented)
setObservableQuery(oq: ObservableQuery<any> | null): void;
setObservableQuery(oq: ObservableQuery<any, any> | null): void;
// (undocumented)
stop(): void;
// (undocumented)
Expand Down Expand Up @@ -1936,7 +1932,7 @@ export interface Resolvers {
//
// @public (undocumented)
export function rewriteURIForGET(chosenURI: string, body: Body_2): {
parseError: any;
parseError: unknown;
newURI?: undefined;
} | {
newURI: string;
Expand Down Expand Up @@ -2017,7 +2013,7 @@ export type StoreValue = number | string | string[] | Reference | Reference[] |
class Stump extends Layer {
constructor(root: EntityStore.Root);
// (undocumented)
merge(): any;
merge(older: string | StoreObject, newer: string | StoreObject): void;
// (undocumented)
removeLayer(): this;
}
Expand Down Expand Up @@ -2183,11 +2179,11 @@ interface WriteContext extends ReadMergeModifyContext {
// src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts
// src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts
// 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: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/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:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:379: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
4 changes: 1 addition & 3 deletions .api-reports/api-report-link_http.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ export class HttpLink extends ApolloLink {
constructor(options?: HttpOptions);
// (undocumented)
options: HttpOptions;
// (undocumented)
requester: RequestHandler;
}

// @public (undocumented)
Expand Down Expand Up @@ -278,7 +276,7 @@ type RequestHandler = (operation: Operation, forward: NextLink) => Observable<Fe
//
// @public (undocumented)
export function rewriteURIForGET(chosenURI: string, body: Body_2): {
parseError: any;
parseError: unknown;
newURI?: undefined;
} | {
newURI: string;
Expand Down
30 changes: 14 additions & 16 deletions .api-reports/api-report-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ namespace Cache_2 {
// (undocumented)
interface BatchOptions<TCache extends ApolloCache<any>, TUpdateResult = void> {
// (undocumented)
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff: Cache_2.DiffResult<any> | undefined) => any;
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff?: Cache_2.DiffResult<any> | undefined) => any;
// (undocumented)
optimistic?: string | boolean;
// (undocumented)
Expand Down Expand Up @@ -547,7 +547,7 @@ class Concast<T> extends Observable<T> {
// (undocumented)
cancel: (reason: any) => void;
// (undocumented)
readonly promise: Promise<T>;
readonly promise: Promise<T | undefined>;
// (undocumented)
removeObserver(observer: Observer<T>): void;
}
Expand Down Expand Up @@ -1016,15 +1016,13 @@ class LocalState<TCacheShape> {
// Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts
constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions<TCacheShape>);
// (undocumented)
addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{
[x: string]: any;
}>;
addExportedVariables<TVars extends OperationVariables>(document: DocumentNode, variables?: TVars, context?: {}): Promise<TVars>;
// (undocumented)
addResolvers(resolvers: Resolvers | Resolvers[]): void;
// (undocumented)
clientQuery(document: DocumentNode): DocumentNode | null;
// (undocumented)
getFragmentMatcher(): FragmentMatcher;
getFragmentMatcher(): FragmentMatcher | undefined;
// (undocumented)
getResolvers(): Resolvers;
// (undocumented)
Expand Down Expand Up @@ -1447,7 +1445,7 @@ class QueryInfo {
document: DocumentNode;
variables: Record<string, any> | undefined;
networkStatus?: NetworkStatus;
observableQuery?: ObservableQuery<any>;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
Expand All @@ -1471,7 +1469,7 @@ class QueryInfo {
// (undocumented)
notify(): void;
// (undocumented)
readonly observableQuery: ObservableQuery<any> | null;
readonly observableQuery: ObservableQuery<any, any> | null;
// (undocumented)
readonly queryId: string;
// (undocumented)
Expand All @@ -1481,7 +1479,7 @@ class QueryInfo {
// (undocumented)
setDiff(diff: Cache_2.DiffResult<any> | null): void;
// (undocumented)
setObservableQuery(oq: ObservableQuery<any> | null): void;
setObservableQuery(oq: ObservableQuery<any, any> | null): void;
// (undocumented)
stop(): void;
// (undocumented)
Expand Down Expand Up @@ -2218,18 +2216,18 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts
// src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts
// 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: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/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:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:379: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
// src/core/types.ts:205:5 - (ae-forgotten-export) The symbol "Resolver" 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/react/hooks/useBackgroundQuery.ts:24:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:25:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:26:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:27:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts
// src/utilities/graphql/DocumentTransform.ts:122:7 - (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)
Expand Down
26 changes: 12 additions & 14 deletions .api-reports/api-report-react_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ namespace Cache_2 {
// (undocumented)
interface BatchOptions<TCache extends ApolloCache<any>, TUpdateResult = void> {
// (undocumented)
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff: Cache_2.DiffResult<any> | undefined) => any;
onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult<any>, lastDiff?: Cache_2.DiffResult<any> | undefined) => any;
// (undocumented)
optimistic?: string | boolean;
// (undocumented)
Expand Down Expand Up @@ -484,7 +484,7 @@ class Concast<T> extends Observable<T> {
// (undocumented)
cancel: (reason: any) => void;
// (undocumented)
readonly promise: Promise<T>;
readonly promise: Promise<T | undefined>;
// (undocumented)
removeObserver(observer: Observer<T>): void;
}
Expand Down Expand Up @@ -812,15 +812,13 @@ class LocalState<TCacheShape> {
// Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts
constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions<TCacheShape>);
// (undocumented)
addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{
[x: string]: any;
}>;
addExportedVariables<TVars extends OperationVariables>(document: DocumentNode, variables?: TVars, context?: {}): Promise<TVars>;
// (undocumented)
addResolvers(resolvers: Resolvers | Resolvers[]): void;
// (undocumented)
clientQuery(document: DocumentNode): DocumentNode | null;
// (undocumented)
getFragmentMatcher(): FragmentMatcher;
getFragmentMatcher(): FragmentMatcher | undefined;
// (undocumented)
getResolvers(): Resolvers;
// (undocumented)
Expand Down Expand Up @@ -1249,7 +1247,7 @@ class QueryInfo {
document: DocumentNode;
variables: Record<string, any> | undefined;
networkStatus?: NetworkStatus;
observableQuery?: ObservableQuery<any>;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
Expand All @@ -1273,7 +1271,7 @@ class QueryInfo {
// (undocumented)
notify(): void;
// (undocumented)
readonly observableQuery: ObservableQuery<any> | null;
readonly observableQuery: ObservableQuery<any, any> | null;
// (undocumented)
readonly queryId: string;
// (undocumented)
Expand All @@ -1283,7 +1281,7 @@ class QueryInfo {
// (undocumented)
setDiff(diff: Cache_2.DiffResult<any> | null): void;
// (undocumented)
setObservableQuery(oq: ObservableQuery<any> | null): void;
setObservableQuery(oq: ObservableQuery<any, any> | null): void;
// (undocumented)
stop(): void;
// (undocumented)
Expand Down Expand Up @@ -1731,11 +1729,11 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts
// src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts
// 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: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/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:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:379: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 1e7c5c6

Please sign in to comment.