Skip to content

Commit

Permalink
Move check for whether data masking is enabled to ObservableQuery (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller authored Jul 2, 2024
1 parent 1ff4874 commit 03d84ef
Show file tree
Hide file tree
Showing 20 changed files with 109 additions and 99 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 @@ -24,8 +24,6 @@ export abstract class ApolloCache<TSerialized> implements DataProxy {
readonly assumeImmutableResults: boolean;
// (undocumented)
batch<U>(options: Cache_2.BatchOptions<this, U>): U;
// @internal (undocumented)
dataMaskingEnabledInClient: boolean;
// (undocumented)
abstract diff<T>(query: Cache_2.DiffOptions): Cache_2.DiffResult<T>;
// (undocumented)
Expand Down
13 changes: 7 additions & 6 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export abstract class ApolloCache<TSerialized> implements DataProxy {
readonly assumeImmutableResults: boolean;
// (undocumented)
batch<U>(options: Cache_2.BatchOptions<this, U>): U;
// @internal (undocumented)
dataMaskingEnabledInClient: boolean;
// (undocumented)
abstract diff<T>(query: Cache_2.DiffOptions): Cache_2.DiffResult<T>;
// (undocumented)
Expand Down Expand Up @@ -1759,7 +1757,7 @@ export type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, dataMasking, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1771,6 +1769,7 @@ class QueryManager<TStore> {
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
dataMasking?: boolean;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1781,6 +1780,8 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly dataMasking: boolean;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
Expand Down Expand Up @@ -2294,9 +2295,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/QueryManager.ts:125:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:394: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/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
13 changes: 7 additions & 6 deletions .api-reports/api-report-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ abstract class ApolloCache<TSerialized> implements DataProxy {
readonly assumeImmutableResults: boolean;
// (undocumented)
batch<U>(options: Cache_2.BatchOptions<this, U>): U;
// @internal (undocumented)
dataMaskingEnabledInClient: boolean;
// (undocumented)
abstract diff<T>(query: Cache_2.DiffOptions): Cache_2.DiffResult<T>;
// (undocumented)
Expand Down Expand Up @@ -1532,7 +1530,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, dataMasking, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1544,6 +1542,7 @@ class QueryManager<TStore> {
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<Context>;
dataMasking?: boolean;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1554,6 +1553,8 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly dataMasking: boolean;
// (undocumented)
readonly defaultContext: Partial<Context>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
Expand Down Expand Up @@ -2306,9 +2307,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// 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: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/QueryManager.ts:125:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:394:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:203:5 - (ae-forgotten-export) The symbol "Resolver" 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
Expand Down
13 changes: 7 additions & 6 deletions .api-reports/api-report-react_components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ abstract class ApolloCache<TSerialized> implements DataProxy {
readonly assumeImmutableResults: boolean;
// (undocumented)
batch<U>(options: Cache_2.BatchOptions<this, U>): U;
// @internal (undocumented)
dataMaskingEnabledInClient: boolean;
// (undocumented)
abstract diff<T>(query: Cache_2.DiffOptions): Cache_2.DiffResult<T>;
// (undocumented)
Expand Down Expand Up @@ -1346,7 +1344,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, dataMasking, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1358,6 +1356,7 @@ class QueryManager<TStore> {
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
dataMasking?: boolean;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1368,6 +1367,8 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly dataMasking: boolean;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
Expand Down Expand Up @@ -1792,9 +1793,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// 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: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/QueryManager.ts:125:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:394:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:203:5 - (ae-forgotten-export) The symbol "Resolver" 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
Expand Down
13 changes: 7 additions & 6 deletions .api-reports/api-report-react_context.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ abstract class ApolloCache<TSerialized> implements DataProxy {
readonly assumeImmutableResults: boolean;
// (undocumented)
batch<U>(options: Cache_2.BatchOptions<this, U>): U;
// @internal (undocumented)
dataMaskingEnabledInClient: boolean;
// (undocumented)
abstract diff<T>(query: Cache_2.DiffOptions): Cache_2.DiffResult<T>;
// (undocumented)
Expand Down Expand Up @@ -1277,7 +1275,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, dataMasking, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1289,6 +1287,7 @@ class QueryManager<TStore> {
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
dataMasking?: boolean;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1299,6 +1298,8 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly dataMasking: boolean;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
Expand Down Expand Up @@ -1715,9 +1716,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// 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: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/QueryManager.ts:125:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:394:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:203:5 - (ae-forgotten-export) The symbol "Resolver" 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
Expand Down
13 changes: 7 additions & 6 deletions .api-reports/api-report-react_hoc.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ abstract class ApolloCache<TSerialized> implements DataProxy {
readonly assumeImmutableResults: boolean;
// (undocumented)
batch<U>(options: Cache_2.BatchOptions<this, U>): U;
// @internal (undocumented)
dataMaskingEnabledInClient: boolean;
// (undocumented)
abstract diff<T>(query: Cache_2.DiffOptions): Cache_2.DiffResult<T>;
// (undocumented)
Expand Down Expand Up @@ -1322,7 +1320,7 @@ type QueryListener = (queryInfo: QueryInfo) => void;

// @public (undocumented)
class QueryManager<TStore> {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, }: {
constructor({ cache, link, defaultOptions, documentTransform, queryDeduplication, onBroadcast, ssrMode, clientAwareness, localState, assumeImmutableResults, defaultContext, dataMasking, }: {
cache: ApolloCache<TStore>;
link: ApolloLink;
defaultOptions?: DefaultOptions;
Expand All @@ -1334,6 +1332,7 @@ class QueryManager<TStore> {
localState?: LocalState<TStore>;
assumeImmutableResults?: boolean;
defaultContext?: Partial<DefaultContext>;
dataMasking?: boolean;
});
// (undocumented)
readonly assumeImmutableResults: boolean;
Expand All @@ -1344,6 +1343,8 @@ class QueryManager<TStore> {
// (undocumented)
clearStore(options?: Cache_2.ResetOptions): Promise<void>;
// (undocumented)
readonly dataMasking: boolean;
// (undocumented)
readonly defaultContext: Partial<DefaultContext>;
// Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts
//
Expand Down Expand Up @@ -1744,9 +1745,9 @@ export function withSubscription<TProps extends TGraphQLVariables | {} = {}, TDa
// 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: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/QueryManager.ts:125:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:394:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:203:5 - (ae-forgotten-export) The symbol "Resolver" 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
Expand Down
Loading

0 comments on commit 03d84ef

Please sign in to comment.