Skip to content
Snippets Groups Projects
Commit 5d143432 authored by Julian's avatar Julian
Browse files

Change person schema to export count of unread notifications

parent 130c005a
No related branches found
No related tags found
Loading
import graphene
from django.utils import timezone
from graphene_django import DjangoObjectType
from graphene_django.forms.mutation import DjangoModelFormMutation
......@@ -11,6 +12,7 @@ class PersonType(DjangoObjectType):
model = Person
full_name = graphene.Field(graphene.String)
unread_notifications_count = graphene.Field(graphene.Int)
def resolve_full_name(root: Person, info, **kwargs):
return root.full_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment