From 29beb7add3852a84cd1fe022ff0d0c8cc5ec41f2 Mon Sep 17 00:00:00 2001 From: Zack Pollard Date: Thu, 19 Dec 2024 14:30:00 +0000 Subject: [PATCH] fix: discussion graphql query incorrect (#56) --- backend/src/repositories/github.repository.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/backend/src/repositories/github.repository.ts b/backend/src/repositories/github.repository.ts index 6fac396..13a9b1a 100644 --- a/backend/src/repositories/github.repository.ts +++ b/backend/src/repositories/github.repository.ts @@ -115,7 +115,13 @@ export class GithubRepository implements IGithubRepository { async getDiscussionsCounts(repo: GithubRepo) { const { repository } = await this.graphqlWithAuth<{ repository: { - discussions: { + total: { + totalCount: number; + }; + open: { + totalCount: number; + }; + closed: { totalCount: number; }; }; @@ -142,9 +148,9 @@ export class GithubRepository implements IGithubRepository { ); return { - total: repository.discussions.totalCount, - open: repository.discussions.totalCount, - closed: repository.discussions.totalCount, + total: repository.total.totalCount, + open: repository.open.totalCount, + closed: repository.closed.totalCount, }; }