import { Resolver, Args, Mutation, Subscription } from '@nestjs/graphql'; import { PipelineTask } from './pipeline-task.entity'; import { PipelineTasksService } from './pipeline-tasks.service'; import { CreatePipelineTaskInput } from './dtos/create-pipeline-task.input'; import { PipelineTaskLogMessage } from './models/pipeline-task-log-message.module'; import { PipelineTaskLogArgs } from './dtos/pipeline-task-log.args'; @Resolver() export class PipelineTasksResolver { constructor(private readonly service: PipelineTasksService) {} @Mutation(() => PipelineTask) async createPipelineTask(@Args('task') taskDto: CreatePipelineTaskInput) { return await this.service.addTask(taskDto); } @Subscription(() => PipelineTaskLogMessage) }