From 744ecbf1484ff694e540ba1c2affdb0be39bb9a0 Mon Sep 17 00:00:00 2001 From: Michael Bauer <michael-bauer@posteo.de> Date: Wed, 29 May 2024 12:37:48 +0200 Subject: [PATCH] Add statistics query resolvers --- aleksis/apps/alsijil/schema/statistics.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aleksis/apps/alsijil/schema/statistics.py b/aleksis/apps/alsijil/schema/statistics.py index 37b893784..ee3dd29b3 100644 --- a/aleksis/apps/alsijil/schema/statistics.py +++ b/aleksis/apps/alsijil/schema/statistics.py @@ -8,16 +8,24 @@ class AbsenceReasonWithCountType(graphene.ObjectType): absence_reason = graphene.Field(AbsenceReasonType) count = graphene.Int() + def resolve_absence_reason(root, info): + return root + def resolve_count(root, info): return 6 + class ExtraMarkWithCountType(graphene.ObjectType): extra_mark = graphene.Field(ExtraMarkType) count = graphene.Int() + def resolve_extra_mark(root, info): + return root + def resolve_count(root, info): return 7 + class StatisticsByPersonType(graphene.ObjectType): participation_count = graphene.Int() absence_count = graphene.Int() -- GitLab