diff --git a/internal/http/graph/like_notification_resolvers.go b/internal/http/graph/like_notification_resolvers.go index 0794dc2..b473e1c 100644 --- a/internal/http/graph/like_notification_resolvers.go +++ b/internal/http/graph/like_notification_resolvers.go @@ -3,6 +3,8 @@ package graph import ( "context" "fmt" + "tailly_back_v2/internal/domain" + "time" ) // MarkLikeNotificationAsRead is the resolver for the markLikeNotificationAsRead field. @@ -101,3 +103,12 @@ func (r *queryResolver) GetLikeNotifications(ctx context.Context, unreadOnly *bo UnreadCount: unreadCount, }, nil } + +// LikeNotification returns LikeNotificationResolver implementation. +func (r *Resolver) LikeNotification() LikeNotificationResolver { return &likeNotificationResolver{r} } + +type likeNotificationResolver struct{ *Resolver } + +func (r *likeNotificationResolver) CreatedAt(ctx context.Context, obj *domain.LikeNotification) (string, error) { + return obj.CreatedAt.Format(time.RFC3339), nil +}