Skip to content

Commit

Permalink
Merge pull request #11698 from apollographql/release-3.10
Browse files Browse the repository at this point in the history
Release 3.10.0
  • Loading branch information
phryneas authored Apr 24, 2024
2 parents 31c3df4 + 004b176 commit 0fbd073
Show file tree
Hide file tree
Showing 69 changed files with 4,019 additions and 91 deletions.
66 changes: 63 additions & 3 deletions .api-reports/api-report-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import type { DocumentNode } from 'graphql';
import type { FieldNode } from 'graphql';
import type { FragmentDefinitionNode } from 'graphql';
import type { InlineFragmentNode } from 'graphql';
import { Observable } from 'zen-observable-ts';
import type { SelectionSetNode } from 'graphql';
import { Trie } from '@wry/trie';
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';

// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts
//
Expand Down Expand Up @@ -63,6 +64,8 @@ export abstract class ApolloCache<TSerialized> implements DataProxy {
updateQuery<TData = any, TVariables = any>(options: Cache_2.UpdateQueryOptions<TData, TVariables>, update: (data: TData | null) => TData | null | void): TData | null;
// (undocumented)
abstract watch<TData = any, TVariables = any>(watch: Cache_2.WatchOptions<TData, TVariables>): () => void;
// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
watchFragment<TData = any, TVars = OperationVariables>(options: WatchFragmentOptions<TData, TVars>): Observable<WatchFragmentResult<TData>>;
// (undocumented)
abstract write<TData = any, TVariables = any>(write: Cache_2.WriteOptions<TData, TVariables>): Reference | undefined;
// (undocumented)
Expand Down Expand Up @@ -274,6 +277,40 @@ export interface DataProxy {
writeQuery<TData = any, TVariables = any>(options: DataProxy.WriteQueryOptions<TData, TVariables>): Reference | undefined;
}

// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartial<T> = T extends DeepPartialPrimitive ? T : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue> : T extends ReadonlyMap<infer TKey, infer TValue> ? DeepPartialReadonlyMap<TKey, TValue> : T extends Set<infer TItem> ? DeepPartialSet<TItem> : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem> : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray<infer TItem>) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray<DeepPartial<TItem | undefined>> : Array<DeepPartial<TItem | undefined>> : DeepPartialObject<T> : DeepPartialObject<T> : unknown;

// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartialMap<TKey, TValue> = {} & Map<DeepPartial<TKey>, DeepPartial<TValue>>;

// @public (undocumented)
type DeepPartialObject<T extends object> = {
[K in keyof T]?: DeepPartial<T[K]>;
};

// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartialPrimitive = Primitive | Date | RegExp;

// @public (undocumented)
type DeepPartialReadonlyMap<TKey, TValue> = {} & ReadonlyMap<DeepPartial<TKey>, DeepPartial<TValue>>;

// @public (undocumented)
type DeepPartialReadonlySet<T> = {} & ReadonlySet<DeepPartial<T>>;

// @public (undocumented)
type DeepPartialSet<T> = {} & Set<DeepPartial<T>>;

// Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
Expand Down Expand Up @@ -533,8 +570,6 @@ export class InMemoryCache extends ApolloCache<NormalizedCacheObject> {
protected broadcastWatches(options?: BroadcastOptions): void;
// (undocumented)
protected config: InMemoryCacheConfig;
// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
//
// (undocumented)
diff<TData, TVariables extends OperationVariables = any>(options: Cache_2.DiffOptions<TData, TVariables>): Cache_2.DiffResult<TData>;
// (undocumented)
Expand Down Expand Up @@ -824,6 +859,9 @@ export type PossibleTypesMap = {
[supertype: string]: string[];
};

// @public (undocumented)
type Primitive = null | undefined | string | number | boolean | symbol | bigint;

// @public (undocumented)
type ReactiveListener<T> = (value: T) => any;

Expand Down Expand Up @@ -936,6 +974,28 @@ export type TypePolicy = {
};
};

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
optimistic?: boolean;
variables?: TVars;
}

// @public
export type WatchFragmentResult<TData> = {
data: TData;
complete: true;
missing?: never;
} | {
data: DeepPartial<TData>;
complete: false;
missing: MissingTree;
};

