class Backend::Api::Schema::Mutation

Included Modules

Defined in:

backend/api/schema/mutation.cr

Instance Method Summary

Instance Method Detail

def create_vote(context : Context, input : VoteCreateInput) : Vote | Nil #

Creates vote for authenticated user's student


def login(username : String, password : String) : LoginPayload | Nil #

Logs in as username with credential password


def logout(context : Context) : Scalars::UUID | Nil #

Logs out of account by revoking token


def register_teacher(context : Context, input : TeacherInput) : Teacher #

Self register as teacher


def revoke_token(context : Context, token : Scalars::UUID) : Scalars::UUID #

def set_voting(context : Context, state : Bool) : Bool | Nil #

Sets if students are allowed to vote


def start_assignment(context : Context) : Bool | Nil #

Starts assignment job of mentors to students