import asyncio

import strawberry
from sqlmodel import Session, select
from strawberry.types import Info

from fastapi_server.models.user import User
from fastapi_server.routes.graph_ql.broadcaster import Broadcast

broadcast = Broadcast()


@strawberry.type
class UserSystemQuery:
    @strawberry.field
    def user_login(self, info: Info, email: str, password: str) -> str:
        # TODO Replace with actual password hash function
        session: Session = info.context['session']
        statement = 