Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-3.9' into pr/rehackt
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Nov 8, 2023
2 parents f6be598 + 776631d commit 1af2c34
Show file tree
Hide file tree
Showing 88 changed files with 2,845 additions and 639 deletions.
23 changes: 14 additions & 9 deletions .api-reports/api-report-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ export type ApolloReducerConfig = {
addTypename?: boolean;
};

// @public (undocumented)
type AsStoreObject<T extends {
__typename?: string;
}> = {
[K in keyof T]: T[K];
};

// @public (undocumented)
type BroadcastOptions = Pick<Cache_2.BatchOptions<InMemoryCache>, "optimistic" | "onWatchUpdated">;

Expand Down Expand Up @@ -192,7 +199,7 @@ export const cacheSlot: {

// @public (undocumented)
export const canonicalStringify: ((value: any) => string) & {
reset: typeof resetCanonicalStringify;
reset(): void;
};

// @public (undocumented)
Expand Down Expand Up @@ -858,9 +865,6 @@ export interface Reference {
readonly __ref: string;
}

// @public (undocumented)
function resetCanonicalStringify(): void;

// @public (undocumented)
type SafeReadonly<T> = T extends object ? Readonly<T> : T;

Expand All @@ -875,8 +879,10 @@ export interface StoreObject {
__typename?: string;
}

// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type StoreObjectValueMaybeReference<StoreVal> = StoreVal extends Record<string, any>[] ? Readonly<StoreVal> | readonly Reference[] : StoreVal extends Record<string, any> ? StoreVal | Reference : StoreVal;
type StoreObjectValueMaybeReference<StoreVal> = StoreVal extends Array<infer Item extends Record<string, any>> ? ReadonlyArray<AsStoreObject<Item> | Reference> : StoreVal extends Record<string, any> ? AsStoreObject<StoreVal> | Reference : StoreVal;

// @public (undocumented)
export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object;
Expand Down Expand Up @@ -947,10 +953,9 @@ interface WriteContext extends ReadMergeModifyContext {

// Warnings were encountered during analysis:
//
// src/cache/inmemory/object-canon.ts:203:32 - (ae-forgotten-export) The symbol "resetCanonicalStringify" needs to be exported by the entry point index.d.ts
// 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/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts
// src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts
// src/cache/inmemory/policies.ts:161: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

// (No @packageDocumentation comment for this package)
Expand Down
38 changes: 27 additions & 11 deletions .api-reports/api-report-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { InvariantError } from 'ts-invariant';
import { Observable } from 'zen-observable-ts';
import type { Subscription as ObservableSubscription } from 'zen-observable-ts';
import type { Observer } from 'zen-observable-ts';
import { print as print_3 } from 'graphql';
import { resetCaches } from 'graphql-tag';
import type { SelectionSetNode } from 'graphql';
import { setVerbosity as setLogVerbosity } from 'ts-invariant';
Expand Down Expand Up @@ -100,6 +99,8 @@ export class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -169,6 +170,7 @@ export type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<DefaultContext>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -271,6 +273,13 @@ export type ApolloReducerConfig = {
addTypename?: boolean;
};

// @public (undocumented)
type AsStoreObject<T extends {
__typename?: string;
}> = {
[K in keyof T]: T[K];
};

// @public (undocumented)
interface Body_2 {
// (undocumented)
Expand Down Expand Up @@ -1604,7 +1613,9 @@ export type PossibleTypesMap = {
};

// @public (undocumented)
const print_2: typeof print_3;
const print_2: ((ast: ASTNode) => string) & {
reset(): void;
};

// @public (undocumented)
interface Printer {
Expand Down Expand Up @@ -1642,7 +1653,7 @@ class QueryInfo {
// Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts
//
// (undocumented)
markResult<T>(result: FetchResult<T>, document: DocumentNode, options: Pick<WatchQueryOptions, "variables" | "fetchPolicy" | "errorPolicy">, cacheWriteBehavior: CacheWriteBehavior): void;
markResult<T>(result: FetchResult<T>, document: DocumentNode, options: Pick<WatchQueryOptions, "variables" | "fetchPolicy" | "errorPolicy">, cacheWriteBehavior: CacheWriteBehavior): typeof result;
// (undocumented)
networkError?: Error | null;
// (undocumented)
Expand Down Expand Up @@ -1674,7 +1685,7 @@ export type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1685,6 +1696,7 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1695,6 +1707,8 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
readonly documentTransform: DocumentTransform;
Expand Down Expand Up @@ -2005,8 +2019,10 @@ export interface StoreObject {
__typename?: string;
}

// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type StoreObjectValueMaybeReference<StoreVal> = StoreVal extends Record<string, any>[] ? Readonly<StoreVal> | readonly Reference[] : StoreVal extends Record<string, any> ? StoreVal | Reference : StoreVal;
type StoreObjectValueMaybeReference<StoreVal> = StoreVal extends Array<infer Item extends Record<string, any>> ? ReadonlyArray<AsStoreObject<Item> | Reference> : StoreVal extends Record<string, any> ? AsStoreObject<StoreVal> | Reference : StoreVal;

// @public (undocumented)
export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object;
Expand Down Expand Up @@ -2177,15 +2193,15 @@ interface WriteContext extends ReadMergeModifyContext {

// Warnings were encountered during analysis:
//
// 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/policies.ts:92:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts
// src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts
// src/cache/inmemory/policies.ts:161:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts
// src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
// src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts

Expand Down
5 changes: 3 additions & 2 deletions .api-reports/api-report-link_batch-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type { ExecutionResult } from 'graphql';
import type { GraphQLError } from 'graphql';
import { Observable } from 'zen-observable-ts';
import type { Observer } from 'zen-observable-ts';
import { print as print_3 } from 'graphql';

// @public (undocumented)
class ApolloLink {
Expand Down Expand Up @@ -226,7 +225,9 @@ interface Operation {
type Path = ReadonlyArray<string | number>;

// @public (undocumented)
const print_2: typeof print_3;
const print_2: ((ast: ASTNode) => string) & {
reset(): void;
};

// @public (undocumented)
interface Printer {
Expand Down
5 changes: 3 additions & 2 deletions .api-reports/api-report-link_http.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { GraphQLError } from 'graphql';
import { InvariantError } from 'ts-invariant';
import { Observable } from 'zen-observable-ts';
import type { Observer } from 'zen-observable-ts';
import { print as print_3 } from 'graphql';

// @public (undocumented)
class ApolloLink {
Expand Down Expand Up @@ -261,7 +260,9 @@ export function parseAndCheckHttpResponse(operations: Operation | Operation[]):
type Path = ReadonlyArray<string | number>;

// @public (undocumented)
const print_2: typeof print_3;
const print_2: ((ast: ASTNode) => string) & {
reset(): void;
};

// @public (undocumented)
interface Printer {
Expand Down
49 changes: 35 additions & 14 deletions .api-reports/api-report-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class ApolloClient<TCacheShape> implements DataProxy {
// (undocumented)
clearStore(): Promise<any[]>;
// (undocumented)
get defaultContext(): Partial<Context>;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
disableNetworkFetches: boolean;
Expand Down Expand Up @@ -201,6 +203,7 @@ type ApolloClientOptions<TCacheShape> = {
connectToDevTools?: boolean;
queryDeduplication?: boolean;
defaultOptions?: DefaultOptions;
defaultContext?: Partial<Context>;
assumeImmutableResults?: boolean;
resolvers?: Resolvers | Resolvers[];
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
Expand Down Expand Up @@ -334,6 +337,13 @@ type ApolloQueryResult<T> = {
partial?: boolean;
};

// @public (undocumented)
type AsStoreObject<T extends {
__typename?: string;
}> = {
[K in keyof T]: T[K];
};

// Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
Expand Down Expand Up @@ -1458,7 +1468,7 @@ class QueryInfo {
// Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts
//
// (undocumented)
markResult<T>(result: FetchResult<T>, document: DocumentNode, options: Pick<WatchQueryOptions, "variables" | "fetchPolicy" | "errorPolicy">, cacheWriteBehavior: CacheWriteBehavior): void;
markResult<T>(result: FetchResult<T>, document: DocumentNode, options: Pick<WatchQueryOptions, "variables" | "fetchPolicy" | "errorPolicy">, cacheWriteBehavior: CacheWriteBehavior): typeof result;
// (undocumented)
networkError?: Error | null;
// (undocumented)
Expand Down Expand Up @@ -1498,7 +1508,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1509,6 +1519,7 @@ class QueryManager<TStore> {
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<Context>;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1518,6 +1529,8 @@ class QueryManager<TStore> {
cache: ApolloCache<TStore>;
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly defaultContext: Partial<Context>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -1846,8 +1859,10 @@ interface StoreObject {
__typename?: string;
}

// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type StoreObjectValueMaybeReference<StoreVal> = StoreVal extends Record<string, any>[] ? Readonly<StoreVal> | readonly Reference[] : StoreVal extends Record<string, any> ? StoreVal | Reference : StoreVal;
type StoreObjectValueMaybeReference<StoreVal> = StoreVal extends Array<infer Item extends Record<string, any>> ? ReadonlyArray<AsStoreObject<Item> | Reference> : StoreVal extends Record<string, any> ? AsStoreObject<StoreVal> | Reference : StoreVal;

// @public (undocumented)
type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object;
Expand Down Expand Up @@ -2089,11 +2104,17 @@ export function useQuery<TData = any, TVariables extends OperationVariables = Op
export function useReactiveVar<T>(rv: ReactiveVar<T>): T;

// @public (undocumented)
export function useReadQuery<TData>(queryRef: QueryReference<TData>): {
export function useReadQuery<TData>(queryRef: QueryReference<TData>): UseReadQueryResult<TData>;

// @public (undocumented)
export interface UseReadQueryResult<TData = unknown> {
// (undocumented)
data: TData;
networkStatus: NetworkStatus;
// (undocumented)
error: ApolloError | undefined;
};
// (undocumented)
networkStatus: NetworkStatus;
}

// @public (undocumented)
export function useSubscription<TData = any, TVariables extends OperationVariables = OperationVariables>(subscription: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: SubscriptionHookOptions<NoInfer<TData>, NoInfer<TVariables>>): SubscriptionResult<TData, TVariables>;
Expand Down Expand Up @@ -2181,18 +2202,18 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// Warnings were encountered during analysis:
//
// src/cache/core/types/DataProxy.ts:141:5 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:95:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:96:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:97:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:98:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:96:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts
// src/cache/core/types/common.ts:97:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts
// 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:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:119:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:153:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:384:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts
// src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts
// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
Expand Down
Loading

0 comments on commit 1af2c34

Please sign in to comment.