Skip to content

Commit

Permalink
Move masking logic to masking entrypoint (#12161)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller authored Nov 27, 2024
1 parent 0bceabe commit 7604e1f
Show file tree
Hide file tree
Showing 14 changed files with 4,855 additions and 4,318 deletions.
503 changes: 502 additions & 1 deletion .api-reports/api-report-masking.api.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dist/apollo-client.min.cjs": 41615,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 34367
"dist/apollo-client.min.cjs": 41618,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 34354
}
8 changes: 7 additions & 1 deletion src/__tests__/__snapshots__/exports.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,13 @@ Array [
]
`;

exports[`exports of public entry points @apollo/client/masking 1`] = `Array []`;
exports[`exports of public entry points @apollo/client/masking 1`] = `
Array [
"disableWarningsSlot",
"maskFragment",
"maskOperation",
]
`;

exports[`exports of public entry points @apollo/client/react 1`] = `
Array [
Expand Down
2 changes: 1 addition & 1 deletion src/cache/core/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type {
import type { MissingTree } from "./types/common.js";
import { equalByQuery } from "../../core/equalByQuery.js";
import { invariant } from "../../utilities/globals/index.js";
import { maskFragment } from "../../core/masking.js";
import { maskFragment } from "../../masking/index.js";
import type {
FragmentType,
MaybeMasked,
Expand Down
2 changes: 1 addition & 1 deletion src/cache/inmemory/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {
keyArgsFnFromSpecifier,
keyFieldsFnFromSpecifier,
} from "./key-extractor.js";
import { disableWarningsSlot } from "../../core/masking.js";
import { disableWarningsSlot } from "../../masking/index.js";

export type TypePolicies = {
[__typename: string]: TypePolicy;
Expand Down
2 changes: 1 addition & 1 deletion src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interface TransformCacheEntry {
import type { DefaultOptions } from "./ApolloClient.js";
import { Trie } from "@wry/trie";
import { AutoCleanedWeakCache, cacheSizes } from "../utilities/index.js";
import { maskFragment, maskOperation } from "./masking.js";
import { maskFragment, maskOperation } from "../masking/index.js";
import type { MaybeMasked, Unmasked } from "../masking/index.js";

interface MaskFragmentOptions<TData> {
Expand Down
Loading

0 comments on commit 7604e1f

Please sign in to comment.