-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
139 lines (122 loc) · 2.76 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
type Badge {
createdAt: Float
id: String
type: BadgeType!
user: RegisteredUser!
}
scalar BadgeType
type Confession {
content: String!
createdAt: Float
deletedAt: Float
id: Int
}
type ConfessionPage {
items: [Confession!]!
metadata: PageMetadata!
}
scalar Date
type Mutation {
archivePost(id: String!): Post!
confess(content: String!): Confession!
createPost(content: String!, attachments: [String!]): Post!
deletePost(id: String!): Post!
editProfile(bio: String, pronouns: String): RegisteredUser!
followUser(id: Int!): Int!
likeConfession(id: Int!): Int!
likePost(id: String!): Int!
readAllNotifications: Int!
readNotification(id: String!): Boolean!
replyToPost(to: String!, content: String!, attachments: [String!]): Post!
restorePost(id: String!): Post!
unfollowUser(id: Int!): Int!
unlikeConfession(id: Int!): Int!
unlikePost(id: String!): Int!
}
type Notification {
createdAt: Float
id: String
referencePost: Post
referenceUser: RegisteredUser
targetUser: RegisteredUser!
type: NotificationType!
}
enum NotificationType {
follow
like
comment
mention
}
type PageMetadata {
page: Int!
pageCount: Int!
per: Int!
total: Int!
}
type Post {
attachments: [String!]!
content: String!
createdAt: Float
creator: RegisteredUser!
creatorId: Int!
deletedAt: Float
id: String
likes(page: Int!, per: Int!): RegisteredUserPage!
likesCount: Int!
replies(page: Int!, per: Int!): PostPage!
selfLiked: Boolean!
}
type PostPage {
items: [Post!]!
metadata: PageMetadata!
}
type Query {
confession(id: Int!): Confession!
confessions(page: Int!, per: Int!): ConfessionPage!
latestConfession: Confession
post(id: String!): Post!
posts(creator: Int!, page: Int!, per: Int!): PostPage!
recentPosts(count: Int!, before: Int): [Post!]!
search(query: String!): [SearchResult!]!
self: RegisteredUser!
user(id: Int!): RegisteredUser!
users: [RegisteredUser!]!
}
type RegisteredUser {
avatarHash: String
badges: [Badge!]!
bio: String
branch: String!
collegeId: String!
dateRegistered: Float
email: String!
followedBySelf: Boolean!
followerCount: Int!
followers(page: Int!, per: Int!): RegisteredUserPage!
following(page: Int!, per: Int!): RegisteredUserPage!
followingCount: Int!
followsSelf: Boolean!
gender: String!
id: Int
isSelf: Boolean!
name: String!
notifications: [Notification!]!
personalEmail: String
phone: String!
posts(page: Int!, per: Int!): PostPage!
pronouns: String
}
type RegisteredUserPage {
items: [RegisteredUser!]!
metadata: PageMetadata!
}
union SearchResult = RegisteredUser | Post | Confession
type UnregisteredUser {
branch: String!
collegeId: String
email: String!
gender: String!
name: String!
phone: String!
}
scalar UUID