From d0cd7c2494084cdd2e1caf300ba7f192fb03e35a Mon Sep 17 00:00:00 2001 From: Cherik Date: Fri, 15 Nov 2024 13:02:41 +0330 Subject: [PATCH 1/2] add source to ProjectsSortedByVouchOrFlagType --- src/server-extension/types.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server-extension/types.ts b/src/server-extension/types.ts index 20c10f1..f91b7cd 100644 --- a/src/server-extension/types.ts +++ b/src/server-extension/types.ts @@ -13,6 +13,9 @@ export class ProjectsSortedByVouchOrFlagType { @Field(() => [Int], { nullable: true }) rfRounds: number[] = []; + + @Field() + source: string = ""; } @ObjectType() From bc637b578d877e282180a8041d74cc8f6b5177d3 Mon Sep 17 00:00:00 2001 From: Cherik Date: Fri, 15 Nov 2024 13:02:52 +0330 Subject: [PATCH 2/2] return source --- src/server-extension/project-resolver.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server-extension/project-resolver.ts b/src/server-extension/project-resolver.ts index 29c5ae6..5c75815 100644 --- a/src/server-extension/project-resolver.ts +++ b/src/server-extension/project-resolver.ts @@ -73,6 +73,7 @@ export class ProjectResolver { const query = ` SELECT project.id, + project.source, project.rf_rounds, SUM(organisation_project.count) AS total_count FROM @@ -94,6 +95,7 @@ export class ProjectResolver { return rawProjects.map( (rawProject: { id: string; + source: string; rf_rounds: number[] | null; total_count: number; }) => ({