diff --git a/.api-reports/api-report-cache.md b/.api-reports/api-report-cache.md index 97cea465367..857db061da9 100644 --- a/.api-reports/api-report-cache.md +++ b/.api-reports/api-report-cache.md @@ -27,7 +27,6 @@ export abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -49,7 +48,6 @@ export abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -75,7 +73,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -219,40 +217,27 @@ export namespace DataProxy { }; // (undocumented) export interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) export interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // (undocumented) export interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) @@ -266,11 +251,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -278,15 +260,11 @@ export namespace DataProxy { } } -// @public (undocumented) +// @public export interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -472,7 +450,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -706,7 +684,7 @@ export type Modifiers = Record> = [FieldName in keyof T]: Modifier>>; }>; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -732,17 +710,14 @@ export interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -960,7 +935,7 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // 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/cache/inmemory/types.ts:132: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 fd6d4166e6f..2204a1a7244 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -44,7 +44,6 @@ export abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -66,7 +65,6 @@ export abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -86,97 +84,82 @@ export abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public export class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; constructor(options: ApolloClientOptions); // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // (undocumented) link: ApolloLink; - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; - // (undocumented) query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver subscribe(options: SubscriptionOptions): Observable>; // (undocumented) readonly typeDefs: ApolloClientOptions["typeDefs"]; // (undocumented) version: string; - // (undocumented) watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -export type ApolloClientOptions = { - uri?: string | UriFunction; +export interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) export class ApolloError extends Error { @@ -271,7 +254,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -449,7 +432,7 @@ export const concat: typeof ApolloLink.concat; // @public (undocumented) export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; -// @public (undocumented) +// @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; @@ -469,40 +452,27 @@ export namespace DataProxy { }; // (undocumented) export interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) export interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // (undocumented) export interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) @@ -516,11 +486,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -528,15 +495,11 @@ export namespace DataProxy { } } -// @public (undocumented) +// @public export interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -715,7 +678,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) @@ -787,7 +750,7 @@ export interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -862,7 +825,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -933,25 +896,15 @@ export class HttpLink extends ApolloLink { // @public (undocumented) export interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; - // (undocumented) print?: Printer; - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } @@ -1098,7 +1051,7 @@ const _invalidateModifier: unique symbol; // @public (undocumented) export function isApolloError(err: Error): err is ApolloError; -// @public (undocumented) +// @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; // @public (undocumented) @@ -1291,23 +1244,14 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // (undocumented) update?: MutationUpdaterFunction; - // (undocumented) updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1318,11 +1262,8 @@ export type MutationFetchPolicy = Extract = ApolloCache> extends MutationBaseOptions { - // (undocumented) fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1363,21 +1304,14 @@ export type MutationUpdaterFunction void; -// @public (undocumented) +// @public export enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1399,7 +1333,7 @@ export type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -1425,17 +1359,14 @@ export interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1479,7 +1410,6 @@ export class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1499,7 +1429,6 @@ export class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1776,7 +1705,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1788,27 +1716,17 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } export { QueryOptions as PureQueryOptions } @@ -2034,15 +1952,10 @@ export type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2130,18 +2043,22 @@ export interface UriFunction { // @public (undocumented) export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -export interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +export interface WatchQueryOptions { + canonizeResults?: boolean; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - // (undocumented) + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -2181,13 +2098,13 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // 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/cache/inmemory/types.ts:132: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: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/core/watchQueryOptions.ts:253: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 // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_batch-http.md b/.api-reports/api-report-link_batch-http.md index 0e39566b61a..084012f6684 100644 --- a/.api-reports/api-report-link_batch-http.md +++ b/.api-reports/api-report-link_batch-http.md @@ -60,7 +60,7 @@ export namespace BatchHttpLink { // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // -// @public (undocumented) +// @public export class BatchHttpLink extends ApolloLink { constructor(fetchParams?: BatchHttpLink.Options); // (undocumented) @@ -71,17 +71,11 @@ export class BatchHttpLink extends ApolloLink { namespace BatchLink { // (undocumented) interface Options { - // (undocumented) batchDebounce?: boolean; // Warning: (ae-forgotten-export) The symbol "BatchHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) batchHandler?: BatchHandler; - // (undocumented) batchInterval?: number; - // (undocumented) batchKey?: (operation: Operation) => string; - // (undocumented) batchMax?: number; } } @@ -161,29 +155,17 @@ interface GraphQLRequest> { // @public (undocumented) interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; // Warning: (ae-forgotten-export) The symbol "Printer" needs to be exported by the entry point index.d.ts - // - // (undocumented) print?: Printer; // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } diff --git a/.api-reports/api-report-link_batch.md b/.api-reports/api-report-link_batch.md index ecc43997ee7..7562ad80181 100644 --- a/.api-reports/api-report-link_batch.md +++ b/.api-reports/api-report-link_batch.md @@ -59,15 +59,10 @@ export type BatchHandler = (operations: Operation[], forward?: (NextLink | undef export namespace BatchLink { // (undocumented) export interface Options { - // (undocumented) batchDebounce?: boolean; - // (undocumented) batchHandler?: BatchHandler; - // (undocumented) batchInterval?: number; - // (undocumented) batchKey?: (operation: Operation) => string; - // (undocumented) batchMax?: number; } } diff --git a/.api-reports/api-report-link_error.md b/.api-reports/api-report-link_error.md index 71bb22bc33a..febf5b6be00 100644 --- a/.api-reports/api-report-link_error.md +++ b/.api-reports/api-report-link_error.md @@ -48,7 +48,6 @@ class ApolloLink { interface DefaultContext extends Record { } -// (undocumented) export interface ErrorHandler { // (undocumented) (error: ErrorResponse): Observable | void; @@ -56,7 +55,6 @@ export interface ErrorHandler { // @public (undocumented) export namespace ErrorLink { - // (undocumented) export interface ErrorHandler { // (undocumented) (error: ErrorResponse): Observable | void; diff --git a/.api-reports/api-report-link_http.md b/.api-reports/api-report-link_http.md index 8d6da95e4d4..2f059c22471 100644 --- a/.api-reports/api-report-link_http.md +++ b/.api-reports/api-report-link_http.md @@ -72,7 +72,7 @@ export type ClientParseError = InvariantError & { // @public (undocumented) export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; -// @public (undocumented) +// @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; @@ -185,25 +185,15 @@ export class HttpLink extends ApolloLink { // @public (undocumented) export interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; - // (undocumented) print?: Printer; - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } diff --git a/.api-reports/api-report-link_retry.md b/.api-reports/api-report-link_retry.md index a4ce34c4e29..1c3d0f2557d 100644 --- a/.api-reports/api-report-link_retry.md +++ b/.api-reports/api-report-link_retry.md @@ -48,7 +48,7 @@ class ApolloLink { interface DefaultContext extends Record { } -// @public (undocumented) +// @public interface DelayFunction { // (undocumented) (count: number, operation: Operation, error: any): number; @@ -56,11 +56,8 @@ interface DelayFunction { // @public (undocumented) interface DelayFunctionOptions { - // (undocumented) initial?: number; - // (undocumented) jitter?: boolean; - // (undocumented) max?: number; } @@ -167,7 +164,7 @@ type Path = ReadonlyArray; // @public (undocumented) type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public interface RetryFunction { // (undocumented) (count: number, operation: Operation, error: any): boolean | Promise; @@ -175,9 +172,7 @@ interface RetryFunction { // @public (undocumented) interface RetryFunctionOptions { - // (undocumented) max?: number; - // (undocumented) retryIf?: (error: any, operation: Operation) => boolean | Promise; } @@ -187,13 +182,9 @@ export namespace RetryLink { export interface Options { // Warning: (ae-forgotten-export) The symbol "RetryFunctionOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RetryFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) attempts?: RetryFunctionOptions | RetryFunction; // Warning: (ae-forgotten-export) The symbol "DelayFunctionOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DelayFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) delay?: DelayFunctionOptions | DelayFunction; } } diff --git a/.api-reports/api-report-link_schema.md b/.api-reports/api-report-link_schema.md index 676e4338cb9..31712ec362d 100644 --- a/.api-reports/api-report-link_schema.md +++ b/.api-reports/api-report-link_schema.md @@ -156,13 +156,9 @@ type RequestHandler = (operation: Operation, forward: NextLink) => Observable, TContext = DefaultC // @public (undocumented) export namespace WebSocketLink { - // (undocumented) export interface WebSocketParams { - // (undocumented) options?: ClientOptions; - // (undocumented) uri: string; - // (undocumented) webSocketImpl?: any; } } @@ -183,13 +179,9 @@ export class WebSocketLink extends ApolloLink { request(operation: Operation): Observable | null; } -// (undocumented) export interface WebSocketParams { - // (undocumented) options?: ClientOptions; - // (undocumented) uri: string; - // (undocumented) webSocketImpl?: any; } diff --git a/.api-reports/api-report-react.md b/.api-reports/api-report-react.md index a7a3937042d..e14e278cc70 100644 --- a/.api-reports/api-report-react.md +++ b/.api-reports/api-report-react.md @@ -40,7 +40,6 @@ abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -68,7 +67,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -90,40 +88,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -131,48 +124,30 @@ class ApolloClient implements DataProxy { link: ApolloLink; // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = Context, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -183,35 +158,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // Warning: (ae-forgotten-export) The symbol "ApolloConsumerProps" needs to be exported by the entry point index.d.ts // @@ -337,7 +318,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -355,7 +336,7 @@ export interface BackgroundQueryHookOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -577,44 +558,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -634,11 +602,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -648,15 +613,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -755,7 +716,7 @@ enum DocumentType_2 { } export { DocumentType_2 as DocumentType } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -821,7 +782,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -844,7 +805,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1007,7 +968,7 @@ export interface LazyQueryHookExecOptions extends Omit, "skip"> { } -// @public (undocumented) +// @public @deprecated (undocumented) export type LazyQueryResult = QueryResult; // @public (undocumented) @@ -1113,31 +1074,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1168,12 +1119,9 @@ export interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1231,21 +1179,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1267,7 +1208,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public export type NoInfer = [T][T extends any ? 0 : never]; // @public (undocumented) @@ -1302,7 +1243,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1322,7 +1262,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1493,7 +1432,7 @@ class QueryInfo { variables?: Record; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface QueryLazyOptions { // (undocumented) context?: Context; @@ -1612,7 +1551,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1624,31 +1562,25 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: Context; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector +// +// @public export interface QueryReference { // Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts // @@ -1679,7 +1611,7 @@ export interface QueryResult; -// @public (undocumented) +// @public @deprecated (undocumented) export type QueryTuple = LazyQueryResultTuple; // @public (undocumented) @@ -1792,7 +1724,7 @@ class RenderPromises { // @public (undocumented) type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public @deprecated (undocumented) export const resetApolloContext: typeof getApolloContext; // @public (undocumented) @@ -1896,15 +1828,12 @@ export interface SubscriptionHookOptions { - // (undocumented) context?: Context; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1929,7 +1858,7 @@ export interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2178,20 +2104,27 @@ export interface UseSuspenseQueryResult extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -2202,7 +2135,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -66,7 +65,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -88,40 +86,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -130,48 +123,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -182,35 +157,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -300,7 +281,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -351,11 +332,11 @@ interface BaseSubscriptionOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; // Warning: (ae-forgotten-export) The symbol "OnSubscriptionDataOptions" needs to be exported by the entry point index.d.ts // - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -512,44 +493,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -569,11 +537,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -583,15 +548,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -649,7 +610,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -702,7 +663,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -725,7 +686,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -926,31 +887,21 @@ export interface Mutation { // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -986,12 +937,9 @@ interface MutationFunctionOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1043,21 +991,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1115,7 +1056,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1135,7 +1075,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1408,7 +1347,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1420,27 +1358,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1633,15 +1563,12 @@ export interface SubscriptionComponentOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1710,20 +1637,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -1734,7 +1668,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -67,7 +66,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -89,40 +87,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -131,48 +124,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -183,35 +158,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) export const ApolloConsumer: React_2.FC; @@ -333,7 +314,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -497,44 +478,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -554,11 +522,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -568,15 +533,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -634,7 +595,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -687,7 +648,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -710,7 +671,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -899,31 +860,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -937,12 +888,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -978,21 +926,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1050,7 +991,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1070,7 +1010,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1318,7 +1257,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1330,27 +1268,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1468,7 +1398,7 @@ class RenderPromises { // @public (undocumented) type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public @deprecated (undocumented) export const resetApolloContext: typeof getApolloContext; // @public (undocumented) @@ -1543,15 +1473,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1608,20 +1535,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -1632,7 +1566,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -66,7 +65,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -88,40 +86,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -130,48 +123,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -182,35 +157,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -300,7 +281,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -495,44 +476,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -552,11 +520,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -566,15 +531,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -635,7 +596,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -697,7 +658,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -720,7 +681,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -921,31 +882,21 @@ export interface MutateProps = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -972,12 +923,9 @@ interface MutationFunctionOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1029,21 +977,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1101,7 +1042,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1121,7 +1061,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1386,7 +1325,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1398,27 +1336,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1564,15 +1494,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1635,20 +1562,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -1676,7 +1610,6 @@ export function withSubscription implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -63,7 +62,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -85,40 +83,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -127,48 +120,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -179,35 +154,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -297,7 +278,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -319,7 +300,7 @@ interface BackgroundQueryHookOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; // Warning: (ae-forgotten-export) The symbol "OnSubscriptionDataOptions" needs to be exported by the entry point index.d.ts // - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -541,44 +522,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -598,11 +566,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -612,15 +577,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -712,7 +673,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -778,7 +739,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -801,7 +762,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1061,31 +1022,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1109,12 +1060,9 @@ interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1175,21 +1123,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1211,7 +1152,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public type NoInfer = [T][T extends any ? 0 : never]; // @public (undocumented) @@ -1246,7 +1187,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1266,7 +1206,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1532,7 +1471,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1544,31 +1482,25 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector +// +// @public interface QueryReference { // Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts // @@ -1775,15 +1707,12 @@ interface SubscriptionHookOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1810,7 +1739,7 @@ interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2069,20 +1995,27 @@ export interface UseSuspenseQueryResult extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -2093,7 +2026,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -68,7 +67,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -90,40 +88,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -132,48 +125,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -184,35 +159,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -302,7 +283,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -468,44 +449,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -525,11 +493,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -539,15 +504,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -605,7 +566,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -658,7 +619,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -681,7 +642,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -886,31 +847,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -924,12 +875,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -965,21 +913,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1037,7 +978,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1057,7 +997,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1305,7 +1244,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1317,27 +1255,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1530,15 +1460,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1595,20 +1522,27 @@ interface UriFunction { // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // Warnings were encountered during analysis: @@ -1619,7 +1553,6 @@ interface WatchQueryOptions implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -64,7 +63,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -86,40 +84,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -128,48 +121,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -180,35 +155,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -298,7 +279,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -458,44 +439,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -515,11 +483,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -529,15 +494,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -595,7 +556,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -648,7 +609,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -671,7 +632,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -866,7 +827,6 @@ export interface MockedProviderProps { childProps?: object; // (undocumented) children?: any; - // (undocumented) connectToDevTools?: boolean; // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts // @@ -991,31 +951,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1029,12 +979,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1070,21 +1017,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1108,7 +1048,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1152,7 +1092,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1172,7 +1111,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1381,7 +1319,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1393,27 +1330,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1565,15 +1494,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1636,29 +1562,36 @@ export function wait(ms: number): Promise; // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } -// @public (undocumented) +// @public @deprecated (undocumented) export function withErrorSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withLogSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withWarningSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; // Warnings were encountered during analysis: @@ -1669,7 +1602,6 @@ export function withWarningSpy(it: (...args: TArgs // src/cache/core/types/common.ts:98:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:100: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: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 @@ -1680,7 +1612,7 @@ export function withWarningSpy(it: (...args: TArgs // 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/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" 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) diff --git a/.api-reports/api-report-testing_core.md b/.api-reports/api-report-testing_core.md index 717e6e70674..01cd92a9a0e 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -35,7 +35,6 @@ abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -63,7 +62,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -85,40 +83,35 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - // - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -127,48 +120,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "Observable" subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -179,35 +154,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -297,7 +278,7 @@ type ApolloQueryResult = { partial?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -457,44 +438,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -514,11 +482,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -528,15 +493,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -594,7 +555,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -647,7 +608,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts @@ -670,7 +631,7 @@ interface FieldSpecifier { variables?: Record; } -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -945,31 +906,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -983,12 +934,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1024,21 +972,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1062,7 +1003,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1106,7 +1047,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1126,7 +1066,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -1337,7 +1276,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -1349,27 +1287,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -1521,15 +1451,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -1592,29 +1519,36 @@ export function wait(ms: number): Promise; // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } -// @public (undocumented) +// @public @deprecated (undocumented) export function withErrorSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withLogSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; -// @public (undocumented) +// @public @deprecated (undocumented) export function withWarningSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; // Warnings were encountered during analysis: @@ -1625,7 +1559,6 @@ export function withWarningSpy(it: (...args: TArgs // src/cache/core/types/common.ts:98:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts // src/cache/core/types/common.ts:100: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: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 @@ -1636,7 +1569,7 @@ export function withWarningSpy(it: (...args: TArgs // 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/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" 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) diff --git a/.api-reports/api-report-utilities.md b/.api-reports/api-report-utilities.md index 3b3396f5a87..51443cf5eda 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -53,7 +53,6 @@ abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -79,7 +78,6 @@ abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -99,38 +97,34 @@ abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloClient" constructor(options: ApolloClientOptions); // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts // // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts // // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts // @@ -139,48 +133,30 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "QueryOptions" query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver subscribe(options: SubscriptionOptions): Observable>; // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts // @@ -191,35 +167,41 @@ class ApolloClient implements DataProxy { // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ObservableQuery" watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -type ApolloClientOptions = { - uri?: string | UriFunction; +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloLink" link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // @public (undocumented) class ApolloError extends Error { @@ -329,7 +311,7 @@ type ApolloReducerConfig = { // @public (undocumented) export function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record): Object | null; -// @public (undocumented) +// @public export type AsStoreObject = { @@ -493,10 +475,10 @@ export const canUseWeakSet: boolean; // @public (undocumented) export function checkDocument(doc: DocumentNode): DocumentNode; -// @public (undocumented) +// @public export function cloneDeep(value: T): T; -// @public (undocumented) +// @public export function compact(...objects: TArgs): TupleToIntersection; // @public (undocumented) @@ -555,44 +537,31 @@ namespace DataProxy { }; // (undocumented) interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts // // (undocumented) interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -612,11 +581,8 @@ namespace DataProxy { } // (undocumented) interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts @@ -626,15 +592,11 @@ namespace DataProxy { } } -// @public (undocumented) +// @public interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -720,7 +682,7 @@ interface DeleteModifier { // @public (undocumented) const _deleteModifier: unique symbol; -// @public (undocumented) +// @public @deprecated (undocumented) export const DEV: boolean; // @public (undocumented) @@ -867,7 +829,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public type ErrorPolicy = "none" | "ignore" | "all"; // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts @@ -920,7 +882,7 @@ interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -1000,7 +962,7 @@ export function fixObservableSubclass Observab // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public export interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1048,7 +1010,7 @@ export function getFragmentDefinitions(doc: DocumentNode): FragmentDefinitionNod // @public (undocumented) export function getFragmentFromSelection(selection: SelectionNode, fragmentMap?: FragmentMap | FragmentMapFunction): InlineFragmentNode | FragmentDefinitionNode | null; -// @public (undocumented) +// @public export function getFragmentQueryDocument(document: DocumentNode, fragmentName?: string): DocumentNode; // @public (undocumented) @@ -1060,7 +1022,7 @@ export function getGraphQLErrorsFromResult(result: FetchResult): GraphQLEr // @public (undocumented) export function getInclusionDirectives(directives: ReadonlyArray): InclusionDirectives; -// @public (undocumented) +// @public export function getMainDefinition(queryDoc: DocumentNode): OperationDefinitionNode | FragmentDefinitionNode; // @public (undocumented) @@ -1541,31 +1503,21 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - // - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ApolloCache" update?: MutationUpdaterFunction; // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationQueryReducersMap" updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1579,12 +1531,9 @@ type MutationFetchPolicy = Extract; // @public (undocumented) interface MutationOptions = ApolloCache> extends MutationBaseOptions { // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "MutationFetchPolicy" fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1620,21 +1569,14 @@ type MutationUpdaterFunction void; -// @public (undocumented) +// @public enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1658,7 +1600,7 @@ type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -1684,17 +1626,14 @@ interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1740,7 +1679,6 @@ class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1758,7 +1696,6 @@ class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -2048,7 +1985,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -2060,27 +1996,19 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } @@ -2330,15 +2258,12 @@ type SubscribeToMoreOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "ErrorPolicy" errorPolicy?: ErrorPolicy; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2449,20 +2374,27 @@ export type VariableValue = (node: VariableNode) => any; // @public (undocumented) type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; -// @public (undocumented) -interface WatchQueryOptions extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +interface WatchQueryOptions { + 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" + errorPolicy?: ErrorPolicy; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "FetchPolicy" nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@apollo/client" does not have an export "NetworkStatus" refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -2506,9 +2438,8 @@ interface WriteContext extends ReadMergeModifyContext { // 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/policies.ts:168:3 - (ae-forgotten-export) The symbol "FieldReadFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:169:3 - (ae-forgotten-export) The symbol "FieldMergeFunction" 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/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/writeToStore.ts:65:7 - (ae-forgotten-export) The symbol "MergeTree" 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: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 // src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts @@ -2519,7 +2450,7 @@ interface WriteContext extends ReadMergeModifyContext { // 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/core/watchQueryOptions.ts:253:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/utilities/graphql/storeUtils.ts:220:12 - (ae-forgotten-export) The symbol "stringify" 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-utilities_globals.md b/.api-reports/api-report-utilities_globals.md index cf51100b464..b9fcd7f40d5 100644 --- a/.api-reports/api-report-utilities_globals.md +++ b/.api-reports/api-report-utilities_globals.md @@ -6,7 +6,7 @@ import { InvariantError } from 'ts-invariant'; -// @public (undocumented) +// @public @deprecated (undocumented) const DEV: boolean; export { DEV } export { DEV as __DEV__ } @@ -30,7 +30,7 @@ type LogFunction = { // @public (undocumented) export function maybe(thunk: () => T): T | undefined; -// @public (undocumented) +// @public export function newInvariantError(message?: string | number, ...optionalParams: unknown[]): InvariantError; // @public (undocumented) diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 35954d0b1c0..914be34a71e 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -49,7 +49,6 @@ export abstract class ApolloCache implements DataProxy { abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) abstract extract(optimistic?: boolean): TSerialized; // (undocumented) gc(): string[]; @@ -71,7 +70,6 @@ export abstract class ApolloCache implements DataProxy { abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) abstract restore(serializedState: TSerialized): ApolloCache; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; @@ -91,97 +89,82 @@ export abstract class ApolloCache implements DataProxy { writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver +// +// @public export class ApolloClient implements DataProxy { // (undocumented) __actionHookForDevTools(cb: () => any): void; constructor(options: ApolloClientOptions); // (undocumented) __requestRaw(payload: GraphQLRequest): Observable; - // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) cache: ApolloCache; - // (undocumented) clearStore(): Promise; // (undocumented) defaultOptions: DefaultOptions; // (undocumented) disableNetworkFetches: boolean; - // (undocumented) get documentTransform(): DocumentTransform; - // (undocumented) extract(optimistic?: boolean): TCacheShape; - // (undocumented) getObservableQueries(include?: RefetchQueriesInclude): Map>; - // (undocumented) getResolvers(): Resolvers; // (undocumented) link: ApolloLink; - // (undocumented) mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>; - // (undocumented) onClearStore(cb: () => Promise): () => void; - // (undocumented) onResetStore(cb: () => Promise): () => void; - // (undocumented) query(options: QueryOptions): Promise>; // (undocumented) queryDeduplication: boolean; - // (undocumented) readFragment(options: DataProxy.Fragment, optimistic?: boolean): T | null; - // (undocumented) readQuery(options: DataProxy.Query, optimistic?: boolean): T | null; - // (undocumented) reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // (undocumented) refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - // (undocumented) resetStore(): Promise[] | null>; - // (undocumented) restore(serializedState: TCacheShape): ApolloCache; - // (undocumented) setLink(newLink: ApolloLink): void; - // (undocumented) setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) stop(): void; - // (undocumented) + // Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver subscribe(options: SubscriptionOptions): Observable>; // (undocumented) readonly typeDefs: ApolloClientOptions["typeDefs"]; // (undocumented) version: string; - // (undocumented) watchQuery(options: WatchQueryOptions): ObservableQuery; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } // @public (undocumented) -export type ApolloClientOptions = { - uri?: string | UriFunction; +export interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + connectToDevTools?: boolean; + // (undocumented) credentials?: string; + defaultOptions?: DefaultOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + fragmentMatcher?: FragmentMatcher; + // (undocumented) headers?: Record; link?: ApolloLink; - cache: ApolloCache; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - connectToDevTools?: boolean; + name?: string; queryDeduplication?: boolean; - defaultOptions?: DefaultOptions; - assumeImmutableResults?: boolean; + // (undocumented) resolvers?: Resolvers | Resolvers[]; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + // (undocumented) typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - fragmentMatcher?: FragmentMatcher; - name?: string; + uri?: string | UriFunction; version?: string; - documentTransform?: DocumentTransform; -}; +} // Warning: (ae-forgotten-export) The symbol "ApolloConsumerProps" needs to be exported by the entry point index.d.ts // @@ -310,7 +293,7 @@ export type ApolloReducerConfig = { addTypename?: boolean; }; -// @public (undocumented) +// @public type AsStoreObject = { @@ -326,7 +309,7 @@ export interface BackgroundQueryHookOptions) => any; // (undocumented) onError?: (error: ApolloError) => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionComplete?: () => void; - // (undocumented) + // @deprecated (undocumented) onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; // (undocumented) shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); @@ -566,7 +549,7 @@ export const concat: typeof ApolloLink.concat; // @public (undocumented) export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; -// @public (undocumented) +// @public @deprecated (undocumented) export const createSignalIfSupported: () => { controller: boolean; signal: boolean; @@ -586,40 +569,27 @@ export namespace DataProxy { }; // (undocumented) export interface Fragment { - // (undocumented) fragment: DocumentNode | TypedDocumentNode; - // (undocumented) fragmentName?: string; - // (undocumented) id?: string; - // (undocumented) variables?: TVariables; } // (undocumented) export interface Query { - // (undocumented) id?: string; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } // (undocumented) export interface ReadFragmentOptions extends Fragment { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) export interface ReadQueryOptions extends Query { - // (undocumented) canonizeResults?: boolean; - // (undocumented) optimistic?: boolean; - // (undocumented) returnPartialData?: boolean; } // (undocumented) @@ -633,11 +603,8 @@ export namespace DataProxy { } // (undocumented) export interface WriteOptions { - // (undocumented) broadcast?: boolean; - // (undocumented) data: TData; - // (undocumented) overwrite?: boolean; } // (undocumented) @@ -645,15 +612,11 @@ export namespace DataProxy { } } -// @public (undocumented) +// @public export interface DataProxy { - // (undocumented) readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; - // (undocumented) readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; - // (undocumented) writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - // (undocumented) writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; } @@ -879,7 +842,7 @@ namespace EntityStore { } } -// @public (undocumented) +// @public export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) @@ -962,7 +925,7 @@ export interface FetchMoreQueryOptions { variables?: Partial; } -// @public (undocumented) +// @public export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; // @public (undocumented) @@ -1037,7 +1000,7 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public (undocumented) +// @public interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; @@ -1111,25 +1074,15 @@ export class HttpLink extends ApolloLink { // @public (undocumented) export interface HttpOptions { - // (undocumented) credentials?: string; - // (undocumented) fetch?: WindowOrWorkerGlobalScope["fetch"]; - // (undocumented) fetchOptions?: any; - // (undocumented) headers?: Record; - // (undocumented) includeExtensions?: boolean; - // (undocumented) includeUnusedVariables?: boolean; - // (undocumented) preserveHeaderCase?: boolean; - // (undocumented) print?: Printer; - // (undocumented) uri?: string | UriFunction; - // (undocumented) useGETForQueries?: boolean; } @@ -1334,7 +1287,7 @@ const _invalidateModifier: unique symbol; // @public (undocumented) export function isApolloError(err: Error): err is ApolloError; -// @public (undocumented) +// @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; // @public (undocumented) @@ -1406,7 +1359,7 @@ export interface LazyQueryHookExecOptions extends Omit, "skip"> { } -// @public (undocumented) +// @public @deprecated (undocumented) export type LazyQueryResult = QueryResult; // @public (undocumented) @@ -1549,23 +1502,14 @@ type Modifiers = Record> = Partia // @public (undocumented) interface MutationBaseOptions = ApolloCache> { - // (undocumented) awaitRefetchQueries?: boolean; - // (undocumented) context?: TContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) onQueryUpdated?: OnQueryUpdated; - // (undocumented) optimisticResponse?: TData | ((vars: TVariables) => TData); - // (undocumented) refetchQueries?: ((result: FetchResult) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // (undocumented) update?: MutationUpdaterFunction; - // (undocumented) updateQueries?: MutationQueryReducersMap; - // (undocumented) variables?: TVariables; } @@ -1595,11 +1539,8 @@ export interface MutationHookOptions = ApolloCache> extends MutationBaseOptions { - // (undocumented) fetchPolicy?: MutationFetchPolicy; - // (undocumented) keepRootFields?: boolean; - // (undocumented) mutation: DocumentNode | TypedDocumentNode; } @@ -1662,21 +1603,14 @@ export type MutationUpdaterFunction void; -// @public (undocumented) +// @public export enum NetworkStatus { - // (undocumented) error = 8, - // (undocumented) fetchMore = 3, - // (undocumented) loading = 1, - // (undocumented) poll = 6, - // (undocumented) ready = 7, - // (undocumented) refetch = 4, - // (undocumented) setVariables = 2 } @@ -1698,10 +1632,10 @@ export type NextLink = (operation: Operation) => Observable; // @public (undocumented) type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; -// @public (undocumented) +// @public export type NoInfer = [T][T extends any ? 0 : never]; -// @public (undocumented) +// @public export interface NormalizedCache { // (undocumented) canRead: CanReadFunction; @@ -1727,17 +1661,14 @@ export interface NormalizedCache { modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; // (undocumented) release(rootId: string): number; - // (undocumented) replace(newData: NormalizedCacheObject): void; - // (undocumented) retain(rootId: string): number; - // (undocumented) toObject(): NormalizedCacheObject; // (undocumented) toReference: ToReferenceFunction; } -// @public (undocumented) +// @public export interface NormalizedCacheObject { // (undocumented) [dataId: string]: StoreObject | undefined; @@ -1781,7 +1712,6 @@ export class ObservableQuery): Promise>; // (undocumented) reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; @@ -1801,7 +1731,6 @@ export class ObservableQuery>; // (undocumented) setOptions(newOptions: Partial>): Promise>; - // (undocumented) setVariables(variables: TVariables): Promise | void>; // (undocumented) silentSetOptions(newOptions: Partial>): void; @@ -2043,7 +1972,7 @@ class QueryInfo { variables?: Record; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface QueryLazyOptions { // (undocumented) context?: DefaultContext; @@ -2157,7 +2086,6 @@ class QueryManager { readonly ssrMode: boolean; // (undocumented) startGraphQLSubscription({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable>; - // (undocumented) stop(): void; // (undocumented) stopQuery(queryId: string): void; @@ -2169,33 +2097,25 @@ class QueryManager { watchQuery(options: WatchQueryOptions): ObservableQuery; } -// @public (undocumented) +// @public interface QueryOptions { - // (undocumented) canonizeResults?: boolean; - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) notifyOnNetworkStatusChange?: boolean; - // (undocumented) partialRefetch?: boolean; - // (undocumented) pollInterval?: number; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) returnPartialData?: boolean; - // (undocumented) variables?: TVariables; } export { QueryOptions as PureQueryOptions } export { QueryOptions } -// @public (undocumented) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector +// +// @public export interface QueryReference { // Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts // @@ -2226,7 +2146,7 @@ export interface QueryResult; -// @public (undocumented) +// @public @deprecated (undocumented) export type QueryTuple = LazyQueryResultTuple; // @public (undocumented) @@ -2353,7 +2273,7 @@ class RenderPromises { // @public (undocumented) export type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; -// @public (undocumented) +// @public @deprecated (undocumented) export const resetApolloContext: typeof getApolloContext; export { resetCaches } @@ -2504,15 +2424,10 @@ export interface SubscriptionHookOptions { - // (undocumented) context?: DefaultContext; - // (undocumented) errorPolicy?: ErrorPolicy; - // (undocumented) fetchPolicy?: FetchPolicy; - // (undocumented) query: DocumentNode | TypedDocumentNode; - // (undocumented) variables?: TVariables; } @@ -2537,7 +2452,7 @@ export interface SuspenseQueryHookOptions(queryRef: QueryReference): UseReadQue // @public (undocumented) export interface UseReadQueryResult { - // (undocumented) data: TData; - // (undocumented) error: ApolloError | undefined; - // (undocumented) networkStatus: NetworkStatus; } @@ -2815,18 +2727,22 @@ export interface UseSuspenseQueryResult extends Omit, "fetchPolicy"> { - // (undocumented) +// @public +export interface WatchQueryOptions { + canonizeResults?: boolean; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) initialFetchPolicy?: WatchQueryFetchPolicy; // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - // (undocumented) + notifyOnNetworkStatusChange?: boolean; + partialRefetch?: boolean; + pollInterval?: number; + query: DocumentNode | TypedDocumentNode; refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + variables?: TVariables; } // @public (undocumented) @@ -2866,13 +2782,13 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts // 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/cache/inmemory/types.ts:132: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: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/core/watchQueryOptions.ts:253: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 // 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 diff --git a/api-extractor.json b/api-extractor.json index 20f6605a52a..5a0a74befa3 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -7,6 +7,7 @@ "mainEntryPointFilePath": "/dist/index.d.ts", "bundledPackages": [], "newlineKind": "lf", + "enumMemberOrder": "preserve", /** * Set to true when invoking API Extractor's test harness. When `testMode` is true, the `toolVersion` field in the @@ -37,14 +38,17 @@ }, "docModel": { - "enabled": false + "enabled": false, + "apiJsonFilePath": "/docs/public/.api.json", + "includeForgottenExports": true }, "dtsRollup": { "enabled": false }, "tsdocMetadata": { - "enabled": false + "enabled": false, + "tsdocMetadataFilePath": "/docs/public/tsdoc-metadata.json" }, /** @@ -113,6 +117,11 @@ "ae-missing-release-tag": { "logLevel": "none" + }, + + "ae-unresolved-link": { + "logLevel": "warning", + "addToApiReportFile": true } } diff --git a/config/apiExtractor.ts b/config/apiExtractor.ts index c1a1e90ec49..917986c3da2 100644 --- a/config/apiExtractor.ts +++ b/config/apiExtractor.ts @@ -2,11 +2,36 @@ import * as path from "path"; import { Extractor, ExtractorConfig, - ExtractorResult, + ExtractorLogLevel, + IConfigFile, } from "@microsoft/api-extractor"; +import { parseArgs } from "node:util"; + // @ts-ignore import { map } from "./entryPoints.js"; +const parsed = parseArgs({ + options: { + generate: { + type: "string", + multiple: true, + default: ["apiReport"], + }, + "main-only": { + type: "boolean", + default: false, + }, + }, +}); + +if ( + !parsed.values.generate!.every((v) => ["apiReport", "docModel"].includes(v)) +) { + throw new Error( + "invalid value for --generate. Only allowed values are `apiReport` and `docModel`!" + ); +} + // Load and parse the api-extractor.json file const configObjectFullPath = path.resolve(__dirname, "../api-extractor.json"); const baseConfig = ExtractorConfig.loadFile(configObjectFullPath); @@ -15,6 +40,8 @@ const packageJsonFullPath = path.resolve(__dirname, "../package.json"); process.exitCode = 0; map((entryPoint: { dirs: string[] }) => { + if (entryPoint.dirs.length > 0 && parsed.values["main-only"]) return; + const path = entryPoint.dirs.join("/"); const mainEntryPointFilePath = `/dist/${path}/index.d.ts`.replace("//", "/"); @@ -22,23 +49,36 @@ map((entryPoint: { dirs: string[] }) => { "\n\nCreating API extractor report for " + mainEntryPointFilePath ); - const extractorConfig: ExtractorConfig = ExtractorConfig.prepare({ - configObject: { - ...baseConfig, - mainEntryPointFilePath, - apiReport: { - enabled: true, - ...baseConfig.apiReport, - reportFileName: `api-report${ - path ? "-" + path.replace("/", "_") : "" - }.md`, - }, - }, + const configObject: IConfigFile = { + ...(JSON.parse(JSON.stringify(baseConfig)) as IConfigFile), + mainEntryPointFilePath, + }; + + configObject.apiReport!.reportFileName = `api-report${ + path ? "-" + path.replace("/", "_") : "" + }.md`; + + configObject.apiReport!.enabled = + parsed.values.generate?.includes("apiReport") || false; + + configObject.docModel!.enabled = + parsed.values.generate?.includes("docModel") || false; + + if (entryPoint.dirs.length !== 0) { + configObject.docModel = { enabled: false }; + configObject.tsdocMetadata = { enabled: false }; + configObject.messages!.extractorMessageReporting![ + "ae-unresolved-link" + ]!.logLevel = ExtractorLogLevel.None; + } + + const extractorConfig = ExtractorConfig.prepare({ + configObject, packageJsonFullPath, configObjectFullPath, }); - const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, { + const extractorResult = Extractor.invoke(extractorConfig, { localBuild: process.env.CI === undefined || process.env.CI === "false", showVerboseMessages: true, }); diff --git a/config/inlineInheritDoc.ts b/config/inlineInheritDoc.ts new file mode 100644 index 00000000000..5222dafde7a --- /dev/null +++ b/config/inlineInheritDoc.ts @@ -0,0 +1,148 @@ +/** + * This CLI tool will inline docblocks specified with `@inheritDoc` on build. + * + * + * E.g. a in a dockblock like this: + * ```js + * /** {@inheritDoc @apollo/client!QueryOptions#query:member} *\/ + * ``` + * + * the annotation (everything from `{` to `}`) will be replaced with the docblock + * of the `QueryOptions.query` member function. + * + * We need this here for situations where inheritance is not possible for `docModel` + * generation (`interface Foo extends Omit {}` is too complicated a + * type for it to parse) and we want to flatten types - or going forward, for + * generally flattening types without repeating docs everywhere. + * + * You can get these "canonical ids" by running + * ```sh + * yarn docmodel + * ``` + * and looking at the generated [`client.api.json`](../docs/shared/client.api.json) file. + */ +/** End file docs */ + +// @ts-ignore +import { Project, ts, printNode, Node } from "ts-morph"; +import { ApiModel, ApiDocumentedItem } from "@microsoft/api-extractor-model"; +import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference"; + +import fs from "node:fs"; +import path from "node:path"; +import { + Extractor, + ExtractorConfig, + ExtractorLogLevel, +} from "@microsoft/api-extractor"; + +console.log( + "Processing {@inheritDoc } comments in .d.ts files." +); + +const model = loadApiModel(); +processComments(); + +function getCommentFor(canonicalReference: string) { + const apiItem = model.resolveDeclarationReference( + DeclarationReference.parse(canonicalReference), + undefined + ).resolvedApiItem; + if (!apiItem) + throw new Error( + `Could not resolve canonical reference "${canonicalReference}"` + ); + if (apiItem instanceof ApiDocumentedItem) { + return apiItem.tsdocComment?.emitAsTsdoc(); + } else { + throw new Error( + `"${canonicalReference}" is not documented, so no documentation can be inherited.` + ); + } +} + +function loadApiModel() { + const tempDir = fs.mkdtempSync("api-model"); + try { + // Load and parse the api-extractor.json file + const configObjectFullPath = path.resolve( + __dirname, + "../api-extractor.json" + ); + const packageJsonFullPath = path.resolve(__dirname, "../package.json"); + const tempModelFile = path.join(tempDir, "client.api.json"); + + const configObject = ExtractorConfig.loadFile(configObjectFullPath); + configObject.docModel = { + ...configObject.docModel, + enabled: true, + apiJsonFilePath: tempModelFile, + }; + configObject.apiReport = { + enabled: false, + reportFileName: "disabled.md", + reportFolder: tempDir, + }; + + configObject.messages = { + extractorMessageReporting: { + default: { + logLevel: ExtractorLogLevel.None, + }, + }, + compilerMessageReporting: { + default: { + logLevel: ExtractorLogLevel.None, + }, + }, + tsdocMessageReporting: { + default: { + logLevel: ExtractorLogLevel.None, + }, + }, + }; + const extractorConfig = ExtractorConfig.prepare({ + configObject, + packageJsonFullPath, + configObjectFullPath, + }); + + Extractor.invoke(extractorConfig); + + const model = new ApiModel(); + model.loadPackage(tempModelFile); + return model; + } finally { + fs.rmSync(tempDir, { recursive: true }); + } +} + +function processComments() { + const inheritDocRegex = /\{@inheritDoc ([^}]+)\}/; + + const project = new Project({ + tsConfigFilePath: "tsconfig.json", + skipAddingFilesFromTsConfig: true, + }); + + const sourceFiles = project.addSourceFilesAtPaths("dist/**/*.d.ts"); + for (const file of sourceFiles) { + file.forEachDescendant((node) => { + if (Node.isPropertySignature(node)) { + const docsNode = node.getJsDocs()[0]; + if (!docsNode) return; + const oldText = docsNode.getInnerText(); + const newText = oldText.replace( + inheritDocRegex, + (_, canonicalReference) => { + return getCommentFor(canonicalReference) || ""; + } + ); + if (oldText !== newText) { + docsNode.replaceWithText(newText); + } + } + }); + file.saveSync(); + } +} diff --git a/config/rollup.config.js b/config/rollup.config.js index 7917a340f56..90dd8f56dec 100644 --- a/config/rollup.config.js +++ b/config/rollup.config.js @@ -3,10 +3,13 @@ import { promises as fs } from "fs"; import nodeResolve from "@rollup/plugin-node-resolve"; import { terser as minify } from "rollup-plugin-terser"; +import cleanup from "rollup-plugin-cleanup"; const entryPoints = require("./entryPoints"); const distDir = "./dist"; +const removeComments = cleanup({}); + function isExternal(id, parentId, entryPointsAreExternal = true) { let posixId = toPosixPath(id); const posixParentId = toPosixPath(parentId); @@ -63,7 +66,7 @@ function prepareCJS(input, output) { exports: "named", externalLiveBindings: false, }, - plugins: [nodeResolve()], + plugins: [nodeResolve(), removeComments], }; } @@ -79,6 +82,9 @@ function prepareCJSMinified(input) { mangle: { toplevel: true, }, + format: { + comments: "some", // keeps comments with a @license, @copyright or @preserve tag + }, compress: { toplevel: true, global_defs: { @@ -111,6 +117,7 @@ function prepareBundle({ externalLiveBindings: false, }, plugins: [ + removeComments, { name: "externalize-dependency", resolveId(id, parentId) { diff --git a/docs/source/api/core/ApolloClient.mdx b/docs/source/api/core/ApolloClient.mdx index d4a0467c424..8795e1d3d88 100644 --- a/docs/source/api/core/ApolloClient.mdx +++ b/docs/source/api/core/ApolloClient.mdx @@ -3,228 +3,62 @@ title: class ApolloClient description: API reference order: 11 api_reference: true +api_doc: + - "@apollo/client!ApolloClient:class" + - "@apollo/client!DefaultOptions:interface" --- The `ApolloClient` class encapsulates Apollo's core client-side API. It backs all available view-layer integrations (React, iOS, and so on). ## The `ApolloClient` constructor - + -Takes an `ApolloClientOptions` parameter that supports the [fields listed below](#options). +Takes an `ApolloClientOptions` parameter that supports the [fields listed below](#ApolloClientOptions). Returns an initialized `ApolloClient` object. #### Example -```js -import { ApolloClient, InMemoryCache } from '@apollo/client'; - -const cache = new InMemoryCache(); - -const client = new ApolloClient({ - // Provide required constructor fields - cache: cache, - uri: 'http://localhost:4000/', - - // Provide some optional constructor fields - name: 'react-web-client', - version: '1.3', - queryDeduplication: false, - defaultOptions: { - watchQuery: { - fetchPolicy: 'cache-and-network', - }, - }, -}); -``` - -#### Options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +## Types - -
Name /
Type
Description
- -###### `uri` - -`String` - - -The URI of the GraphQL endpoint that Apollo Client will communicate with. - -One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. -
- -###### `link` - -`ApolloLink` - - -You can provide an Apollo Link instance to serve as Apollo Client's network layer. For more information, see [Advanced HTTP networking](../../networking/advanced-http-networking/). - -One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. -
- -###### `cache` - -`ApolloCache` (usually `InMemoryCache`) - - -**Required.** The cache that Apollo Client should use to store query results locally. The recommended cache is `InMemoryCache`, which is provided by the `@apollo/client` package. - -For more information, see [Configuring the cache](../../caching/cache-configuration/). -
- -###### `name` - -`String` - - -A custom name (e.g., `iOS`) that identifies this particular client among your set of clients. Apollo Server and Apollo Studio use this property as part of the [client awareness](/apollo-server/monitoring/metrics/#identifying-distinct-clients) feature. -
- -###### `version` - -`String` - - -A custom version that identifies the current version of this particular client (e.g., `1.2`). Apollo Server and Apollo Studio use this property as part of the [client awareness](/apollo-server/monitoring/metrics/#identifying-distinct-clients) feature. - -This is **not** the version of Apollo Client that you are using, but rather any version string that helps you differentiate between versions of your client. -
+For more information on the `defaultOptions` object, see the [Default Options](#DefaultOptions) section below. -###### `ssrMode` - -`Boolean` - - -When using Apollo Client for [server-side rendering](../../performance/server-side-rendering/), set this to `true` so that the [`getDataFromTree` function](../react/ssr/#getdatafromtree) can work effectively. - -The default value is `false`. -
- -###### `ssrForceFetchDelay` - -`Number` - - -The time interval (in milliseconds) before Apollo Client force-fetches queries after a server-side render. - -The default value is `0` (no delay). -
- -###### `connectToDevTools` - -`Boolean` - - -If `true`, the [Apollo Client Devtools](../../development-testing/developer-tooling/#apollo-client-devtools) browser extension can connect to Apollo Client in your production environment. The extension can _always_ connect in a non-production environment. - -The default value is `false`. -
- -###### `queryDeduplication` - -`Boolean` - - -If `false`, Apollo Client sends every created query to the server, even if a _completely_ identical query (identical in terms of query string, variable values, and operationName) is already in flight. - -The default value is `true`. -
- -###### `defaultOptions` - -`Object` - - -Provide this object to set application-wide default values for options you can provide to the `watchQuery`, `query`, and `mutate` functions. See below for an example object. - -See the [example object below](#example-defaultoptions-object). -
- -###### `assumeImmutableResults` - -`Boolean` - +## Functions -If `true`, Apollo Client will assume results read from the cache are never mutated by application code, which enables substantial performance optimizations. + + + + + + + + + + + + + + + + -The default value is `false`. -
+ + + ##### Example `defaultOptions` object @@ -248,27 +82,3 @@ You can override any default option you specify in this object by providing a different value for the same option in individual function calls. > **Note:** The `useQuery` hook uses Apollo Client's `watchQuery` function. To set `defaultOptions` when using the `useQuery` hook, make sure to set them under the `defaultOptions.watchQuery` property. - -## Functions - - - - - - - - - - - - - - - - - - -## Types - - - diff --git a/netlify.toml b/netlify.toml index 6e8d1ace9c9..e0dfc89a88f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,9 @@ [build] publish = "docs/public" - command = "npm run typedoc" + command = """\ + npm run typedoc + npm run docmodel + """ [build.environment] NODE_VERSION = "18" @@ -9,6 +12,8 @@ base = "docs" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ." command = """\ + npm i + npm run docmodel cd ../ rm -rf monodocs git clone https://github.com/apollographql/docs --branch main --single-branch monodocs diff --git a/package-lock.json b/package-lock.json index dbd669f34a2..a0e60715ab1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,6 +84,7 @@ "resolve": "1.22.8", "rimraf": "5.0.5", "rollup": "2.79.1", + "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", "size-limit": "8.2.6", @@ -92,6 +93,7 @@ "ts-api-utils": "1.0.3", "ts-jest": "29.1.1", "ts-jest-resolver": "2.0.1", + "ts-morph": "20.0.0", "ts-node": "10.9.1", "typedoc": "0.25.0", "typescript": "5.2.2", @@ -2659,6 +2661,57 @@ "node": ">= 10" } }, + "node_modules/@ts-morph/common": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz", + "integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.12", + "minimatch": "^7.4.3", + "mkdirp": "^2.1.6", + "path-browserify": "^1.0.1" + } + }, + "node_modules/@ts-morph/common/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@ts-morph/common/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@ts-morph/common/node_modules/mkdirp": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", + "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", + "dev": true, + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -4166,6 +4219,12 @@ "node": ">= 0.12.0" } }, + "node_modules/code-block-writer": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dev": true + }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -7973,6 +8032,20 @@ "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", "dev": true }, + "node_modules/js-cleanup": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/js-cleanup/-/js-cleanup-1.2.0.tgz", + "integrity": "sha512-JeDD0yiiSt80fXzAVa/crrS0JDPQljyBG/RpOtaSbyDq03VHa9szJWMaWOYU/bcTn412uMN2MxApXq8v79cUiQ==", + "dev": true, + "dependencies": { + "magic-string": "^0.25.7", + "perf-regexes": "^1.0.1", + "skip-regex": "^1.0.2" + }, + "engines": { + "node": "^10.14.2 || >=12.0.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8329,6 +8402,15 @@ "lz-string": "bin/bin.js" } }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -9196,6 +9278,12 @@ "node": ">= 10.0.0" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -9269,6 +9357,15 @@ "node": ">=8" } }, + "node_modules/perf-regexes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/perf-regexes/-/perf-regexes-1.0.1.tgz", + "integrity": "sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng==", + "dev": true, + "engines": { + "node": ">=6.14" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -9969,6 +10066,22 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-cleanup": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-3.2.1.tgz", + "integrity": "sha512-zuv8EhoO3TpnrU8MX8W7YxSbO4gmOR0ny06Lm3nkFfq0IVKdBUtHwhVzY1OAJyNCIAdLiyPnOrU0KnO0Fri1GQ==", + "dev": true, + "dependencies": { + "js-cleanup": "^1.2.0", + "rollup-pluginutils": "^2.8.2" + }, + "engines": { + "node": "^10.14.2 || >=12.0.0" + }, + "peerDependencies": { + "rollup": ">=2.0" + } + }, "node_modules/rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", @@ -9998,6 +10111,21 @@ "node": ">= 10.13.0" } }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -10180,6 +10308,15 @@ "node": "^14.0.0 || ^16.0.0 || >=18.0.0" } }, + "node_modules/skip-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/skip-regex/-/skip-regex-1.0.2.tgz", + "integrity": "sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA==", + "dev": true, + "engines": { + "node": ">=4.2" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -10327,6 +10464,13 @@ "source-map": "^0.6.0" } }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, "node_modules/spawndamnit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", @@ -10937,6 +11081,16 @@ "node": ">=10" } }, + "node_modules/ts-morph": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", + "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", + "dev": true, + "dependencies": { + "@ts-morph/common": "~0.21.0", + "code-block-writer": "^12.0.0" + } + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", diff --git a/package.json b/package.json index ec11352a8b6..46c649fce25 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "scripts": { "prebuild": "npm run clean", "build": "tsc", - "postbuild": "npm run update-version && npm run invariants && npm run sourcemaps && npm run rollup && npm run prepdist && npm run postprocess-dist && npm run verify-version", + "postbuild": "npm run update-version && npm run inline-inherit-doc && npm run invariants && npm run sourcemaps && npm run rollup && npm run prepdist && npm run postprocess-dist && npm run verify-version", "postinstall": "patch-package", "update-version": "node config/version.js update", "verify-version": "node config/version.js verify", @@ -42,12 +42,13 @@ "prepdist": "node ./config/prepareDist.js", "prepdist:changesets": "ts-node-script config/prepareChangesetsRelease.ts", "postprocess-dist": "ts-node-script config/postprocessDist.ts", - "extract-api": "ts-node-script config/apiExtractor.ts", + "extract-api": "ts-node-script config/apiExtractor.ts --generate apiReport", "clean": "rimraf dist coverage lib temp", "check:format": "prettier --check .", "ci:precheck": "node config/precheck.js", "format": "prettier --write .", "lint": "eslint 'src/**/*.{[jt]s,[jt]sx}'", + "inline-inherit-doc": "ts-node-script config/inlineInheritDoc.ts", "test": "jest --config ./config/jest.config.js", "test:debug": "node --inspect-brk node_modules/.bin/jest --config ./config/jest.config.js --runInBand --testTimeout 99999 --logHeapUsage", "test:ci": "TEST_ENV=ci npm run test:coverage -- --logHeapUsage && npm run test:memory", @@ -59,6 +60,7 @@ "predeploy": "npm run build", "deploy": "cd dist && npm publish --tag next", "typedoc": "typedoc src/index.ts --json docs/public/docs.json", + "docmodel": "tsc && npm run inline-inherit-doc && ts-node-script config/apiExtractor.ts --main-only --generate docModel", "changeset-publish": "npm run build && npm run prepdist:changesets && cd dist && changeset publish", "changeset-check": "changeset status --verbose --since=origin/main", "changeset-version": "changeset version && npm i", @@ -163,6 +165,7 @@ "resolve": "1.22.8", "rimraf": "5.0.5", "rollup": "2.79.1", + "rollup-plugin-cleanup": "3.2.1", "rollup-plugin-terser": "7.0.2", "rxjs": "7.8.1", "size-limit": "8.2.6", @@ -171,6 +174,7 @@ "ts-api-utils": "1.0.3", "ts-jest": "29.1.1", "ts-jest-resolver": "2.0.1", + "ts-morph": "20.0.0", "ts-node": "10.9.1", "typedoc": "0.25.0", "typescript": "5.2.2", @@ -180,5 +184,15 @@ }, "publishConfig": { "access": "public" - } + }, + "files": [ + "LICENSE", + "**/*.md", + "**/*.cjs", + "**/*.cjs.map", + "**/*.js", + "**/*.js.map", + "**/*.d.ts", + "**/*.json" + ] } diff --git a/src/cache/core/cache.ts b/src/cache/core/cache.ts index 2dffa982b1c..b897419fb1a 100644 --- a/src/cache/core/cache.ts +++ b/src/cache/core/cache.ts @@ -126,11 +126,6 @@ export abstract class ApolloCache implements DataProxy { } // DataProxy API - /** - * - * @param options - * @param optimistic - */ public readQuery( options: Cache.ReadQueryOptions, optimistic = !!options.optimistic diff --git a/src/cache/inmemory/readFromStore.ts b/src/cache/inmemory/readFromStore.ts index 34a81f07c93..50980c77597 100644 --- a/src/cache/inmemory/readFromStore.ts +++ b/src/cache/inmemory/readFromStore.ts @@ -227,9 +227,6 @@ export class StoreReader { /** * Given a store and a query, return as much of the result as possible and * identify if any data was missing from the store. - * @param {DocumentNode} query A parsed GraphQL query document - * @param {Store} store The Apollo Client store object - * @return {result: Object, complete: [boolean]} */ public diffQueryAgainstStore({ store, diff --git a/src/cache/inmemory/types.ts b/src/cache/inmemory/types.ts index 8a5bc71b583..5a8d66ec300 100644 --- a/src/cache/inmemory/types.ts +++ b/src/cache/inmemory/types.ts @@ -109,7 +109,13 @@ export type OptimisticStoreItem = { }; export type ReadQueryOptions = { + /** + * The Apollo Client store object. + */ store: NormalizedCache; + /** + * A parsed GraphQL query document. + */ query: DocumentNode; variables?: Object; previousResult?: any; diff --git a/src/core/ApolloClient.ts b/src/core/ApolloClient.ts index 5feb29f792d..967d9952739 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -43,25 +43,78 @@ export interface DefaultOptions { let hasSuggestedDevtools = false; -export type ApolloClientOptions = { +export interface ApolloClientOptions { + /** + * The URI of the GraphQL endpoint that Apollo Client will communicate with. + * + * One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. + */ uri?: string | UriFunction; credentials?: string; headers?: Record; + /** + * You can provide an {@link ApolloLink} instance to serve as Apollo Client's network layer. For more information, see [Advanced HTTP networking](https://www.apollographql.com/docs/react/networking/advanced-http-networking/). + * + * One of `uri` or `link` is **required**. If you provide both, `link` takes precedence. + */ link?: ApolloLink; + /** + * The cache that Apollo Client should use to store query results locally. The recommended cache is `InMemoryCache`, which is provided by the `@apollo/client` package. + * + * For more information, see [Configuring the cache](https://www.apollographql.com/docs/react/caching/cache-configuration/). + */ cache: ApolloCache; + /** + * The time interval (in milliseconds) before Apollo Client force-fetches queries after a server-side render. + * + * @defaultValue `0` (no delay) + */ ssrForceFetchDelay?: number; + /** + * When using Apollo Client for [server-side rendering](https://www.apollographql.com/docs/react//performance/server-side-rendering/), set this to `true` so that the [`getDataFromTree` function](../react/ssr/#getdatafromtree) can work effectively. + * + * @defaultValue `false` + */ ssrMode?: boolean; + /** + * If `true`, the [Apollo Client Devtools](https://www.apollographql.com/docs/react/development-testing/developer-tooling/#apollo-client-devtools) browser extension can connect to Apollo Client. + * + * The default value is `false` in production and `true` in development (if there is a `window` object). + */ connectToDevTools?: boolean; + /** + * If `false`, Apollo Client sends every created query to the server, even if a _completely_ identical query (identical in terms of query string, variable values, and operationName) is already in flight. + * + * @defaultValue `true` + */ queryDeduplication?: boolean; + /** + * Provide this object to set application-wide default values for options you can provide to the `watchQuery`, `query`, and `mutate` functions. See below for an example object. + * + * See this [example object](https://www.apollographql.com/docs/react/api/core/ApolloClient#example-defaultoptions-object). + */ defaultOptions?: DefaultOptions; + /** + * If `true`, Apollo Client will assume results read from the cache are never mutated by application code, which enables substantial performance optimizations. + * + * @defaultValue `false` + */ assumeImmutableResults?: boolean; resolvers?: Resolvers | Resolvers[]; typeDefs?: string | string[] | DocumentNode | DocumentNode[]; fragmentMatcher?: FragmentMatcher; + /** + * A custom name (e.g., `iOS`) that identifies this particular client among your set of clients. Apollo Server and Apollo Studio use this property as part of the [client awareness](https://www.apollographql.com/docs/apollo-server/monitoring/metrics#identifying-distinct-clients) feature. + */ name?: string; + /** + * A custom version that identifies the current version of this particular client (e.g., `1.2`). Apollo Server and Apollo Studio use this property as part of the [client awareness](https://www.apollographql.com/docs/apollo-server/monitoring/metrics#identifying-distinct-clients) feature. + * + * This is **not** the version of Apollo Client that you are using, but rather any version string that helps you differentiate between versions of your client. + */ version?: string; documentTransform?: DocumentTransform; -}; +} // Though mergeOptions now resides in @apollo/client/utilities, it was // previously declared and exported from this module, and then reexported from @@ -72,7 +125,7 @@ export { mergeOptions }; /** * This is the primary Apollo Client class. It is used to send GraphQL documents (i.e. queries - * and mutations) to a GraphQL spec-compliant server over a {@link NetworkInterface} instance, + * and mutations) to a GraphQL spec-compliant server over an {@link ApolloLink} instance, * receive results from the server and cache the results in a store. It also delivers updates * to GraphQL queries through {@link Observable} instances. */ @@ -94,36 +147,28 @@ export class ApolloClient implements DataProxy { /** * Constructs an instance of {@link ApolloClient}. * - * @param uri The GraphQL endpoint that Apollo Client will connect to. If - * `link` is configured, this option is ignored. - * @param link The {@link ApolloLink} over which GraphQL documents will be resolved into a response. - * - * @param cache The initial cache to use in the data store. - * - * @param ssrMode Determines whether this is being run in Server Side Rendering (SSR) mode. - * - * @param ssrForceFetchDelay Determines the time interval before we force fetch queries for a - * server side render. - * - * @param queryDeduplication If set to false, a query will still be sent to the server even if a query - * with identical parameters (query, variables, operationName) is already in flight. - * - * @param defaultOptions Used to set application wide defaults for the - * options supplied to `watchQuery`, `query`, or - * `mutate`. + * @example + * ```js + * import { ApolloClient, InMemoryCache } from '@apollo/client'; * - * @param assumeImmutableResults When this option is true, the client will assume results - * read from the cache are never mutated by application code, - * which enables substantial performance optimizations. + * const cache = new InMemoryCache(); * - * @param name A custom name that can be used to identify this client, when - * using Apollo client awareness features. E.g. "iOS". + * const client = new ApolloClient({ + * // Provide required constructor fields + * cache: cache, + * uri: 'http://localhost:4000/', * - * @param version A custom version that can be used to identify this client, - * when using Apollo client awareness features. This is the - * version of your client, which you may want to increment on - * new builds. This is NOT the version of Apollo Client that - * you are using. + * // Provide some optional constructor fields + * name: 'react-web-client', + * version: '1.3', + * queryDeduplication: false, + * defaultOptions: { + * watchQuery: { + * fetchPolicy: 'cache-and-network', + * }, + * }, + * }); + * ``` */ constructor(options: ApolloClientOptions) { if (!options.cache) { @@ -339,10 +384,10 @@ export class ApolloClient implements DataProxy { /** * This resolves a single query according to the options specified and - * returns a {@link Promise} which is either resolved with the resulting data + * returns a `Promise` which is either resolved with the resulting data * or rejected with an error. * - * @param options An object of type {@link QueryOptions} that allows us to + * @param options - An object of type {@link QueryOptions} that allows us to * describe how this query should be treated e.g. whether it should hit the * server at all or just resolve from the cache, etc. */ @@ -371,7 +416,7 @@ export class ApolloClient implements DataProxy { /** * This resolves a single mutation according to the options specified and returns a - * {@link Promise} which is either resolved with the resulting data or rejected with an + * Promise which is either resolved with the resulting data or rejected with an * error. * * It takes options as an object with the following keys and values: @@ -409,7 +454,7 @@ export class ApolloClient implements DataProxy { * the root query. To start at a specific id returned by `dataIdFromObject` * use `readFragment`. * - * @param optimistic Set to `true` to allow `readQuery` to return + * @param optimistic - Set to `true` to allow `readQuery` to return * optimistic results. Is `false` by default. */ public readQuery( @@ -430,7 +475,7 @@ export class ApolloClient implements DataProxy { * in a document with multiple fragments then you must also specify a * `fragmentName`. * - * @param optimistic Set to `true` to allow `readFragment` to return + * @param optimistic - Set to `true` to allow `readFragment` to return * optimistic results. Is `false` by default. */ public readFragment( diff --git a/src/core/ObservableQuery.ts b/src/core/ObservableQuery.ts index bda85a543a7..9a306746d0d 100644 --- a/src/core/ObservableQuery.ts +++ b/src/core/ObservableQuery.ts @@ -364,7 +364,7 @@ export class ObservableQuery< * Update the variables of this observable query, and fetch the new results. * This method should be preferred over `setVariables` in most use cases. * - * @param variables: The new set of variables. If there are missing variables, + * @param variables - The new set of variables. If there are missing variables, * the previous values of those variables will be used. */ public refetch( @@ -614,9 +614,7 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, * Note: the promise will return null immediately if the query is not active * (there are no subscribers). * - * @private - * - * @param variables: The new set of variables. If there are missing variables, + * @param variables - The new set of variables. If there are missing variables, * the previous values of those variables will be used. */ public setVariables( diff --git a/src/core/watchQueryOptions.ts b/src/core/watchQueryOptions.ts index a5a9a7d9afc..b74659b4a99 100644 --- a/src/core/watchQueryOptions.ts +++ b/src/core/watchQueryOptions.ts @@ -41,7 +41,7 @@ export type RefetchWritePolicy = "merge" | "overwrite"; /** * errorPolicy determines the level of events for errors in the execution result. The options are: - * - none (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0) + * - none (default): any errors from the request are treated like runtime errors and the observable is stopped * - ignore: errors from the request do not stop the observable, but also don't call `next` * - all: errors are treated like data and will notify observables */ @@ -118,7 +118,7 @@ export interface QueryOptions { export interface WatchQueryOptions< TVariables extends OperationVariables = OperationVariables, TData = any, -> extends Omit, "fetchPolicy"> { +> { /** * Specifies the {@link FetchPolicy} to be used for this query. */ @@ -149,6 +149,33 @@ export interface WatchQueryOptions< * behavior, for backwards compatibility with Apollo Client 3.x. */ refetchWritePolicy?: RefetchWritePolicy; + + /** {@inheritDoc @apollo/client!QueryOptions#query:member} */ + query: DocumentNode | TypedDocumentNode; + + /** {@inheritDoc @apollo/client!QueryOptions#variables:member} */ + variables?: TVariables; + + /** {@inheritDoc @apollo/client!QueryOptions#errorPolicy:member} */ + errorPolicy?: ErrorPolicy; + + /** {@inheritDoc @apollo/client!QueryOptions#context:member} */ + context?: DefaultContext; + + /** {@inheritDoc @apollo/client!QueryOptions#pollInterval:member} */ + pollInterval?: number; + + /** {@inheritDoc @apollo/client!QueryOptions#notifyOnNetworkStatusChange:member} */ + notifyOnNetworkStatusChange?: boolean; + + /** {@inheritDoc @apollo/client!QueryOptions#returnPartialData:member} */ + returnPartialData?: boolean; + + /** {@inheritDoc @apollo/client!QueryOptions#partialRefetch:member} */ + partialRefetch?: boolean; + + /** {@inheritDoc @apollo/client!QueryOptions#canonizeResults:member} */ + canonizeResults?: boolean; } export interface NextFetchPolicyContext< diff --git a/src/testing/core/observableToPromise.ts b/src/testing/core/observableToPromise.ts index 004a013593c..428517e1aff 100644 --- a/src/testing/core/observableToPromise.ts +++ b/src/testing/core/observableToPromise.ts @@ -1,21 +1,26 @@ import type { ObservableQuery, ApolloQueryResult } from "../../core/index.js"; import type { ObservableSubscription } from "../../utilities/index.js"; -/** - * - * @param observable the observable query to subscribe to - * @param shouldResolve should we resolve after seeing all our callbacks [default: true] - * (use this if you are racing the promise against another) - * @param wait how long to wait after seeing desired callbacks before resolving - * [default: -1 => don't wait] - * @param errorCallbacks an expected set of errors - */ -export type Options = { +export interface Options { + /** + * The ObservableQuery to subscribe to. + */ observable: ObservableQuery; + /** + * Should we resolve after seeing all our callbacks? [default: true] + * (use this if you are racing the promise against another) + */ shouldResolve?: boolean; + /** + * How long to wait after seeing desired callbacks before resolving? + * [default: -1 => don't wait] + */ wait?: number; + /** + * An expected set of errors. + */ errorCallbacks?: ((error: Error) => any)[]; -}; +} export type ResultCallback = (result: ApolloQueryResult) => any; diff --git a/tsconfig.json b/tsconfig.json index a872c60ff05..1285cfa64dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,6 @@ "skipLibCheck": true, "moduleResolution": "node", "importHelpers": true, - "removeComments": true, "sourceMap": true, "declaration": true, "declarationMap": true,