From 49a74cf4df62c3978004e436bb68305609830d4d Mon Sep 17 00:00:00 2001 From: Lucid Date: Mon, 26 Jan 2026 21:28:41 -0500 Subject: [PATCH] Updated the increment mutation to take a number instead of a boolean. For instances when more than 1 group is detected. Like when parsing embeds and captions. --- src/graphql/resolvers.ts | 4 ++-- src/graphql/types.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphql/resolvers.ts b/src/graphql/resolvers.ts index 1783496..942be6d 100644 --- a/src/graphql/resolvers.ts +++ b/src/graphql/resolvers.ts @@ -243,7 +243,7 @@ export const resolvers = { increment: async ( _parent: unknown, data: { - link: boolean; + link: number; command: boolean; trigger: boolean; mutationKey?: string; @@ -282,7 +282,7 @@ export const resolvers = { return await prisma.dailyStats.update({ where: { createdAt: latestDailyStats.createdAt }, data: { - linksDeleted: { increment: link ? 1 : 0 }, + linksDeleted: { increment: link ? link : 0 }, commandResponses: { increment: command ? 1 : 0 }, timesTriggered: { increment: trigger ? 1 : 0 } } diff --git a/src/graphql/types.ts b/src/graphql/types.ts index 58d3486..3f34ca8 100644 --- a/src/graphql/types.ts +++ b/src/graphql/types.ts @@ -26,7 +26,7 @@ const typeDefs = /* GraphQL */ ` mutationKey: String ): Groups! increment( - link: Boolean + link: Int command: Boolean trigger: Boolean mutationKey: String