This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.gql
74 lines (60 loc) · 1.53 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
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
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
"""Chapter model"""
type Chapter {
"""Chapter ID"""
id: ID!
"""Chapter name"""
name: String!
"""Managers of a chapter"""
managers: [User]
"""Editions of a chapter"""
editions: [Edition!]
}
"""Chapter model"""
type Edition {
year: Int!
uri: String!
}
type Mutation {
addUser(email: String!, name: String!): User!
confirmAccount(password: String!, token: String!): User!
login(password: String!, email: String!): User!
logout: Boolean!
updateProfile(input: UpdateProfileInput!): User!
updateUserRole(userId: String!, role: String!): User!
deleteMe: User!
deleteUser(userId: String!): User!
createChapter(name: String!): Chapter!
deleteChapter(id: String!): Chapter!
addManager(chapterId: String!, userId: String!): Chapter!
removeManager(chapterId: String!, userId: String!): Chapter!
newEdition(uri: String!, year: Float!, chapterId: String!): Chapter!
}
type Query {
me: User!
users: [User!]
chapters: [Chapter!]
}
input UpdateProfileInput {
"""User fullname (firstname & lastname)"""
name: String
"""User email"""
email: String
"""User password"""
password: String
}
"""User model"""
type User {
"""User ID"""
id: ID!
"""User fullname (firstname & lastname)"""
name: String!
"""User email"""
email: String!
role: String
"""Chapters of the user"""
chapters: [Chapter!]
}