From 32575172adfcc7e371cd311df47f99d803af5095 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Thu, 17 Apr 2025 12:14:41 +0200 Subject: [PATCH 1/2] fix up some type exports in `/core` --- src/core/index.ts | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/core/index.ts b/src/core/index.ts index 72b3414847d..fd079e45052 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -62,15 +62,27 @@ export { /* Cache */ export type { + ApolloReducerConfig, Cache, DataProxy, + DiffQueryAgainstStoreOptions, FieldFunctionOptions, FieldMergeFunction, FieldPolicy, FieldReadFunction, + IdGetter, + IdGetterObj, InMemoryCacheConfig, + MergeInfo, + MergeTree, + NormalizedCache, + NormalizedCacheObject, + OptimisticStoreItem, PossibleTypesMap, ReactiveVar, + ReadMergeModifyContext, + ReadQueryOptions, + StoreValue, // All the exports (types) from ../cache, minus cacheSlot, // which we want to keep semi-private. Transaction, @@ -88,21 +100,6 @@ export { MissingFieldError, } from "@apollo/client/cache"; -export type { - ApolloReducerConfig, - DiffQueryAgainstStoreOptions, - IdGetter, - IdGetterObj, - MergeInfo, - MergeTree, - NormalizedCache, - NormalizedCacheObject, - OptimisticStoreItem, - ReadMergeModifyContext, - ReadQueryOptions, - StoreValue, -} from "../cache/inmemory/types.js"; - /* Link */ export { From 73566d2a6e6b7a05b4d1d5c5b7ac978ca93625a8 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Thu, 17 Apr 2025 12:29:38 +0200 Subject: [PATCH 2/2] update api report --- .api-reports/api-report-core.api.md | 972 +--------------------------- 1 file changed, 23 insertions(+), 949 deletions(-) diff --git a/.api-reports/api-report-core.api.md b/.api-reports/api-report-core.api.md index e219b9e223d..a544eb870c7 100644 --- a/.api-reports/api-report-core.api.md +++ b/.api-reports/api-report-core.api.md @@ -5,10 +5,9 @@ ```ts import { ApolloCache } from '@apollo/client/cache'; -import type { ApolloCache as ApolloCache_3 } from '@apollo/client'; import { ApolloLink } from '@apollo/client/link/core'; import { ApolloPayloadResult } from '@apollo/client/link/core'; -import type { AsStoreObject } from '@apollo/client/utilities'; +import { ApolloReducerConfig } from '@apollo/client/cache'; import type { ASTNode } from 'graphql'; import { Cache as Cache_2 } from '@apollo/client/cache'; import { checkFetcher } from '@apollo/client/link/http'; @@ -23,6 +22,7 @@ import { DataProxy } from '@apollo/client/cache'; import type { DeepPartial } from '@apollo/client/utilities'; import { defaultDataIdFromObject } from '@apollo/client/cache'; import { defaultPrinter } from '@apollo/client/link/http'; +import { DiffQueryAgainstStoreOptions } from '@apollo/client/cache'; import { disableExperimentalFragmentVariables } from 'graphql-tag'; import { disableFragmentWarnings } from 'graphql-tag'; import { DocumentNode } from '@apollo/client/link/core'; @@ -43,20 +43,17 @@ import type { FieldNode } from 'graphql'; import { FieldPolicy } from '@apollo/client/cache'; import { FieldReadFunction } from '@apollo/client/cache'; import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; import type { FragmentMap } from '@apollo/client/utilities'; -import type { FragmentMapFunction } from '@apollo/client/utilities'; import { FragmentType } from '@apollo/client/masking'; import { from } from '@apollo/client/link/core'; -import { getApolloCacheMemoryInternals } from '@apollo/client/utilities/internal'; import { getApolloClientMemoryInternals } from '@apollo/client/utilities/internal'; -import { getInMemoryCacheMemoryInternals } from '@apollo/client/utilities/internal'; import { gql } from 'graphql-tag'; import { GraphQLRequest } from '@apollo/client/link/core'; import { HttpLink } from '@apollo/client/link/http'; import { HttpOptions } from '@apollo/client/link/http'; +import { IdGetter } from '@apollo/client/cache'; +import { IdGetterObj } from '@apollo/client/cache'; import { IncrementalPayload } from '@apollo/client/link/core'; -import type { InlineFragmentNode } from 'graphql'; import { InMemoryCache } from '@apollo/client/cache'; import { InMemoryCacheConfig } from '@apollo/client/cache'; import type { InteropObservable } from 'rxjs'; @@ -67,19 +64,25 @@ import { makeVar } from '@apollo/client/cache'; import { Masked } from '@apollo/client/masking'; import { MaskedDocumentNode } from '@apollo/client/masking'; import { MaybeMasked } from '@apollo/client/masking'; +import { MergeInfo } from '@apollo/client/cache'; import { mergeOptions } from '@apollo/client/utilities'; +import { MergeTree } from '@apollo/client/cache'; import { MissingFieldError } from '@apollo/client/cache'; import { NextLink } from '@apollo/client/link/core'; import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities'; +import { NormalizedCache } from '@apollo/client/cache'; +import { NormalizedCacheObject } from '@apollo/client/cache'; import { Observable } from '@apollo/client/utilities'; import { Observable as Observable_2 } from 'rxjs'; import type { Observer } from 'rxjs'; import { Operation } from '@apollo/client/link/core'; -import type { OperationVariables as OperationVariables_2 } from '@apollo/client'; +import { OptimisticStoreItem } from '@apollo/client/cache'; import { parseAndCheckHttpResponse } from '@apollo/client/link/http'; import { Path } from '@apollo/client/link/core'; import { PossibleTypesMap } from '@apollo/client/cache'; import { ReactiveVar } from '@apollo/client/cache'; +import { ReadMergeModifyContext } from '@apollo/client/cache'; +import { ReadQueryOptions } from '@apollo/client/cache'; import { Reference } from '@apollo/client/utilities'; import type { Reference as Reference_2 } from '@apollo/client/cache'; import { RequestHandler } from '@apollo/client/link/core'; @@ -87,7 +90,6 @@ import { resetCaches } from 'graphql-tag'; import { rewriteURIForGET } from '@apollo/client/link/http'; import { selectHttpOptionsAndBody } from '@apollo/client/link/http'; import { selectHttpOptionsAndBodyInternal } from '@apollo/client/link/http'; -import type { SelectionSetNode } from 'graphql'; import { selectURI } from '@apollo/client/link/http'; import { serializeFetchParameter } from '@apollo/client/link/http'; import { ServerError } from '@apollo/client/errors'; @@ -96,13 +98,12 @@ import { setVerbosity as setLogVerbosity } from '@apollo/client/utilities/invari import { SingleExecutionResult } from '@apollo/client/link/core'; import { split } from '@apollo/client/link/core'; import { StoreObject } from '@apollo/client/utilities'; -import type { StoreValue } from '@apollo/client/utilities'; +import { StoreValue } from '@apollo/client/cache'; import type { Subscribable } from 'rxjs'; import type { Subscription } from 'rxjs'; import { Transaction } from '@apollo/client/cache'; import { Trie } from '@wry/trie'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { TypedDocumentNode as TypedDocumentNode_2 } from '@apollo/client'; import { TypePolicies } from '@apollo/client/cache'; import { TypePolicy } from '@apollo/client/cache'; import { UnconventionalError } from '@apollo/client/errors'; @@ -111,78 +112,8 @@ import { UriFunction } from '@apollo/client/link/http'; import { WatchFragmentOptions } from '@apollo/client/cache'; import { WatchFragmentResult } from '@apollo/client/cache'; -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - export { ApolloCache } -// Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache_2 implements DataProxy_2 { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_3.BatchOptions): U; - abstract diff(query: Cache_3.DiffOptions): Cache_3.DiffResult; - // (undocumented) - abstract evict(options: Cache_3.EvictOptions): boolean; - abstract extract(optimistic?: boolean): unknown; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_3.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction_2, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_3" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_3.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_3.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_3.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction_2, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_3.ResetOptions): Promise; - abstract restore(serializedState: unknown): this; - // (undocumented) - transformDocument(document: DocumentNode_2): DocumentNode_2; - // (undocumented) - transformForLink(document: DocumentNode_2): DocumentNode_2; - // (undocumented) - updateFragment(options: Cache_3.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_3.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_3.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult_2" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions_2): Observable_2>; - // (undocumented) - abstract write(write: Cache_3.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_3.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_3.WriteQueryOptions): Reference | undefined; -} - // @public export class ApolloClient implements DataProxy { // (undocumented) @@ -288,130 +219,10 @@ export interface ApolloQueryResult { partial: boolean; } -// @public (undocumented) -export type ApolloReducerConfig = { - dataIdFromObject?: KeyFieldsFunction; -}; - -// Warning: (ae-forgotten-export) The symbol "InMemoryCache_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; +export { ApolloReducerConfig } export { Cache_2 as Cache } -// @public (undocumented) -namespace Cache_3 { - // Warning: (ae-forgotten-export) The symbol "ApolloCache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface BatchOptions { - // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_3.WatchOptions, diff: Cache_3.DiffResult, lastDiff?: Cache_3.DiffResult | undefined) => any; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_3" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy_2.Query { - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_3.DiffResult, lastDiff?: Cache_3.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_3" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_3" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -class CacheGroup { - constructor(caching: boolean, parent?: CacheGroup | null); - // (undocumented) - readonly caching: boolean; - // (undocumented) - depend(dataId: string, storeFieldName: string): void; - // (undocumented) - dirty(dataId: string, storeFieldName: string): void; - // (undocumented) - keyMaker: Trie; - // (undocumented) - resetCaching(): void; -} - // @public (undocumented) const enum CacheWriteBehavior { // (undocumented) @@ -422,9 +233,6 @@ const enum CacheWriteBehavior { OVERWRITE = 1 } -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - export { checkFetcher } export { ClientParseError } @@ -443,83 +251,6 @@ export { DataMasking } export { DataProxy } -// @public (undocumented) -namespace DataProxy_2 { - // (undocumented) - type DiffResult = { - result: TData; - complete: true; - missing?: never; - fromOptimisticTransaction?: boolean; - } | { - result: DeepPartial | null; - complete: false; - missing?: MissingFieldError_2; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode_2 | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode_2 | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy_2 { - readFragment(options: DataProxy_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy_2.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy_2.WriteQueryOptions): Reference | undefined; -} - // @public (undocumented) export interface DefaultContext extends Record { } @@ -538,25 +269,13 @@ export interface DefaultOptions { export { defaultPrinter } -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - // @public (undocumented) interface DevtoolsOptions { enabled?: boolean; name?: string; } -// @public (undocumented) -export type DiffQueryAgainstStoreOptions = ReadQueryOptions & { - returnPartialData?: boolean; -}; +export { DiffQueryAgainstStoreOptions } export { disableExperimentalFragmentVariables } @@ -572,106 +291,6 @@ export { empty } export { enableExperimentalFragmentVariables } -// @public (undocumented) -abstract class EntityStore implements NormalizedCache { - constructor(policies: Policies, group: CacheGroup); - // Warning: (ae-forgotten-export) The symbol "Layer" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // Warning: (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - clear(): void; - // (undocumented) - protected data: NormalizedCacheObject; - // (undocumented) - delete(dataId: string, fieldName?: string, args?: Record): boolean; - // (undocumented) - evict(options: Cache_3.EvictOptions, limit: EntityStore): boolean; - // (undocumented) - extract(): NormalizedCacheObject; - // (undocumented) - findChildRefIds(dataId: string): Record; - // (undocumented) - gc(): string[]; - // (undocumented) - get(dataId: string, fieldName: string): StoreValue; - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFieldValue: (objectOrReference: StoreObject | Reference | undefined, storeFieldName: string) => SafeReadonly; - // (undocumented) - getRootIdSet(ids?: Set): Set; - // Warning: (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; - // Warning: (ae-forgotten-export) The symbol "CacheGroup" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly group: CacheGroup; - // (undocumented) - has(dataId: string): boolean; - // (undocumented) - protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - makeCacheKey(document: DocumentNode_2, callback: Cache_3.WatchCallback, details: string): object; - makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined): object; - makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // @deprecated (undocumented) - makeCacheKey(...args: any[]): object; - // (undocumented) - merge(older: string | StoreObject, newer: StoreObject | string): void; - // (undocumented) - modify(dataId: string, fields: Modifier | Modifiers>): boolean; - // Warning: (ae-forgotten-export) The symbol "Policies" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly policies: Policies; - // (undocumented) - release(rootId: string): number; - // (undocumented) - abstract removeLayer(layerId: string): EntityStore; - // (undocumented) - replace(newData: NormalizedCacheObject | null): void; - // (undocumented) - retain(rootId: string): number; - // (undocumented) - get supportsResultCaching(): boolean; - // (undocumented) - toObject(): NormalizedCacheObject; - // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - toReference: ToReferenceFunction; -} - -// @public (undocumented) -namespace EntityStore { - // (undocumented) - class Root extends EntityStore { - constructor({ policies, resultCaching, seed, }: { - policies: Policies; - resultCaching?: boolean; - seed?: NormalizedCacheObject; - }); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - removeLayer(): Root; - // (undocumented) - readonly storageTrie: Trie; - // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly stump: Stump; - } -} - // @public export interface ErrorLike { // (undocumented) @@ -719,98 +338,15 @@ export { FetchResult } export { FieldFunctionOptions } -// @public (undocumented) -interface FieldFunctionOptions_2, TVars = Record> { - // (undocumented) - args: TArgs | null; - // (undocumented) - cache: InMemoryCache_2; - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - field: FieldNode | null; - // (undocumented) - fieldName: string; - // (undocumented) - isReference: typeof isReference; - // Warning: (ae-forgotten-export) The symbol "MergeObjectsFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - mergeObjects: MergeObjectsFunction; - // Warning: (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readField: ReadFieldFunction; - // (undocumented) - storage: StorageType; - // (undocumented) - storeFieldName: string; - // (undocumented) - toReference: ToReferenceFunction; - // (undocumented) - variables?: TVars; -} - export { FieldMergeFunction } -// Warning: (ae-forgotten-export) The symbol "FieldFunctionOptions_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FieldMergeFunction_2 = (existing: SafeReadonly | undefined, incoming: SafeReadonly, options: TOptions) => SafeReadonly; - export { FieldPolicy } -// @public (undocumented) -type FieldPolicy_2 = { - keyArgs?: KeySpecifier | KeyArgsFunction | false; - read?: FieldReadFunction_2; - merge?: FieldMergeFunction_2 | boolean; -}; - export { FieldReadFunction } -// @public (undocumented) -type FieldReadFunction_2 = (existing: SafeReadonly | undefined, options: TOptions) => TReadResult | undefined; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// Warning: (ae-forgotten-export) The symbol "EntityStore" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FieldValueGetter = EntityStore["getFieldValue"]; - -// Warning: (ae-forgotten-export) The symbol "WriteContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FlavorableWriteContext = Pick; - // @public (undocumented) export type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; -// @public (undocumented) -interface FragmentRegistryAPI { - // (undocumented) - lookup(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - register(...fragments: DocumentNode_2[]): this; - // (undocumented) - resetCaches(): void; - // (undocumented) - transform(document: D): D; -} - export { FragmentType } export { from } @@ -823,18 +359,9 @@ export { HttpLink } export { HttpOptions } -// @public (undocumented) -export type IdGetter = (value: IdGetterObj) => string | undefined; +export { IdGetter } -// @public (undocumented) -export interface IdGetterObj extends Object { - // (undocumented) - __typename?: string; - // (undocumented) - id?: string; - // (undocumented) - _id?: string; -} +export { IdGetterObj } // @public (undocumented) interface IgnoreModifier { @@ -849,95 +376,8 @@ export { IncrementalPayload } export { InMemoryCache } -// @public (undocumented) -class InMemoryCache_2 extends ApolloCache_2 { - constructor(config?: InMemoryCacheConfig_2); - // (undocumented) - readonly assumeImmutableResults = true; - // (undocumented) - batch(options: Cache_3.BatchOptions): TUpdateResult; - // Warning: (ae-forgotten-export) The symbol "BroadcastOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - protected broadcastWatches(options?: BroadcastOptions): void; - // Warning: (ae-forgotten-export) The symbol "InMemoryCacheConfig_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - protected config: InMemoryCacheConfig_2; - // (undocumented) - diff(options: Cache_3.DiffOptions): Cache_3.DiffResult; - // (undocumented) - evict(options: Cache_3.EvictOptions): boolean; - // (undocumented) - extract(optimistic?: boolean): NormalizedCacheObject; - // (undocumented) - fragmentMatches(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(options?: { - resetResultCache?: boolean; - }): string[]; - // @internal - getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // Warning: (ae-forgotten-export) The symbol "makeVar_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly makeVar: typeof makeVar_2; - // (undocumented) - modify = Record>(options: Cache_3.ModifyOptions): boolean; - // (undocumented) - performTransaction(update: (cache: InMemoryCache_2) => any, optimisticId?: string | null): any; - // (undocumented) - readonly policies: Policies; - // (undocumented) - read(options: Cache_3.ReadOptions & { - returnPartialData: true; - }): TData | DeepPartial | null; - // (undocumented) - read(options: Cache_3.ReadOptions): TData | null; - // (undocumented) - release(rootId: string, optimistic?: boolean): number; - // (undocumented) - removeOptimistic(idToRemove: string): void; - // (undocumented) - reset(options?: Cache_3.ResetOptions): Promise; - // (undocumented) - restore(data: NormalizedCacheObject): this; - // (undocumented) - retain(rootId: string, optimistic?: boolean): number; - // (undocumented) - transformDocument(document: DocumentNode_2): DocumentNode_2; - // (undocumented) - watch(watch: Cache_3.WatchOptions): () => void; - // (undocumented) - write(options: Cache_3.WriteOptions): Reference | undefined; -} - export { InMemoryCacheConfig } -// @public (undocumented) -interface InMemoryCacheConfig_2 extends ApolloReducerConfig { - // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fragments?: FragmentRegistryAPI; - // Warning: (ae-forgotten-export) The symbol "PossibleTypesMap_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - possibleTypes?: PossibleTypesMap_2; - // @deprecated (undocumented) - resultCacheMaxSize?: number; - // (undocumented) - resultCaching?: boolean; - // Warning: (ae-forgotten-export) The symbol "TypePolicies_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - typePolicies?: TypePolicies_2; -} - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts // // @public (undocumented) @@ -960,69 +400,11 @@ export type InternalRefetchQueriesResult = TResult extends boolean ? Pr // @public (undocumented) export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - // @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; export { isReference } -// @public (undocumented) -type KeyArgsFunction = (args: Record | null, context: { - typename: string; - fieldName: string; - field: FieldNode | null; - variables?: Record; -}) => KeySpecifier | false | ReturnType; - -// @public (undocumented) -type KeyFieldsContext = { - typename: string | undefined; - storeObject: StoreObject; - readField: ReadFieldFunction; - selectionSet?: SelectionSetNode; - fragmentMap?: FragmentMap; - keyObject?: Record; -}; - -// Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type KeyFieldsFunction = (object: Readonly, context: KeyFieldsContext) => KeySpecifier | false | ReturnType; - -// @public (undocumented) -type KeySpecifier = ReadonlyArray; - -// @public (undocumented) -class Layer extends EntityStore { - constructor(id: string, parent: EntityStore, replay: (layer: EntityStore) => any, group: CacheGroup); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - findChildRefIds(dataId: string): Record; - // (undocumented) - getStorage(...args: Parameters): StorageType; - // (undocumented) - readonly group: CacheGroup; - // (undocumented) - readonly id: string; - // (undocumented) - readonly parent: EntityStore; - // (undocumented) - removeLayer(layerId: string): EntityStore; - // (undocumented) - readonly replay: (layer: EntityStore) => any; - // (undocumented) - toObject(): NormalizedCacheObject; -} - // @public (undocumented) class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts @@ -1072,11 +454,6 @@ export { makeReference } export { makeVar } -// Warning: (ae-forgotten-export) The symbol "ReactiveVar_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function makeVar_2(value: T): ReactiveVar_2; - export { Masked } export { MaskedDocumentNode } @@ -1105,28 +482,11 @@ interface MaskOperationOptions { export { MaybeMasked } -// @public (undocumented) -export interface MergeInfo { - // (undocumented) - field: FieldNode; - // (undocumented) - merge: FieldMergeFunction_2; - // (undocumented) - typename: string | undefined; -} - -// @public (undocumented) -type MergeObjectsFunction = (existing: T, incoming: T) => T; +export { MergeInfo } export { mergeOptions } -// @public (undocumented) -export interface MergeTree { - // (undocumented) - info?: MergeInfo; - // (undocumented) - map: Map; -} +export { MergeTree } // @public (undocumented) export type MethodKeys = { @@ -1135,53 +495,6 @@ export type MethodKeys = { export { MissingFieldError } -// @public (undocumented) -class MissingFieldError_2 extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode_2, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode_2; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - // @public (undocumented) export interface MutateResult { data: TData | undefined; @@ -1273,48 +586,9 @@ interface NextFetchPolicyContext { export { NextLink } -// @public -export interface NormalizedCache { - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - clear(): void; - // (undocumented) - delete(dataId: string, fieldName?: string): boolean; - // (undocumented) - get(dataId: string, fieldName: string): StoreValue; - // Warning: (ae-forgotten-export) The symbol "FieldValueGetter" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFieldValue: FieldValueGetter; - // (undocumented) - getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; - // (undocumented) - has(dataId: string): boolean; - // (undocumented) - merge(olderId: string, newerObject: StoreObject): void; - // (undocumented) - merge(olderObject: StoreObject, newerId: string): void; - // (undocumented) - modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; - // (undocumented) - release(rootId: string): number; - replace(newData: NormalizedCacheObject): void; - retain(rootId: string): number; - toObject(): NormalizedCacheObject; - // (undocumented) - toReference: ToReferenceFunction; -} +export { NormalizedCache } -// @public -export interface NormalizedCacheObject { - // (undocumented) - [dataId: string]: StoreObject | undefined; - // (undocumented) - __META?: { - extraRootIds: string[]; - }; -} +export { NormalizedCacheObject } export { Observable } @@ -1395,66 +669,14 @@ export { Operation } // @public (undocumented) export type OperationVariables = Record; -// @public (undocumented) -export type OptimisticStoreItem = { - id: string; - data: NormalizedCacheObject; - transaction: Transaction_2; -}; +export { OptimisticStoreItem } export { parseAndCheckHttpResponse } export { Path } -// @public (undocumented) -class Policies { - constructor(config: { - cache: InMemoryCache_2; - dataIdFromObject?: KeyFieldsFunction; - possibleTypes?: PossibleTypesMap_2; - typePolicies?: TypePolicies_2; - }); - // (undocumented) - addPossibleTypes(possibleTypes: PossibleTypesMap_2): void; - // (undocumented) - addTypePolicies(typePolicies: TypePolicies_2): void; - // (undocumented) - readonly cache: InMemoryCache_2; - // (undocumented) - fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string | undefined, result?: Record, variables?: Record): boolean; - // (undocumented) - getMergeFunction(parentTypename: string | undefined, fieldName: string, childTypename: string | undefined): FieldMergeFunction_2 | undefined; - // (undocumented) - getReadFunction(typename: string | undefined, fieldName: string): FieldReadFunction_2 | undefined; - // Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getStoreFieldName(fieldSpec: FieldSpecifier): string; - // (undocumented) - hasKeyArgs(typename: string | undefined, fieldName: string): boolean; - // (undocumented) - identify(object: StoreObject, partialContext?: Partial): [string?, StoreObject?]; - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readField(options: ReadFieldOptions, context: ReadMergeModifyContext): SafeReadonly | undefined; - // (undocumented) - readonly rootIdsByTypename: Record; - // (undocumented) - readonly rootTypenamesById: Record; - // (undocumented) - runMergeFunction(existing: StoreValue, incoming: StoreValue, { field, typename, merge }: MergeInfo, context: WriteContext, storage?: StorageType): any; - // (undocumented) - readonly usingPossibleTypes = false; -} - export { PossibleTypesMap } -// @public (undocumented) -type PossibleTypesMap_2 = { - [supertype: string]: string[]; -}; - // @public (undocumented) class QueryInfo { constructor(queryManager: QueryManager, queryId?: string); @@ -1661,58 +883,11 @@ export interface QueryResult { error?: ErrorLike; } -// @public (undocumented) -type ReactiveListener = (value: T) => any; - export { ReactiveVar } -// @public (undocumented) -interface ReactiveVar_2 { - // (undocumented) - (newValue?: T): T; - // (undocumented) - attachCache(cache: ApolloCache_3): this; - // (undocumented) - forgetCache(cache: ApolloCache_3): boolean; - // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - onNextChange(listener: ReactiveListener): () => void; -} - -// @public (undocumented) -interface ReadFieldFunction { - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -export interface ReadMergeModifyContext { - // (undocumented) - store: NormalizedCache; - // (undocumented) - variables?: OperationVariables_2; - // (undocumented) - varString?: string; -} +export { ReadMergeModifyContext } -// @public (undocumented) -export type ReadQueryOptions = { - store: NormalizedCache; - query: DocumentNode_2; - variables?: Object; - previousResult?: any; - rootId?: string; - config?: ApolloReducerConfig; -}; +export { ReadQueryOptions } export { Reference } @@ -1771,9 +946,6 @@ export interface Resolvers { export { rewriteURIForGET } -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - export { selectHttpOptionsAndBody } export { selectHttpOptionsAndBodyInternal } @@ -1792,27 +964,10 @@ export { SingleExecutionResult } export { split } -// @public (undocumented) -type StorageType = Record; - export { StoreObject } -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - export { StoreValue } -// @public (undocumented) -class Stump extends Layer { - constructor(root: EntityStore.Root); - // (undocumented) - merge(older: string | StoreObject, newer: string | StoreObject): void; - // (undocumented) - removeLayer(): this; -} - // @public (undocumented) export interface SubscribeResult { data: TData | undefined; @@ -1860,14 +1015,8 @@ export interface SubscriptionOptions Reference | undefined; - export { Transaction } -// @public (undocumented) -type Transaction_2 = (c: ApolloCache_2) => void; - // @public (undocumented) interface TransformCacheEntry { // (undocumented) @@ -1892,25 +1041,8 @@ export { TypedDocumentNode } export { TypePolicies } -// @public (undocumented) -type TypePolicies_2 = { - [__typename: string]: TypePolicy_2; -}; - export { TypePolicy } -// @public (undocumented) -type TypePolicy_2 = { - keyFields?: KeySpecifier | KeyFieldsFunction | false; - merge?: FieldMergeFunction_2 | boolean; - queryType?: true; - mutationType?: true; - subscriptionType?: true; - fields?: { - [fieldName: string]: FieldPolicy_2 | FieldReadFunction_2; - }; -}; - export { UnconventionalError } export { Unmasked } @@ -1943,28 +1075,8 @@ export const version: string; export { WatchFragmentOptions } -// @public -interface WatchFragmentOptions_2 { - fragment: DocumentNode_2 | TypedDocumentNode_2; - fragmentName?: string; - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - export { WatchFragmentResult } -// @public -type WatchFragmentResult_2 = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - // @public (undocumented) export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; @@ -1985,46 +1097,8 @@ export interface WatchQueryOptions; - // (undocumented) - readonly fragmentMap: FragmentMap; - // (undocumented) - incomingById: Map; - }>; - // (undocumented) - lookupFragment: FragmentMapFunction; - // (undocumented) - merge(existing: T, incoming: T): T; - // (undocumented) - overwrite: boolean; - // (undocumented) - readonly written: { - [dataId: string]: SelectionSetNode[]; - }; -} - // Warnings were encountered during analysis: // -// src/cache/core/types/DataProxy.ts:139:9 - (ae-forgotten-export) The symbol "MissingFieldError_2" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:62:3 - (ae-forgotten-export) The symbol "TypePolicy_2" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:135:5 - (ae-forgotten-export) The symbol "FieldPolicy_2" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:166:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:166:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "FieldReadFunction_2" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:168:3 - (ae-forgotten-export) The symbol "FieldMergeFunction_2" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:133:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:140:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts // src/core/ObservableQuery.ts:141:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts // src/core/QueryManager.ts:184:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts