From 1a249315b4de6e520663794d2a76ec737e39cbba Mon Sep 17 00:00:00 2001 From: zhumeisongsong Date: Tue, 17 Dec 2024 14:00:01 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20TasksResolver?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interface-adapters/src/lib/resolver/tasks.resolver.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/tasks/interface-adapters/src/lib/resolver/tasks.resolver.ts b/libs/tasks/interface-adapters/src/lib/resolver/tasks.resolver.ts index d25f1a0..b629d48 100644 --- a/libs/tasks/interface-adapters/src/lib/resolver/tasks.resolver.ts +++ b/libs/tasks/interface-adapters/src/lib/resolver/tasks.resolver.ts @@ -1,16 +1,16 @@ +import { Injectable } from '@nestjs/common'; import { Query, Resolver } from '@nestjs/graphql'; -import { TasksService } from '@tasks/application'; +import { GetAllTasksUseCase } from '@tasks/application'; import { TaskDto } from '../dto/task.dto'; -import { Injectable } from '@nestjs/common'; @Injectable() @Resolver(() => [TaskDto]) export class TasksResolver { - constructor(private tasksService: TasksService) {} + constructor(private getAllTasksUseCase: GetAllTasksUseCase) {} @Query(() => [TaskDto]) async getTasks(): Promise { - return this.tasksService.findAll(); + return this.getAllTasksUseCase.execute(); } }