// @public (undocumented)
interface WriteContext extends ReadMergeModifyContext {
// (undocumented)
Expand Down
61 changes: 61 additions & 0 deletions .api-reports/api-report-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export abstract class ApolloCache<TSerialized> implements DataProxy {
updateQuery<TData = any, TVariables = any>(options: Cache_2.UpdateQueryOptions<TData, TVariables>, update: (data: TData | null) => TData | null | void): TData | null;
// (undocumented)
abstract watch<TData = any, TVariables = any>(watch: Cache_2.WatchOptions<TData, TVariables>): () => void;
watchFragment<TData = any, TVars = OperationVariables>(options: WatchFragmentOptions<TData, TVars>): Observable<WatchFragmentResult<TData>>;
// (undocumented)
abstract write<TData = any, TVariables = any>(write: Cache_2.WriteOptions<TData, TVariables>): Reference | undefined;
// (undocumented)
Expand Down Expand Up @@ -133,6 +134,7 @@ export class ApolloClient<TCacheShape> implements DataProxy {
readonly typeDefs: ApolloClientOptions<TCacheShape>["typeDefs"];
// (undocumented)
version: string;
watchFragment<TFragmentData = unknown, TVariables = OperationVariables>(options: WatchFragmentOptions<TFragmentData, TVariables>): Observable<WatchFragmentResult<TFragmentData>>;
watchQuery<T = any, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
writeFragment<TData = any, TVariables = OperationVariables>(options: DataProxy.WriteFragmentOptions<TData, TVariables>): Reference | undefined;
writeQuery<TData = any, TVariables = OperationVariables>(options: DataProxy.WriteQueryOptions<TData, TVariables>): Reference | undefined;
Expand Down Expand Up @@ -520,6 +522,40 @@ export interface DataProxy {
writeQuery<TData = any, TVariables = any>(options: DataProxy.WriteQueryOptions<TData, TVariables>): Reference | undefined;
}

// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartial<T> = T extends DeepPartialPrimitive ? T : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue> : T extends ReadonlyMap<infer TKey, infer TValue> ? DeepPartialReadonlyMap<TKey, TValue> : T extends Set<infer TItem> ? DeepPartialSet<TItem> : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem> : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray<infer TItem>) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray<DeepPartial<TItem | undefined>> : Array<DeepPartial<TItem | undefined>> : DeepPartialObject<T> : DeepPartialObject<T> : unknown;

// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartialMap<TKey, TValue> = {} & Map<DeepPartial<TKey>, DeepPartial<TValue>>;

// @public (undocumented)
type DeepPartialObject<T extends object> = {
[K in keyof T]?: DeepPartial<T[K]>;
};

// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartialPrimitive = Primitive | Date | RegExp;

// @public (undocumented)
type DeepPartialReadonlyMap<TKey, TValue> = {} & ReadonlyMap<DeepPartial<TKey>, DeepPartial<TValue>>;

// @public (undocumented)
type DeepPartialReadonlySet<T> = {} & ReadonlySet<DeepPartial<T>>;

// @public (undocumented)
type DeepPartialSet<T> = {} & Set<DeepPartial<T>>;

// @public (undocumented)
export interface DefaultContext extends Record<string, any> {
}
Expand Down Expand Up @@ -1633,6 +1669,9 @@ export type PossibleTypesMap = {
[supertype: string]: string[];
};

// @public (undocumented)
type Primitive = null | undefined | string | number | boolean | symbol | bigint;

// @public (undocumented)
const print_2: ((ast: ASTNode) => string) & {
reset(): void;
Expand Down Expand Up @@ -2171,6 +2210,28 @@ export interface UriFunction {
(operation: Operation): string;
}

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
optimistic?: boolean;
variables?: TVars;
}

// @public
export type WatchFragmentResult<TData> = {
data: TData;
complete: true;
missing?: never;
} | {
data: DeepPartial<TData>;
complete: false;
missing: MissingTree;
};

// @public (undocumented)
export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

Expand Down
31 changes: 28 additions & 3 deletions .api-reports/api-report-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ abstract class ApolloCache<TSerialized> implements DataProxy {
updateQuery<TData = any, TVariables = any>(options: Cache_2.UpdateQueryOptions<TData, TVariables>, update: (data: TData | null) => TData | null | void): TData | null;
// (undocumented)
abstract watch<TData = any, TVariables = any>(watch: Cache_2.WatchOptions<TData, TVariables>): () => void;
// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts
watchFragment<TData = any, TVars = OperationVariables>(options: WatchFragmentOptions<TData, TVars>): Observable<WatchFragmentResult<TData>>;
// Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -155,7 +159,7 @@ class ApolloClient<TCacheShape> implements DataProxy {
readonly typeDefs: ApolloClientOptions<TCacheShape>["typeDefs"];
// (undocumented)
version: string;
// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
watchFragment<TFragmentData = unknown, TVariables = OperationVariables>(options: WatchFragmentOptions<TFragmentData, TVariables>): Observable<WatchFragmentResult<TFragmentData>>;
// 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
watchQuery<T = any, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
Expand Down Expand Up @@ -537,7 +541,7 @@ type ConcastSourcesIterable<T> = Iterable<Source<T>>;
export interface Context extends Record<string, any> {
}

// @alpha
// @public
export function createQueryPreloader(client: ApolloClient<any>): PreloadQueryFunction;

// @public (undocumented)
Expand Down Expand Up @@ -1753,7 +1757,6 @@ export interface QueryReference<TData = unknown, TVariables = unknown> {
//
// @internal (undocumented)
readonly [QUERY_REFERENCE_SYMBOL]: InternalQueryReference<TData>;
// @alpha
toPromise(): Promise<QueryReference<TData, TVariables>>;
}

Expand Down Expand Up @@ -2356,6 +2359,28 @@ TVariables
variables: TVariables;
};

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
optimistic?: boolean;
variables?: TVars;
}

// @public
type WatchFragmentResult<TData> = {
data: TData;
complete: true;
missing?: never;
} | {
data: DeepPartial<TData>;
complete: false;
missing: MissingTree;
};

// @public (undocumented)
type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

Expand Down
65 changes: 64 additions & 1 deletion .api-reports/api-report-react_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ abstract class ApolloCache<TSerialized> implements DataProxy {
updateQuery<TData = any, TVariables = any>(options: Cache_2.UpdateQueryOptions<TData, TVariables>, update: (data: TData | null) => TData | null | void): TData | null;
// (undocumented)
abstract watch<TData = any, TVariables = any>(watch: Cache_2.WatchOptions<TData, TVariables>): () => void;
// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts
watchFragment<TData = any, TVars = OperationVariables>(options: WatchFragmentOptions<TData, TVars>): Observable<WatchFragmentResult<TData>>;
// Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -156,7 +160,7 @@ class ApolloClient<TCacheShape> implements DataProxy {
readonly typeDefs: ApolloClientOptions<TCacheShape>["typeDefs"];
// (undocumented)
version: string;
// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts
watchFragment<TFragmentData = unknown, TVariables = OperationVariables>(options: WatchFragmentOptions<TFragmentData, TVariables>): Observable<WatchFragmentResult<TFragmentData>>;
// 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
watchQuery<T = any, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
Expand Down Expand Up @@ -555,6 +559,40 @@ interface DataProxy {
writeQuery<TData = any, TVariables = any>(options: DataProxy.WriteQueryOptions<TData, TVariables>): Reference | undefined;
}

// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartial<T> = T extends DeepPartialPrimitive ? T : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue> : T extends ReadonlyMap<infer TKey, infer TValue> ? DeepPartialReadonlyMap<TKey, TValue> : T extends Set<infer TItem> ? DeepPartialSet<TItem> : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem> : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray<infer TItem>) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray<DeepPartial<TItem | undefined>> : Array<DeepPartial<TItem | undefined>> : DeepPartialObject<T> : DeepPartialObject<T> : unknown;

// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartialMap<TKey, TValue> = {} & Map<DeepPartial<TKey>, DeepPartial<TValue>>;

// @public (undocumented)
type DeepPartialObject<T extends object> = {
[K in keyof T]?: DeepPartial<T[K]>;
};

// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type DeepPartialPrimitive = Primitive | Date | RegExp;

// @public (undocumented)
type DeepPartialReadonlyMap<TKey, TValue> = {} & ReadonlyMap<DeepPartial<TKey>, DeepPartial<TValue>>;

// @public (undocumented)
type DeepPartialReadonlySet<T> = {} & ReadonlySet<DeepPartial<T>>;

// @public (undocumented)
type DeepPartialSet<T> = {} & Set<DeepPartial<T>>;

// @public (undocumented)
interface DefaultContext extends Record<string, any> {
}
Expand Down Expand Up @@ -1192,6 +1230,9 @@ type OperationVariables = Record<string, any>;
// @public (undocumented)
type Path = ReadonlyArray<string | number>;

// @public (undocumented)
type Primitive = null | undefined | string | number | boolean | symbol | bigint;

// @public @deprecated (undocumented)
export function Query<TData = any, TVariables extends OperationVariables = OperationVariables>(props: QueryComponentOptions<TData, TVariables>): ReactTypes.JSX.Element | null;

Expand Down Expand Up @@ -1699,6 +1740,28 @@ interface UriFunction {
(operation: Operation): string;
}

// @public
interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
optimistic?: boolean;
variables?: TVars;
}

// @public
type WatchFragmentResult<TData> = {
data: TData;
complete: true;
missing?: never;
} | {
data: DeepPartial<TData>;
complete: false;
missing: MissingTree;
};

// @public (undocumented)
type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

Expand Down
Loading

0 comments on commit 0fbd073

Please sign in to comment.