diff --git a/openlobby/core/api/types.py b/openlobby/core/api/types.py index b777ba263ef20dd397133bdfe1fc3221206ce0cd..d88698d630f07b8684086657eb32363c6e256f49 100644 --- a/openlobby/core/api/types.py +++ b/openlobby/core/api/types.py @@ -169,6 +169,9 @@ class Author(graphene.ObjectType): return ReportConnection(page_info=page_info, edges=edges, total_count=total) + def resolve_total_reports(self, info, **kwargs): + return models.Report.objects.filter(author_id=self.id, is_draft=False).count() + class LoginShortcut(graphene.ObjectType): name = graphene.String()