Skip to content

Commit e85f1e4

Browse files
authored
Merge branch 'release-4.0' into pr/docs-update/defer
2 parents 0007668 + a832111 commit e85f1e4

File tree

287 files changed

+34707
-6975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+34707
-6975
lines changed

.api-reports/api-report-core.api.md

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities
1212
import { Cache as Cache_2 } from '@apollo/client/cache';
1313
import { checkFetcher } from '@apollo/client/link/http';
1414
import type { ClientAwarenessLink } from '@apollo/client/link/client-awareness';
15-
import { ClientParseError } from '@apollo/client/link/http';
1615
import { CombinedGraphQLErrors } from '@apollo/client/errors';
1716
import { CombinedProtocolErrors } from '@apollo/client/errors';
1817
import { concat } from '@apollo/client/link';
1918
import { createHttpLink } from '@apollo/client/link/http';
2019
import { createSignalIfSupported } from '@apollo/client/link/http';
21-
import { DataMasking } from '@apollo/client/masking';
2220
import type { DeepPartial } from '@apollo/client/utilities';
2321
import { defaultDataIdFromObject } from '@apollo/client/cache';
2422
import { defaultPrinter } from '@apollo/client/link/http';
@@ -59,13 +57,10 @@ import { LinkError } from '@apollo/client/errors';
5957
import type { LocalState } from '@apollo/client/local-state';
6058
import { LocalStateError } from '@apollo/client/errors';
6159
import { makeVar } from '@apollo/client/cache';
62-
import { Masked } from '@apollo/client/masking';
63-
import { MaskedDocumentNode } from '@apollo/client/masking';
6460
import { MaybeMasked } from '@apollo/client/masking';
6561
import { MergeInfo } from '@apollo/client/cache';
6662
import { MergeTree } from '@apollo/client/cache';
6763
import { MissingFieldError } from '@apollo/client/cache';
68-
import { NextLink } from '@apollo/client/link';
6964
import type { NextNotification } from 'rxjs';
7065
import { NormalizedCache } from '@apollo/client/cache';
7166
import { NormalizedCacheObject } from '@apollo/client/cache';
@@ -74,7 +69,6 @@ import { Observable as Observable_2 } from 'rxjs';
7469
import type { ObservableNotification } from 'rxjs';
7570
import type { Observer } from 'rxjs';
7671
import { Operation } from '@apollo/client/link';
77-
import { OperationContext } from '@apollo/client/link';
7872
import { OperationTypeNode } from 'graphql';
7973
import { OptimisticStoreItem } from '@apollo/client/cache';
8074
import { parseAndCheckHttpResponse } from '@apollo/client/link/http';
@@ -90,7 +84,6 @@ import { rewriteURIForGET } from '@apollo/client/link/http';
9084
import { selectHttpOptionsAndBody } from '@apollo/client/link/http';
9185
import { selectHttpOptionsAndBodyInternal } from '@apollo/client/link/http';
9286
import { selectURI } from '@apollo/client/link/http';
93-
import { serializeFetchParameter } from '@apollo/client/link/http';
9487
import { ServerError } from '@apollo/client/errors';
9588
import { ServerParseError } from '@apollo/client/errors';
9689
import { setVerbosity as setLogVerbosity } from '@apollo/client/utilities/invariant';
@@ -319,7 +312,7 @@ export class ApolloClient {
319312
__actionHookForDevTools(cb: () => any): void;
320313
constructor(options: ApolloClient.Options);
321314
// (undocumented)
322-
__requestRaw(payload: GraphQLRequest): Observable_2<FetchResult<unknown>>;
315+
__requestRaw(request: ApolloLink.Request): Observable_2<ApolloLink.Result<unknown>>;
323316
// (undocumented)
324317
cache: ApolloCache;
325318
clearStore(): Promise<any[]>;
@@ -390,8 +383,6 @@ export { Cache_2 as Cache }
390383

391384
export { checkFetcher }
392385

393-
export { ClientParseError }
394-
395386
export { CombinedGraphQLErrors }
396387

397388
export { CombinedProtocolErrors }
@@ -402,8 +393,6 @@ export { createHttpLink }
402393

403394
export { createSignalIfSupported }
404395

405-
export { DataMasking }
406-
407396
// @public (undocumented)
408397
export type DataState<TData> = {
409398
data: DataValue.Complete<TData>;
@@ -551,10 +540,6 @@ export { LocalStateError }
551540

552541
export { makeVar }
553542

554-
export { Masked }
555-
556-
export { MaskedDocumentNode }
557-
558543
// @public (undocumented)
559544
interface MaskFragmentOptions<TData> {
560545
// (undocumented)
@@ -649,8 +634,6 @@ interface NextFetchPolicyContext<TData, TVariables extends OperationVariables> {
649634
reason: "after-fetch" | "variables-changed";
650635
}
651636

652-
export { NextLink }
653-
654637
export { NormalizedCache }
655638

656639
export { NormalizedCacheObject }
@@ -791,8 +774,6 @@ export type OnQueryUpdated<TResult> = (observableQuery: ObservableQuery<any>, di
791774

792775
export { Operation }
793776

794-
export { OperationContext }
795-
796777
// @public (undocumented)
797778
export type OperationVariables = Record<string, any>;
798779

@@ -893,7 +874,7 @@ class QueryManager {
893874
readonly incrementalHandler: Incremental.Handler;
894875
// (undocumented)
895876
protected inFlightLinkObservables: Trie<{
896-
observable?: Observable_2<FetchResult<any>>;
877+
observable?: Observable_2<ApolloLink.Result<any>>;
897878
restart?: () => void;
898879
}>;
899880
// (undocumented)
@@ -1037,8 +1018,6 @@ export { selectHttpOptionsAndBodyInternal }
10371018

10381019
export { selectURI }
10391020

1040-
export { serializeFetchParameter }
1041-
10421021
export { ServerError }
10431022

10441023
export { ServerParseError }
@@ -1153,7 +1132,7 @@ export type WatchQueryOptions<TVariables extends OperationVariables = OperationV
11531132

11541133
// Warnings were encountered during analysis:
11551134
//
1156-
// src/core/ApolloClient.ts:357:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts
1135+
// src/core/ApolloClient.ts:353:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts
11571136
// src/core/ObservableQuery.ts:360:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
11581137
// src/core/QueryManager.ts:175:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
11591138

.api-reports/api-report-errors.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
55
```ts
66

7+
import type { ApolloLink } from '@apollo/client/link';
78
import { ErrorLike } from '@apollo/client';
8-
import type { FetchResult } from '@apollo/client';
99
import type { FormattedExecutionResult } from 'graphql';
1010
import type { GraphQLFormattedError } from 'graphql';
1111

@@ -26,14 +26,14 @@ export namespace CombinedGraphQLErrors {
2626
// (undocumented)
2727
export interface MessageFormatterOptions {
2828
defaultFormatMessage: (errors: ReadonlyArray<GraphQLFormattedError>) => string;
29-
result: FetchResult<unknown>;
29+
result: ApolloLink.Result<unknown>;
3030
}
3131
}
3232

3333
// @public
3434
export class CombinedGraphQLErrors extends Error {
3535
constructor(result: FormattedExecutionResult<any>);
36-
constructor(result: FetchResult<any>, errors: ReadonlyArray<GraphQLFormattedError>);
36+
constructor(result: ApolloLink.Result<any>, errors: ReadonlyArray<GraphQLFormattedError>);
3737
readonly data: Record<string, unknown> | null | undefined;
3838
readonly errors: ReadonlyArray<GraphQLFormattedError>;
3939
readonly extensions: Record<string, unknown> | undefined;

.api-reports/api-report-incremental.api.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@
44
55
```ts
66

7+
import type { ApolloLink } from '@apollo/client/link';
78
import type { DeepPartial } from '@apollo/client/utilities';
89
import type { DocumentNode } from 'graphql';
9-
import type { FetchResult } from '@apollo/client';
1010
import type { FormattedExecutionResult } from 'graphql';
1111
import type { GraphQLFormattedError } from 'graphql';
12-
import type { GraphQLRequest } from '@apollo/client';
12+
import type { HKT } from '@apollo/client/utilities';
1313

1414
// @public (undocumented)
1515
namespace Defer20220824Handler {
1616
// (undocumented)
1717
type Chunk<TData extends Record<string, unknown>> = InitialResult<TData> | SubsequentResult<TData>;
1818
// (undocumented)
19+
interface Defer20220824Result extends HKT {
20+
// (undocumented)
21+
arg1: unknown;
22+
// (undocumented)
23+
arg2: unknown;
24+
// (undocumented)
25+
return: Defer20220824Handler.Chunk<Record<string, unknown>>;
26+
}
27+
// (undocumented)
1928
type IncrementalDeferPayload<TData = Record<string, unknown>> = {
2029
data?: TData | null | undefined;
2130
errors?: ReadonlyArray<GraphQLFormattedError>;
@@ -38,16 +47,21 @@ namespace Defer20220824Handler {
3847
hasNext: boolean;
3948
incremental?: Array<IncrementalDeferPayload<TData>>;
4049
};
50+
// (undocumented)
51+
interface TypeOverrides {
52+
// (undocumented)
53+
AdditionalApolloLinkResultTypes: Defer20220824Result;
54+
}
4155
}
4256

4357
// @public
4458
class Defer20220824Handler implements Incremental.Handler<Defer20220824Handler.Chunk<any>> {
4559
// (undocumented)
46-
extractErrors(result: FetchResult<any>): GraphQLFormattedError[] | undefined;
60+
extractErrors(result: ApolloLink.Result<any>): GraphQLFormattedError[] | undefined;
4761
// (undocumented)
4862
isIncrementalResult(result: Record<string, any>): result is Defer20220824Handler.SubsequentResult | Defer20220824Handler.InitialResult;
4963
// (undocumented)
50-
prepareRequest(request: GraphQLRequest): GraphQLRequest;
64+
prepareRequest(request: ApolloLink.Request): ApolloLink.Request;
5165
// Warning: (ae-forgotten-export) The symbol "DeferRequest" needs to be exported by the entry point index.d.ts
5266
//
5367
// (undocumented)
@@ -71,11 +85,11 @@ export namespace Incremental {
7185
// @internal @deprecated (undocumented)
7286
export interface Handler<Chunk extends Record<string, unknown> = Record<string, unknown>> {
7387
// (undocumented)
74-
extractErrors: (result: FetchResult<any>) => readonly GraphQLFormattedError[] | undefined | void;
88+
extractErrors: (result: ApolloLink.Result<any>) => readonly GraphQLFormattedError[] | undefined | void;
7589
// (undocumented)
76-
isIncrementalResult: (result: FetchResult<any>) => result is Chunk;
90+
isIncrementalResult: (result: ApolloLink.Result<any>) => result is Chunk;
7791
// (undocumented)
78-
prepareRequest: (request: GraphQLRequest) => GraphQLRequest;
92+
prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request;
7993
// (undocumented)
8094
startRequest: <TData extends Record<string, unknown>>(request: {
8195
query: DocumentNode;
@@ -92,14 +106,32 @@ export namespace Incremental {
92106
export type Path = ReadonlyArray<string | number>;
93107
}
94108

109+
// @public (undocumented)
110+
export namespace NotImplementedHandler {
111+
// (undocumented)
112+
export interface NotImplementedResult extends HKT {
113+
// (undocumented)
114+
arg1: unknown;
115+
// (undocumented)
116+
arg2: unknown;
117+
// (undocumented)
118+
return: never;
119+
}
120+
// (undocumented)
121+
export interface TypeOverrides {
122+
// (undocumented)
123+
AdditionalApolloLinkResultTypes: NotImplementedResult;
124+
}
125+
}
126+
95127
// @public (undocumented)
96128
export class NotImplementedHandler implements Incremental.Handler<never> {
97129
// (undocumented)
98130
extractErrors(): void;
99131
// (undocumented)
100132
isIncrementalResult(_: any): _ is never;
101133
// (undocumented)
102-
prepareRequest(request: GraphQLRequest): GraphQLRequest<Record<string, any>>;
134+
prepareRequest(request: ApolloLink.Request): ApolloLink.Request;
103135
// (undocumented)
104136
startRequest: any;
105137
}

0 commit comments

Comments
 (0)