From 3714621173c606c4c58439ed8941100ce9ddea14 Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期三, 05 十一月 2025 15:10:49 +0800
Subject: [PATCH] bug
---
backend/src/main/resources/graphql/tag.graphqls | 36 +++++++++++++++++++++++++++++++-----
1 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/backend/src/main/resources/graphql/tag.graphqls b/backend/src/main/resources/graphql/tag.graphqls
index 9b337f4..014c0b1 100644
--- a/backend/src/main/resources/graphql/tag.graphqls
+++ b/backend/src/main/resources/graphql/tag.graphqls
@@ -1,8 +1,34 @@
-# 鏍囩鐩稿叧鐨凣raphQL鎵╁睍
+# 鏍囩鐩稿叧鐨凣raphQL Schema瀹氫箟
+
+# 鏍囩杈撳叆绫诲瀷
+input TagInput {
+ id: Long
+ name: String!
+ category: String
+ description: String
+ state: Int
+}
+
+# 鎵╁睍鏌ヨ绫诲瀷
extend type Query {
- "鑾峰彇鎵�鏈夋爣绛�"
- tags: [TagResponse]
+ # 鑾峰彇鎵�鏈夋爣绛�
+ tags: [TagResponse!]!
- "鏍规嵁鍒嗙被鑾峰彇鏍囩"
- tagsByCategory(category: String): [TagResponse]
+ # 鏍规嵁鍒嗙被鑾峰彇鏍囩
+ tagsByCategory(category: String!): [TagResponse!]!
+
+ # 鏍规嵁ID鑾峰彇鏍囩璇︽儏
+ tag(id: Long!): TagResponse
+
+ # 鏍规嵁鍚嶇О妯$硦鏌ヨ鏍囩
+ tagsByName(name: String!): [TagResponse!]!
+}
+
+# 鎵╁睍鍙樻洿绫诲瀷
+extend type Mutation {
+ # 淇濆瓨鏍囩锛堟柊澧炴垨鏇存柊锛�
+ saveTag(input: TagInput!): TagResponse!
+
+ # 鍒犻櫎鏍囩
+ deleteTag(id: Long!): Boolean!
}
\ No newline at end of file
--
Gitblit v1.8.0