-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
78 lines (69 loc) · 1.47 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
type Server @withSubscription {
id: ID!
name: String! @search
isDirectMessage: Boolean!
isPrivate: Boolean!
channels: [Channel]
members: [User] @hasInverse(field: servers)
owner: User!
allowGuests: Boolean!
emotes: [Emote]
}
type Channel @withSubscription {
id: ID!
name: String! @search
type: ChannelType!
allowGuests: Boolean!
members: [User]
messages: [Message]
}
enum ChannelType {
Voice
Text
}
type Message @withSubscription {
id: ID!
user: User!
timeStamp: DateTime
contents: String!
top: Boolean!
edited: Boolean!
updated: DateTime
reactions: [Reaction]
children: [Message]
}
type Reaction @withSubscription {
id: ID!
emote: Emote!
users: [User!]
}
type Emote {
id: ID!
name: String!
url: String!
}
type User {
uid: String! @id @search(by: exact)
email: String!
displayName: String! @search
avatar: String
servers: [Server] @hasInverse(field: members)
directMessages: [Server]
serverInfo: [ServerInfo]
friends: [User] @hasInverse(field: friends)
}
type ServerInfo @withSubscription {
id: ID!
server: Server!
index: Int!
joinTime: DateTime!
channels: [Channel]
memberType: MemberType!
}
enum MemberType {
admin
mod
member
untrusted
}
# Dgraph.Authorization {"VerificationKey":"super-authkey","Header":"X-Harmony-App-Auth", "jwkurl":"https://www.googleapis.com/service_accounts/v1/jwk/[email protected]", "Namespace":"sub","Algo":"RS256","Audience":["harmony-7bb0f"]}