first commit

This commit is contained in:
2026-10-03 13:40:26 +02:00
parent 732a5b5a16
commit 566f415fa7
555 changed files with 62704 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import { Args, ID, Mutation, Resolver } from '@nestjs/graphql';
import { User } from '@task-stream/api/identity/domain';
import { CurrentUser } from '@task-stream/api/identity/presenters';
import { CommentsService } from '@task-stream/api/tracker/application';
import { CommandResultGql, CommentGql } from './types';
@Resolver(() => CommentGql)
export class CommentResolver {
constructor(private readonly comments: CommentsService) {}
@Mutation(() => CommandResultGql)
addComment(
@CurrentUser() me: User,
@Args('issueId', { type: () => ID }) issueId: string,
@Args('body') body: string,
) {
return this.comments.add(me.id, issueId, body);
}
@Mutation(() => CommandResultGql)
editComment(
@CurrentUser() me: User,
@Args('commentId', { type: () => ID }) commentId: string,
@Args('body') body: string,
) {
return this.comments.edit(me.id, commentId, body);
}
@Mutation(() => CommandResultGql, { description: 'Author or project admin' })
deleteComment(
@CurrentUser() me: User,
@Args('commentId', { type: () => ID }) commentId: string,
) {
return this.comments.delete(me.id, commentId);
}
}