Skip to content

Commit

Permalink
Merge pull request #11922 from apollographql/release-3.11
Browse files Browse the repository at this point in the history
Release 3.11
  • Loading branch information
jerelmiller authored Jul 22, 2024
2 parents 811c558 + f7aed4f commit 7b8028e
Show file tree
Hide file tree
Showing 116 changed files with 5,369 additions and 2,241 deletions.
2 changes: 0 additions & 2 deletions .api-reports/api-report-cache.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,6 @@ export type TypePolicy = {

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down
104 changes: 67 additions & 37 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { disableExperimentalFragmentVariables } from 'graphql-tag';
import { disableFragmentWarnings } from 'graphql-tag';
import type { DocumentNode } from 'graphql';
import { enableExperimentalFragmentVariables } from 'graphql-tag';
import type { ExecutionResult } from 'graphql';
import type { FieldNode } from 'graphql';
import type { FormattedExecutionResult } from 'graphql';
import type { FragmentDefinitionNode } from 'graphql';
import { gql } from 'graphql-tag';
import type { GraphQLError } from 'graphql';
import type { GraphQLErrorExtensions } from 'graphql';
import type { GraphQLFormattedError } from 'graphql';
import type { InlineFragmentNode } from 'graphql';
import { InvariantError } from 'ts-invariant';
import { Observable } from 'zen-observable-ts';
Expand Down Expand Up @@ -94,7 +94,7 @@ export class ApolloClient<TCacheShape> implements DataProxy {
__actionHookForDevTools(cb: () => any): void;
constructor(options: ApolloClientOptions<TCacheShape>);
// (undocumented)
__requestRaw(payload: GraphQLRequest): Observable<ExecutionResult>;
__requestRaw(payload: GraphQLRequest): Observable<FormattedExecutionResult>;
addResolvers(resolvers: Resolvers | Resolvers[]): void;
// (undocumented)
cache: ApolloCache<TCacheShape>;
Expand All @@ -103,6 +103,10 @@ export class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
get documentTransform(): DocumentTransform;
Expand Down Expand Up @@ -144,12 +148,14 @@ export class ApolloClient<TCacheShape> implements DataProxy {
export interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand All @@ -172,14 +178,16 @@ export interface ApolloClientOptions<TCacheShape> {
export class ApolloError extends Error {
// Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts
constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions);
cause: ({
readonly message: string;
extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"];
} & Omit<Partial<Error> & Partial<GraphQLFormattedError>, "extensions">) | null;
// (undocumented)
clientErrors: ReadonlyArray<Error>;
// (undocumented)
extraInfo: any;
// Warning: (ae-forgotten-export) The symbol "GraphQLErrors" needs to be exported by the entry point index.d.ts
//
// (undocumented)
graphQLErrors: GraphQLErrors;
graphQLErrors: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
message: string;
// (undocumented)
Expand All @@ -202,7 +210,7 @@ interface ApolloErrorOptions {
// (undocumented)
extraInfo?: any;
// (undocumented)
graphQLErrors?: ReadonlyArray<GraphQLError>;
graphQLErrors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
networkError?: Error | ServerParseError | ServerError | null;
// (undocumented)
Expand Down Expand Up @@ -256,7 +264,7 @@ export interface ApolloQueryResult<T> {
// (undocumented)
data: T;
error?: ApolloError;
errors?: ReadonlyArray<GraphQLError>;
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
loading: boolean;
// (undocumented)
Expand Down Expand Up @@ -589,6 +597,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
export type DiffQueryAgainstStoreOptions = ReadQueryOptions & {
returnPartialData?: boolean;
Expand Down Expand Up @@ -760,7 +774,7 @@ export interface ExecutionPatchInitialResult<TData = Record<string, any>, TExten
// (undocumented)
data: TData | null | undefined;
// (undocumented)
errors?: ReadonlyArray<GraphQLError>;
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
extensions?: TExtensions;
// (undocumented)
Expand Down Expand Up @@ -977,9 +991,6 @@ const getInMemoryCacheMemoryInternals: (() => {

export { gql }

// @public (undocumented)
type GraphQLErrors = ReadonlyArray<GraphQLError>;

// @public (undocumented)
export interface GraphQLRequest<TVariables = Record<string, any>> {
// (undocumented)
Expand Down Expand Up @@ -1064,7 +1075,7 @@ export interface IncrementalPayload<TData, TExtensions> {
// (undocumented)
data: TData | null;
// (undocumented)
errors?: ReadonlyArray<GraphQLError>;
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
extensions?: TExtensions;
// (undocumented)
Expand Down Expand Up @@ -1380,9 +1391,10 @@ interface MutationBaseOptions<TData = any, TVariables = OperationVariables, TCon
context?: TContext;
errorPolicy?: ErrorPolicy;
onQueryUpdated?: OnQueryUpdated<any>;
// Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts
optimisticResponse?: TData | ((vars: TVariables, { IGNORE }: {
IGNORE: IgnoreModifier;
}) => TData);
}) => TData | IgnoreModifier);
refetchQueries?: ((result: FetchResult<TData>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude;
update?: MutationUpdaterFunction<TData, TVariables, TContext, TCache>;
updateQueries?: MutationQueryReducersMap<TData>;
Expand Down Expand Up @@ -1696,7 +1708,7 @@ class QueryInfo {
// (undocumented)
getDiff(): Cache_2.DiffResult<any>;
// (undocumented)
graphQLErrors?: ReadonlyArray<GraphQLError>;
graphQLErrors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
init(query: {
document: DocumentNode;
Expand Down Expand Up @@ -1750,19 +1762,8 @@ export type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
documentTransform?: DocumentTransform;
queryDeduplication?: boolean;
onBroadcast?: () => void;
ssrMode?: boolean;
clientAwareness?: Record<string, string>;
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
});
// Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts
constructor(options: QueryManagerOptions<TStore>);
// (undocumented)
readonly assumeImmutableResults: boolean;
// (undocumented)
Expand Down Expand Up @@ -1791,6 +1792,8 @@ class QueryManager<TStore> {
//
// (undocumented)
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
// Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getLocalState(): LocalState<TStore>;
// (undocumented)
Expand Down Expand Up @@ -1855,7 +1858,7 @@ class QueryManager<TStore> {
// (undocumented)
readonly ssrMode: boolean;
// (undocumented)
startGraphQLSubscription<T = any>({ query, fetchPolicy, errorPolicy, variables, context, }: SubscriptionOptions): Observable<FetchResult<T>>;
startGraphQLSubscription<T = any>({ query, fetchPolicy, errorPolicy, variables, context, extensions, }: SubscriptionOptions): Observable<FetchResult<T>>;
stop(): void;
// (undocumented)
stopQuery(queryId: string): void;
Expand All @@ -1867,6 +1870,32 @@ class QueryManager<TStore> {
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
}

// @public (undocumented)
interface QueryManagerOptions<TStore> {
// (undocumented)
assumeImmutableResults: boolean;
// (undocumented)
cache: ApolloCache<TStore>;
// (undocumented)
clientAwareness: Record<string, string>;
// (undocumented)
defaultContext: Partial<DefaultContext> | undefined;
// (undocumented)
defaultOptions: DefaultOptions;
// (undocumented)
documentTransform: DocumentTransform | null | undefined;
// (undocumented)
link: ApolloLink;
// (undocumented)
localState: LocalState<TStore>;
// (undocumented)
onBroadcast: undefined | (() => void);
// (undocumented)
queryDeduplication: boolean;
// (undocumented)
ssrMode: boolean;
}

// @public
interface QueryOptions<TVariables = OperationVariables, TData = any> {
// @deprecated
Expand Down Expand Up @@ -2073,11 +2102,15 @@ interface SharedWatchQueryOptions<TVariables extends OperationVariables, TData>
}

// @public (undocumented)
export interface SingleExecutionResult<TData = Record<string, any>, TContext = DefaultContext, TExtensions = Record<string, any>> extends ExecutionResult<TData, TExtensions> {
export interface SingleExecutionResult<TData = Record<string, any>, TContext = DefaultContext, TExtensions = Record<string, any>> {
// (undocumented)
context?: TContext;
// (undocumented)
data?: TData | null;
// (undocumented)
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
extensions?: TExtensions;
}

// @public (undocumented)
Expand Down Expand Up @@ -2127,6 +2160,7 @@ export type SubscribeToMoreOptions<TData = any, TSubscriptionVariables = Operati
export interface SubscriptionOptions<TVariables = OperationVariables, TData = any> {
context?: DefaultContext;
errorPolicy?: ErrorPolicy;
extensions?: Record<string, any>;
fetchPolicy?: FetchPolicy;
query: DocumentNode | TypedDocumentNode<TData, TVariables>;
variables?: TVariables;
Expand Down Expand Up @@ -2215,8 +2249,6 @@ export interface UriFunction {

// @public
export interface WatchFragmentOptions<TData, TVars> {
// @deprecated (undocumented)
canonizeResults?: boolean;
fragment: DocumentNode | TypedDocumentNode<TData, TVars>;
fragmentName?: string;
from: StoreObject | Reference | string;
Expand Down Expand Up @@ -2285,11 +2317,9 @@ interface WriteContext extends ReadMergeModifyContext {
// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:116:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:117:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:124:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:158:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:390:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:269:2 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:269:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:138:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:382:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:275: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)
Expand Down
22 changes: 15 additions & 7 deletions .api-reports/api-report-errors.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
```ts

import type { ExecutionResult } from 'graphql';
import type { GraphQLError } from 'graphql';
import type { GraphQLErrorExtensions } from 'graphql';
import type { GraphQLFormattedError } from 'graphql';

// @public (undocumented)
export class ApolloError extends Error {
constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions);
cause: ({
readonly message: string;
extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"];
} & Omit<Partial<Error> & Partial<GraphQLFormattedError>, "extensions">) | null;
// (undocumented)
clientErrors: ReadonlyArray<Error>;
// (undocumented)
extraInfo: any;
// (undocumented)
graphQLErrors: GraphQLErrors;
graphQLErrors: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
message: string;
// (undocumented)
Expand All @@ -42,7 +46,7 @@ export interface ApolloErrorOptions {
// (undocumented)
extraInfo?: any;
// (undocumented)
graphQLErrors?: ReadonlyArray<GraphQLError>;
graphQLErrors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
networkError?: Error | ServerParseError | ServerError | null;
// (undocumented)
Expand Down Expand Up @@ -77,7 +81,7 @@ interface ExecutionPatchInitialResult<TData = Record<string, any>, TExtensions =
// (undocumented)
data: TData | null | undefined;
// (undocumented)
errors?: ReadonlyArray<GraphQLError>;
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
extensions?: TExtensions;
// (undocumented)
Expand Down Expand Up @@ -109,7 +113,7 @@ type FetchResultWithSymbolExtensions<T> = FetchResult<T> & {
extensions: Record<string | symbol, any>;
};

// @public (undocumented)
// @public @deprecated (undocumented)
export type GraphQLErrors = ReadonlyArray<GraphQLError>;

// Warning: (ae-forgotten-export) The symbol "FetchResultWithSymbolExtensions" needs to be exported by the entry point index.d.ts
Expand All @@ -122,7 +126,7 @@ interface IncrementalPayload<TData, TExtensions> {
// (undocumented)
data: TData | null;
// (undocumented)
errors?: ReadonlyArray<GraphQLError>;
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
extensions?: TExtensions;
// (undocumented)
Expand Down Expand Up @@ -162,11 +166,15 @@ type ServerParseError = Error & {
// Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
interface SingleExecutionResult<TData = Record<string, any>, TContext = DefaultContext, TExtensions = Record<string, any>> extends ExecutionResult<TData, TExtensions> {
interface SingleExecutionResult<TData = Record<string, any>, TContext = DefaultContext, TExtensions = Record<string, any>> {
// (undocumented)
context?: TContext;
// (undocumented)
data?: TData | null;
// (undocumented)
errors?: ReadonlyArray<GraphQLFormattedError>;
// (undocumented)
extensions?: TExtensions;
}

// (No @packageDocumentation comment for this package)
Expand Down
Loading

0 comments on commit 7b8028e

Please sign in to comment.