class Backend::Api::Loaders::StudentVote
- Backend::Api::Loaders::StudentVote
- GraphQL::DataLoader::Loader(Backend::Db::Student, Int32, Backend::Db::Vote?)
- Reference
- Object
Defined in:
backend/api/loaders/student.crInstance Method Summary
-
#fetch(batch students : Array(Db::Student)) : Array(Db::Vote | Nil)
The batch loading method.
-
#key_for(student : Db::Student)
Get the key for an object passed to
#load
.
Instance Method Detail
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