From 79c3528bbcd82c6eed67b17747ded31af09a4a64 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 8 Nov 2025 17:48:54 +0900
Subject: fix(frontend): Fix incorrect caching settings

---
 frontend/src/components/ArticleItem.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'frontend/src/components/ArticleItem.tsx')

diff --git a/frontend/src/components/ArticleItem.tsx b/frontend/src/components/ArticleItem.tsx
index 4942518..c61923a 100644
--- a/frontend/src/components/ArticleItem.tsx
+++ b/frontend/src/components/ArticleItem.tsx
@@ -20,6 +20,8 @@ interface Props {
 	onReadChange?: (articleId: string, isRead: boolean) => void;
 }
 
+const urqlContextArticle = { additionalTypenames: ["Article"] };
+
 export function ArticleItem({ article, onReadChange }: Props) {
 	const [, markArticleRead] = useMutation(MarkArticleReadDocument);
 	const [, markArticleUnread] = useMutation(MarkArticleUnreadDocument);
@@ -32,9 +34,9 @@ export function ArticleItem({ article, onReadChange }: Props) {
 		onReadChange?.(articleId, newReadState);
 
 		if (isCurrentlyRead) {
-			await markArticleUnread({ id: articleId });
+			await markArticleUnread({ id: articleId }, urqlContextArticle);
 		} else {
-			await markArticleRead({ id: articleId });
+			await markArticleRead({ id: articleId }, urqlContextArticle);
 		}
 	};
 
@@ -43,7 +45,7 @@ export function ArticleItem({ article, onReadChange }: Props) {
 		window.open(article.url, "_blank", "noreferrer");
 		if (!article.isRead) {
 			onReadChange?.(article.id, true);
-			await markArticleRead({ id: article.id });
+			await markArticleRead({ id: article.id }, urqlContextArticle);
 		}
 	};
 
-- 
cgit v1.2.3-70-g09d2

