lrj
12 小时以前 ae3349d2ff53767b5bc9cb30e1bf7e15f9e814ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 标签相关的GraphQL Schema定义
 
# 标签输入类型
input TagInput {
    id: Long
    name: String!
    category: String
    description: String
    state: Int
}
 
# 扩展查询类型
extend type Query {
    # 获取所有标签
    tags: [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!
}