From 2889b562e64993482bd13fd806af8ed0865bab8b Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 14 Feb 2026 11:52:56 +0900
Subject: refactor: migrate API from GraphQL to REST (TypeSpec/OpenAPI)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Replace the entire GraphQL stack (gqlgen, urql, graphql-codegen) with a
TypeSpec → OpenAPI 3.x pipeline using oapi-codegen for Go server stubs
and openapi-fetch + openapi-typescript for the frontend client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 frontend/src/pages/Settings.tsx | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

(limited to 'frontend/src/pages/Settings.tsx')

diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx
index 9b1e04c..c179fab 100644
--- a/frontend/src/pages/Settings.tsx
+++ b/frontend/src/pages/Settings.tsx
@@ -1,31 +1,24 @@
-import { useQuery } from "urql";
+import { useCallback, useState } from "react";
 import { AddFeedForm, FeedList } from "../components";
-import { GetFeedsDocument } from "../graphql/generated/graphql";
 
 export function Settings() {
-	const [, refetchFeeds] = useQuery({
-		query: GetFeedsDocument,
-	});
+	const [refreshKey, setRefreshKey] = useState(0);
 
-	const handleFeedAdded = () => {
-		refetchFeeds();
-	};
-
-	const handleFeedUnsubscribed = () => {
-		refetchFeeds();
-	};
+	const handleChange = useCallback(() => {
+		setRefreshKey((k) => k + 1);
+	}, []);
 
 	return (
 		<div className="mx-auto max-w-3xl space-y-10">
 			<section>
-				<AddFeedForm onFeedAdded={handleFeedAdded} />
+				<AddFeedForm onFeedAdded={handleChange} />
 			</section>
 
 			<section>
 				<h2 className="mb-4 text-sm font-semibold uppercase tracking-wide text-stone-900">
 					Your Feeds
 				</h2>
-				<FeedList onFeedUnsubscribed={handleFeedUnsubscribed} />
+				<FeedList key={refreshKey} onFeedUnsubscribed={handleChange} />
 			</section>
 		</div>
 	);
-- 
cgit v1.3-1-g0d28

