This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSchema.gql
49 lines (35 loc) · 1.48 KB
/
Schema.gql
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
scalar Date
# import * from "./types/Member.gql"
# import * from "./types/ServerActivity.gql"
# import * from "./types/MainChannel.gql"
# import * from "./types/MainRole.gql"
# import * from "./types/PresenceMessage.gql"
# QUERY - for querying data (SELECT)
type Query {
member(id: ID!): Member # Discord ID
members: [Member!]! # Only members with "isOnServer = true"
todayServerActivity: ServerActivity!
serverActivity(historyCount: Int!): [ServerActivity!]!
roles: [MainRole!]!
channels: [MainChannel!]!
presenceMessages: [PresenceMessage!]!
}
# MUTATION - for creating new and updating/deleting existing data (INSERT, UPDATE, DELETE)
type Mutation {
createMember(
id: ID!
username: String!
profilePicture: String!
isOnServer: Boolean
): Member
updateMember(id: ID!, input: MemberInput!): Boolean!
incMemberDiscordVoiceMinute(id: ID!): Int! # Return the total voice minutes of the member (0 if request failed)
incMemberDiscordActivityChannel(id: ID!, channelId: ID!): Int! # Return the total member message count of the member (0 if request failed)
setServerActivityMemberCount(count: Int!): Boolean!
addRole(roleId: ID!, category: String!): Boolean!
removeRole(roleId: ID!): Boolean!
addChannel(channelId: ID!, category: String!): Boolean!
removeChannel(channelId: ID!): Boolean!
addPresenceMessage(type: PresenceType!, text: String!): Boolean!
removePresenceMessage(id: ID!): Boolean!
}