This repository has been archived by the owner on Sep 30, 2023. It is now read-only.
/
schema.graphql
125 lines (109 loc) 路 2.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
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
# This file was generated based on ".graphqlconfig". Do not edit manually.
schema {
query: Query
mutation: Mutation
}
type AuthPayload {
token: String!
user: User!
}
type Contract {
archived: Boolean!
end: String!
groups: [Group!]!
hexColor: String!
id: Int!
name: String!
skills: [Skill!]!
start: String!
}
type Group {
contracts: [Contract!]!
id: Int!
name: String!
students: [Student!]!
}
type Mutation {
createOneContract(end: String!, hexColor: String!, name: String!, skillNames: [String!]!, start: String!): Contract!
createOneGroup(contractID: Int, name: String!): Group!
createOneSkill(contractID: Int!, name: String!): Skill!
createOneStudent(student: StudentInput!, user: UserInput!): Student!
createOneTeacher(firstName: String!, lastName: String!, password: String!, username: String!): Teacher!
deleteOneContract(id: Int!): Contract!
deleteOneSkill(id: Int!): Skill!
deleteOneStudent(ownerUsername: String!): Student!
generateSpreadsheet: String!
login(password: String!, username: String!): AuthPayload!
updateOneContract(contractID: Int!, groupIDs: [Int!]): Contract!
updateOneSkill(name: String, skillID: Int!): Skill!
updateOneStudent(groupIDs: [Int!], ownerUsername: String!): Student!
upsertOneSkillToStudent(mark: Mark!, skillID: Int!, studentOwnerUsername: String!): StudentSkill!
}
type Query {
contract(id: Int!): Contract!
contracts(groups: FilterGroup): [Contract!]!
groups: [Group!]!
me: User!
student(ownerUsername: String!): Student!
studentSkills(contractID: Int, studentUsername: String!): [StudentSkill!]!
students(contractID: Int): [Student!]!
teachers: [Teacher!]!
}
type Skill {
contract: Contract!
contractId: Int!
id: Int!
name: String!
studentSkills: [StudentSkill!]!
}
type Student {
firstName: String!
groups: [Group!]!
lastName: String!
owner: User!
ownerUsername: String!
studentSkills: [StudentSkill!]!
}
type StudentSkill {
mark: Mark!
skill: Skill!
skillID: Int!
student: Student!
studentID: String!
}
type Teacher {
firstName: String!
lastName: String!
owner: User!
ownerUsername: String!
}
type User {
role: Role!
student: [Student!]!
teacher: [Teacher!]!
username: String!
}
enum Mark {
BAD
GOOD
TODO
TO_CORRECT
TO_FINISH
VERY_BAD
VERY_GOOD
}
enum Role {
ADMIN
STUDENT
TEACHER
}
input FilterGroup {
idsIn: [Int!]
}
input StudentInput {
firstName: String!
lastName: String!
}
input UserInput {
password: String!
}