-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
269 lines (248 loc) · 4.53 KB
/
schema.graphql
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
type User @entity {
id: ID!
ratings: [UserCommunityRating!]!
displayName: String
postCount: Int
replyCount: Int
company: String
position: String
location: String
about: String
avatar: String
creationTime: BigInt
ipfsHash: Bytes
ipfsHash2: Bytes
followedCommunities: [String!]!
achievements: [Achievement!]!
posts: [String!]!
replies: [String!]!
comments: [String!]!
}
type UserCommunityRating @entity {
id: ID!
communityId: String
rating: Int
user: User
}
type UserPermission @entity {
id: ID!
user: User
permission: String
}
type UserCommunityBan @entity {
id: ID!
user: User
communityId: String
}
type Community @entity {
id: ID!
name: String
description: String
website: String
communitySite: String
avatar: String
isFrozen: Boolean
creationTime: BigInt
postCount: Int
documentationCount: Int
deletedPostCount: Int
replyCount: Int
tagsCount: Int
followingUsers: Int
ipfsHash: Bytes
ipfsHash2: Bytes
language: String
translations: [CommunityTranslation!]!
networkId: Int!
}
type CommunityTranslation @entity {
id: ID!
communityId: String
name: String
description: String
language: String
enableAutotranslation: Boolean
}
type Tag @entity {
id: ID!
communityId: String
name: String!
description: String
postCount: Int
deletedPostCount: Int
ipfsHash: Bytes
ipfsHash2: Bytes
language: String
translations: [TagTranslation!]!
}
type TagTranslation @entity {
id: ID!
tagId: String
name: String!
description: String
language: String
}
type _Schema_
@fulltext(
name: "postSearch"
language: en
algorithm: rank
include: [{entity: "Post", fields: [{ name: "title" }, { name: "content"}, { name: "postContent"}]}]
)
type Post @entity {
id: ID!
ipfsHash: Bytes
ipfsHash2: Bytes
postType: Int
author: User!
rating: Int
postTime: BigInt
lastmod: BigInt
communityId: String!
title: String!
content: String!
postContent: String!
commentCount: Int
replyCount: Int
isDeleted: Boolean
officialReply: Int
bestReply: Int
isFirstReply: Boolean
isQuickReply: Boolean
properties: [BigInt!]
replies: [Reply!]!
comments: [Comment!]!
language: Int
translations: [PostTranslation!]!
tags: [Tag!]!
handle: String
messengerType: Int
networkId: Int!
}
type PostTranslation @entity {
id: ID!
postId: String
language: Int
author: User
ipfsHash: Bytes
title: String!
content: String!
}
type Reply @entity {
id: ID!
ipfsHash: Bytes
ipfsHash2: Bytes
author: User!
rating: Int
postTime: BigInt
postId: String!
parentReplyId: Int
content: String!
commentCount: Int
isDeleted: Boolean
isOfficialReply: Boolean
isBestReply: Boolean
isFirstReply: Boolean
isQuickReply: Boolean
properties: [Bytes!]
comments: [Comment!]!
language: Int
translations: [ReplyTranslation!]!
handle: String
messengerType: Int
}
type ReplyTranslation @entity {
id: ID!
replyId: String
language: Int
author: User
ipfsHash: Bytes
content: String!
}
type Comment @entity {
id: ID!
ipfsHash: Bytes
ipfsHash2: Bytes
author: User!
rating: Int
postTime: BigInt
postId: String!
parentReplyId: Int
content: String!
isDeleted: Boolean
properties: [Bytes!]
language: Int
translations: [CommentTranslation!]!
}
type CommentTranslation @entity {
id: ID!
commentId: String
language: Int
author: User
ipfsHash: Bytes
content: String!
}
type Achievement @entity {
id: ID!
factCount: BigInt
maxCount: BigInt
lowerValue: BigInt
achievementURI: String!
achievementsType: Int
name: String
description: String
image: String
communityId: String
attrCommunityId: String
attrEvent: String
attrType: String
}
type UserReward @entity {
id: ID!
period: Period
user: User
tokenToReward: BigInt
isPaid: Boolean
}
type Period @entity {
id: ID!
startPeriodTime: BigInt
endPeriodTime: BigInt
isFinished: Boolean
}
type ContractInfo @entity {
id: ID!
deployTime: BigInt!
periodLength: BigInt!
lastUpdatePeriod: Int!
}
type History @entity {
id: ID!
transactionHash: Bytes
post: Post
reply: Reply
comment: Comment
eventEntity: String
eventName: String
actionUser: User
timeStamp: BigInt
}
type CommunityDocumentation @entity {
id: ID!
documentationJson: String
ipfsHash: Bytes
}
type Statistic @entity {
id: ID!
actionUser: String
transactionHash: Bytes
timeStamp: BigInt
eventName: String
communityId: String
postId: BigInt
replyId: Int
commentId: Int
voteDirection: Int
status: Boolean
network: String
}