From ae3349d2ff53767b5bc9cb30e1bf7e15f9e814ee Mon Sep 17 00:00:00 2001 From: lrj <owen.stl@gmail.com> Date: 星期五, 03 十月 2025 20:45:44 +0800 Subject: [PATCH] 清理测试代码和调试文件 --- 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