From 8cbfc06464d8314ced6b25eb8aa95516d9b10bef Mon Sep 17 00:00:00 2001 From: cindy-x-liang <67083541+cindy-x-liang@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:45:43 -0500 Subject: [PATCH] add num flyers for organizations --- src/resolvers/OrganizationResolver.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/resolvers/OrganizationResolver.ts b/src/resolvers/OrganizationResolver.ts index 17a11b1..4bae6be 100644 --- a/src/resolvers/OrganizationResolver.ts +++ b/src/resolvers/OrganizationResolver.ts @@ -57,6 +57,13 @@ class OrganizationResolver { async clicks(@Root() organization: Organization): Promise { return OrganizationRepo.getClicks(organization); } + + @FieldResolver((_returns) => Number, { + description: "Returns the total times clicked of an ", + }) + async numFlyers(@Root() organization: Organization): Promise { + return OrganizationRepo.getNumFlyers(organization); + } } export default OrganizationResolver;