class Backend::Api::Loaders::StudentVote

Defined in:

backend/api/loaders/student.cr

Instance Method Summary

Instance Method Detail

def fetch(batch students : Array(Db::Student)) : Array(Db::Vote | Nil) #
Description copied from class GraphQL::DataLoader::Loader(Backend::Db::Student, Int32, Backend::Db::Vote?)

The batch loading method. Gets called with all objects that have been passed to #load in the current batch. A batch is fetched after 1 microsecond since the first call to #load.


def key_for(student : Db::Student) #
Description copied from class GraphQL::DataLoader::Loader(Backend::Db::Student, Int32, Backend::Db::Vote?)

Get the key for an object passed to #load. Override this if O differs from K