Skip to content

Commit d99bbfe

Browse files
committed
update: change cursor type from ID to String; move count field to parent
1 parent 0978303 commit d99bbfe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

schema.graphql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Mutation {
3838
updateUser(user: UpdateUserInput): User
3939
}
4040

41-
# 通用排序方式;按创建时间或按更新时间
41+
# 通用排序方式;按创建时间或按更新时间;必须成对出现
4242
enum Order {
4343
createdAsc
4444
createdDesc
@@ -66,6 +66,7 @@ type Post {
6666
referencesBy: [Post]!
6767
referencesTo: [Post]!
6868
comments(first: Int, after: ID, order: Order): Comments
69+
commentCount: Int!
6970
files: [File]!
7071
createdAt: Date!
7172
updatedAt: Date
@@ -74,13 +75,12 @@ type Post {
7475

7576
type PostEdge {
7677
node: Post!
77-
cursor: ID!
78+
cursor: String!
7879
}
7980

8081
type Posts {
8182
edges: [PostEdge]!
8283
pageInfo: PageInfo!
83-
count: Int!
8484
}
8585

8686
# 回贴 or 修改
@@ -100,20 +100,20 @@ type Topic {
100100
rootPost: Post!
101101
lastPost: Post!
102102
posts(first: Int, after: ID, order: Order): Posts!
103+
postCount: Int!
103104
createdAt: Date!
104105
updatedAt: Date
105106
deletedAt: Date
106107
}
107108

108109
type TopicEdge {
109110
node: Topic!
110-
cursor: ID!
111+
cursor: String!
111112
}
112113

113114
type Topics {
114115
edges: [TopicEdge]!
115116
pageInfo: PageInfo!
116-
count: Int!
117117
}
118118

119119
# 发主题 / 修改主题
@@ -136,13 +136,12 @@ type Comment {
136136

137137
type CommentEdge {
138138
node: Comment!
139-
cursor: ID!
139+
cursor: String!
140140
}
141141

142142
type Comments {
143143
edges: [CommentEdge]!
144144
pageInfo: PageInfo!
145-
count: Int!
146145
}
147146

148147
# 发楼中楼 / 修改楼中楼
@@ -193,6 +192,7 @@ type Board {
193192
theme: String
194193
description: String
195194
topics(first: Int, after: ID, order: Order): Topics!
195+
topicCount: Int
196196
}
197197

198198
# --- 用户 ---

0 commit comments

Comments
 (0)