2023-01-17 05:56:19 +00:00
"The `Boolean` scalar type represents `true` or `false`."
scalar Boolean
2022-11-04 20:23:36 +00:00
type Config {
minimumTeacherSelectionCount : Int !
}
2023-01-17 05:56:19 +00:00
"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point)."
scalar Float
"The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID."
scalar ID
"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1."
scalar Int
2022-11-04 20:23:36 +00:00
type Query {
2022-11-12 21:50:06 +00:00
admins : [ User ! ]
allStudentsVoted : Boolean
2022-11-04 20:23:36 +00:00
config : Config !
2022-11-12 21:50:06 +00:00
me : User
2022-11-04 20:23:36 +00:00
ok : Boolean !
2022-11-12 21:50:06 +00:00
student ( id : Int ! ) : Student
students : [ Student ! ]
2022-11-04 20:23:36 +00:00
studentsCanVote : Boolean !
teacher ( id : Int ! ) : Teacher !
2022-11-12 21:50:06 +00:00
teacherVote ( id : Int ! ) : TeacherVote
teacherVotes : [ TeacherVote ! ]
2022-11-04 20:23:36 +00:00
teachers : [ Teacher ! ] !
2022-11-21 18:48:53 +00:00
tokens : [ Token ! ]
2022-11-12 21:50:06 +00:00
user ( id : Int ! ) : User
userByUsername ( username : String ! ) : User
users : [ User ! ]
vote ( id : Int ! ) : Vote
votes : [ Vote ! ]
2022-11-04 20:23:36 +00:00
}
2023-01-17 05:56:19 +00:00
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text."
scalar String
2022-11-04 20:23:36 +00:00
type Student {
id : Int !
user : User !
vote : Vote
}
type Teacher {
id : Int !
maxStudents : Int !
teacherVotes : [ TeacherVote ! ] !
user : User !
}
type TeacherVote {
id : Int !
priority : Int !
teacher : Teacher !
vote : Vote !
}
2022-11-21 18:48:53 +00:00
scalar Time
type Token {
exp : Time !
expired : Boolean !
iat : Time !
id : UUID !
}
scalar UUID
2022-11-04 20:23:36 +00:00
type User {
admin : Boolean !
externalId : Int !
firstName : String !
id : Int !
lastName : String !
name ( formal : Boolean ! = true ) : String !
role : UserRole !
student : Student
teacher : Teacher
username : String !
}
enum UserRole {
Student
Teacher
}
type Vote {
id : Int !
student : Student !
teacherVotes : [ TeacherVote ! ] !
}
2023-01-17 05:56:19 +00:00
type __Directive {
args : [ __InputValue ! ] !
description : String
locations : [ String ! ] !
name : String !
}
type __EnumValue {
deprecationReason : String
description : String
isDeprecated : Boolean !
name : String !
}
type __Field {
args : [ __InputValue ! ] !
deprecationReason : String
description : String
isDeprecated : Boolean !
name : String !
type : __Type !
}
type __InputValue {
defaultValue : String
description : String
name : String !
type : __Type !
}
type __Schema {
directive s : [ __Directive ! ] !
mutation Type : __Type
query Type : __Type !
subscription Type : __Type
type s : [ __Type ! ] !
}
type __Type {
description : String
enum Values ( includeDeprecated : Boolean ! = false ) : [ __EnumValue ! ]
fields ( includeDeprecated : Boolean ! = false ) : [ __Field ! ]
input Fields : [ __InputValue ! ]
interface s : [ __Type ! ]
kind : __TypeKind !
name : String
ofType : __Type
possibleTypes : [ __Type ! ]
}
enum __TypeKind {
ENUM
INPUT_OBJECT
INTERFACE
LIST
NON_NULL
OBJECT
SCALAR
UNION
}
2022-11-04 20:23:36 +00:00
type LoginPayload {
bearer : String !
token : String !
user : User !
}
type Mutation {
2022-11-12 21:50:06 +00:00
createVote ( input : VoteCreateInput ! ) : Vote
deleteUser ( id : Int ! ) : Int
2022-11-05 20:27:49 +00:00
login ( password : String ! , username : String ! ) : LoginPayload
2022-11-21 18:48:53 +00:00
logout : UUID
2023-01-29 10:49:13 +00:00
registerTeacher ( input : TeacherInput ! ) : Teacher !
2022-11-21 18:48:53 +00:00
revokeToken ( token : UUID ! ) : UUID !
2022-11-23 19:17:14 +00:00
startAssignment : Boolean
2022-11-12 21:50:06 +00:00
}
input TeacherInput {
maxStudents : Int !
2022-11-04 20:23:36 +00:00
}
input VoteCreateInput {
teacherIds : [ Int ! ] !
2023-01-29 10:49:13 +00:00
}