timetracker/games/graphql/queries/session.py

12 lines
271 B
Python
Raw Normal View History

2023-11-29 20:58:33 +00:00
import graphene
from games.graphql.types import Session
from games.models import Session as SessionModel
class Query(graphene.ObjectType):
sessions = graphene.List(Session)
def resolve_sessions(self, info, **kwargs):
return SessionModel.objects.all()