Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable data masking in cache instead of client #12019

Closed
wants to merge 13 commits into from
Closed
Prev Previous commit
Fix test in datamasking tests that checks when cache warns
  • Loading branch information
jerelmiller committed Aug 23, 2024
commit 7c2b71cc944e74f3c1631ea94d29b0ab311d611b
3 changes: 2 additions & 1 deletion src/__tests__/dataMasking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ test("does not mask fragments marked with @unmask added by document transforms",
}
});

test("does not mask query when using a cache that does not support it", async () => {
test("does not mask query when using a cache that improperly implements the required interface", async () => {
using _ = spyOnConsole("warn");

interface Query {
Expand Down Expand Up @@ -1284,6 +1284,7 @@ test("warns when passing parent object to `from` that is non-normalized", async
});

class TestCache extends ApolloCache<unknown> {
public readonly dataMasking = true;
public diff<T>(query: Cache.DiffOptions): DataProxy.DiffResult<T> {
return {};
}
Expand Down