Skip to content

Commit 07a0c8c

Browse files
authored
Export IgnoreModifier (#12728)
1 parent 449c3ea commit 07a0c8c

File tree

9 files changed

+28
-34
lines changed

9 files changed

+28
-34
lines changed

.api-reports/api-report-cache.api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,15 @@ export interface IdGetterObj extends Object {
495495
_id?: string;
496496
}
497497

498+
// @public (undocumented)
499+
export interface IgnoreModifier {
500+
// (undocumented)
501+
[_ignoreModifier]: true;
502+
}
503+
504+
// @public (undocumented)
505+
const _ignoreModifier: unique symbol;
506+
498507
// @public (undocumented)
499508
export class InMemoryCache extends ApolloCache {
500509
constructor(config?: InMemoryCacheConfig);

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import type { HKT } from '@apollo/client/utilities';
4949
import { HttpLink } from '@apollo/client/link/http';
5050
import { IdGetter } from '@apollo/client/cache';
5151
import { IdGetterObj } from '@apollo/client/cache';
52+
import type { IgnoreModifier } from '@apollo/client/cache';
5253
import type { Incremental } from '@apollo/client/incremental';
5354
import { InMemoryCache } from '@apollo/client/cache';
5455
import { InMemoryCacheConfig } from '@apollo/client/cache';
@@ -348,15 +349,6 @@ export { IdGetter }
348349

349350
export { IdGetterObj }
350351

351-
// @public (undocumented)
352-
interface IgnoreModifier {
353-
// (undocumented)
354-
[_ignoreModifier]: true;
355-
}
356-
357-
// @public (undocumented)
358-
const _ignoreModifier: unique symbol;
359-
360352
export { InMemoryCache }
361353

362354
export { InMemoryCacheConfig }
@@ -1034,7 +1026,6 @@ export type WatchQueryOptions<TVariables extends OperationVariables = OperationV
10341026
// src/core/ObservableQuery.ts:144:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts
10351027
// src/core/ObservableQuery.ts:304:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
10361028
// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
1037-
// src/core/watchQueryOptions.ts:253:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts
10381029

10391030
// (No @packageDocumentation comment for this package)
10401031

.api-reports/api-report-react.api.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { gql } from '@apollo/client';
3333
import type { GraphQLRequest } from '@apollo/client/link';
3434
import type { HKT } from '@apollo/client/utilities';
3535
import type { HookWrappers } from '@apollo/client/react/internal';
36+
import type { IgnoreModifier } from '@apollo/client/cache';
3637
import type { Incremental } from '@apollo/client/incremental';
3738
import type { InternalRefetchQueriesInclude as InternalRefetchQueriesInclude_2 } from '@apollo/client';
3839
import type { InteropObservable } from 'rxjs';
@@ -317,15 +318,6 @@ type GetDataState<TData, TState extends DataState<TData>["dataState"]> = Extract
317318

318319
export { gql }
319320

320-
// @public (undocumented)
321-
interface IgnoreModifier {
322-
// (undocumented)
323-
[_ignoreModifier]: true;
324-
}
325-
326-
// @public (undocumented)
327-
const _ignoreModifier: unique symbol;
328-
329321
// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts
330322
// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts
331323
//
@@ -1638,13 +1630,12 @@ type WatchQueryOptions_2<TVariables extends OperationVariables_2 = OperationVari
16381630
// src/core/types.ts:238:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts
16391631
// src/core/types.ts:255:7 - (ae-forgotten-export) The symbol "Streaming" needs to be exported by the entry point index.d.ts
16401632
// src/core/types.ts:308:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
1641-
// src/core/watchQueryOptions.ts:178:3 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts
1642-
// src/core/watchQueryOptions.ts:253:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts
1643-
// src/core/watchQueryOptions.ts:261:3 - (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts
1644-
// src/core/watchQueryOptions.ts:264:3 - (ae-forgotten-export) The symbol "NormalizedExecutionResult" needs to be exported by the entry point index.d.ts
1645-
// src/core/watchQueryOptions.ts:274:3 - (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts
1646-
// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts
1647-
// src/core/watchQueryOptions.ts:286:3 - (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts
1633+
// src/core/watchQueryOptions.ts:177:3 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts
1634+
// src/core/watchQueryOptions.ts:260:3 - (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts
1635+
// src/core/watchQueryOptions.ts:263:3 - (ae-forgotten-export) The symbol "NormalizedExecutionResult" needs to be exported by the entry point index.d.ts
1636+
// src/core/watchQueryOptions.ts:273:3 - (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts
1637+
// src/core/watchQueryOptions.ts:276:3 - (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts
1638+
// src/core/watchQueryOptions.ts:285:3 - (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts
16481639
// src/react/hooks/useLoadableQuery.ts:70:7 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts
16491640
// src/react/hooks/useSuspenseFragment.ts:75:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.d.ts
16501641

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2694,7 +2694,7 @@ interface WriteContext extends ReadMergeModifyContext {
26942694
// src/core/ObservableQuery.ts:144:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts
26952695
// src/core/ObservableQuery.ts:304:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
26962696
// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
2697-
// src/core/watchQueryOptions.ts:253:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts
2697+
// src/core/watchQueryOptions.ts:252:3 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts
26982698
// src/local-state/LocalState.ts:140:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
26992699
// src/local-state/LocalState.ts:174:7 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
27002700
// src/local-state/LocalState.ts:194:7 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts

.changeset/clean-sloths-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
Export the `IgnoreModifier` type from `@apollo/client/cache`.

src/cache/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export { ApolloCache } from "./core/cache.js";
77
export type { Cache } from "./core/types/Cache.js";
88
export type { DataProxy } from "./core/types/DataProxy.js";
99
export type {
10+
IgnoreModifier,
1011
MissingTree,
1112
Modifier,
1213
ModifierDetails,

src/core/QueryInfo.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { equal } from "@wry/equality";
22
import type { DocumentNode, FormattedExecutionResult } from "graphql";
33

44
import type { ApolloCache, Cache } from "@apollo/client/cache";
5+
import type { IgnoreModifier } from "@apollo/client/cache";
56
import type { Incremental } from "@apollo/client/incremental";
67
import type { FetchResult } from "@apollo/client/link";
78
import type { Unmasked } from "@apollo/client/masking";
@@ -12,8 +13,6 @@ import {
1213
} from "@apollo/client/utilities/internal";
1314
import { invariant } from "@apollo/client/utilities/invariant";
1415

15-
import type { IgnoreModifier } from "../cache/core/types/common.js";
16-
1716
import type { ObservableQuery } from "./ObservableQuery.js";
1817
import type { QueryManager } from "./QueryManager.js";
1918
import type {

src/core/watchQueryOptions.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import type { TypedDocumentNode } from "@graphql-typed-document-node/core";
22
import type { DocumentNode } from "graphql";
33

44
import type { ApolloCache } from "@apollo/client/cache";
5+
import type { IgnoreModifier } from "@apollo/client/cache";
56
import type { Unmasked } from "@apollo/client/masking";
67
import type { DeepPartial } from "@apollo/client/utilities";
78
import type {
89
NoInfer,
910
VariablesOption,
1011
} from "@apollo/client/utilities/internal";
1112

12-
import type { IgnoreModifier } from "../cache/core/types/common.js";
13-
1413
import type { ObservableQuery } from "./ObservableQuery.js";
1514
import type {
1615
DefaultContext,

src/react/hooks/useMutation.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ import type {
99
DocumentNode,
1010
ErrorLike,
1111
ErrorPolicy,
12-
NormalizedExecutionResult,
1312
InternalRefetchQueriesInclude,
1413
MaybeMasked,
1514
MutateResult,
1615
MutationFetchPolicy,
1716
MutationOptions,
1817
MutationQueryReducersMap,
1918
MutationUpdaterFunction,
19+
NormalizedExecutionResult,
2020
OnQueryUpdated,
2121
OperationVariables,
2222
Unmasked,
2323
} from "@apollo/client";
24+
import type { IgnoreModifier } from "@apollo/client/cache";
2425
import type { NoInfer, Prettify } from "@apollo/client/utilities/internal";
2526
import { mergeOptions } from "@apollo/client/utilities/internal";
2627

27-
import type { IgnoreModifier } from "../../cache/core/types/common.js";
28-
2928
import { useIsomorphicLayoutEffect } from "./internal/useIsomorphicLayoutEffect.js";
3029
import { useApolloClient } from "./useApolloClient.js";
3130

0 commit comments

Comments
 (0)