class Backend::Api::Schema::Query

Included Modules

Defined in:

backend/api/schema/query.cr

Instance Method Summary

Instance Method Detail

def admins(context : Context) : Array(User) | Nil #

All admins


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

All students voted


def config : Config #

Public configuration of the API for frontend pre-validation


def me(context : Context) : User | Nil #

Current authenticated user


def ok : Bool #

Retuns true


def student(context : Context, id : Int32) : Student | Nil #

Student by ID


def students(context : Context) : Array(Student) | Nil #

All students


def students_can_vote : Bool #

Students can vote


def teacher(context : Context, id : Int32) : Teacher | Nil #

Teacher by ID


def teacher_vote(context : Context, id : Int32) : TeacherVote | Nil #

Teacher vote by ID


def teacher_votes(context : Context) : Array(TeacherVote) | Nil #

All teacher votes


def teachers(context : Context) : Array(Teacher) #

All teachers


def tokens(context : Context) : Array(Token) | Nil #

Active tokens of the current user


def user(context : Context, id : Int32) : User | Nil #

User by ID


def user_by_username(context : Context, username : String) : User | Nil #

def users(context : Context) : Array(User) | Nil #

All users


def vote(context : Context, id : Int32) : Vote | Nil #

Vote by ID


def votes(context : Context) : Array(Vote) | Nil #

All votes