diff --git a/resolvers/schema.py b/resolvers/schema.py index 92dc08b..6f33029 100644 --- a/resolvers/schema.py +++ b/resolvers/schema.py @@ -66,8 +66,8 @@ def get_notifications(author_id: int, session, limit: int, offset: int) -> List[ @strawberry.type class Query: - @strawberry.field @login_required + @strawberry.field async def load_notifications(self, info, limit: int = 50, offset: int = 0) -> NotificationsResult: author_id = info.context.get("author_id") with local_session() as session: @@ -88,8 +88,8 @@ class Query: @strawberry.type class Mutation: - @strawberry.mutation @login_required + @strawberry.mutation async def mark_notification_as_read(self, info, notification_id: int) -> NotificationSeenResult: author_id = info.context.get("author_id") if author_id: @@ -105,8 +105,8 @@ class Mutation: return nsr return NotificationSeenResult() - @strawberry.mutation @login_required + @strawberry.mutation async def mark_all_notifications_as_read(self, info) -> NotificationSeenResult: author_id = info.context.get("author_id") if author_id: