From de03dfeadbb3dddec4300a5ad282ae2121ce1307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 14 Jun 2026 22:18:47 +0200 Subject: [PATCH] fix: suppress Apollo cache warnings for Match.team1 / Match.team2 Different queries fetch Team with different field sets (some include slug, others don't). merge: true tells InMemoryCache to combine fields rather than replace, avoiding the "cache data may be lost" warning. Co-Authored-By: Claude Sonnet 4.6 --- lib/graphql/client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/graphql/client.ts b/lib/graphql/client.ts index eda090d..22f9dc1 100644 --- a/lib/graphql/client.ts +++ b/lib/graphql/client.ts @@ -10,6 +10,7 @@ function createClient() { cache: new InMemoryCache({ typePolicies: { Team: { fields: { stats: { merge: true } } }, + Match: { fields: { team1: { merge: true }, team2: { merge: true } } }, }, }), defaultOptions: { watchQuery: { fetchPolicy: 'cache-and-network' } },