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.
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 5m1s

This commit is contained in:
2026-01-26 21:28:41 -05:00
parent e0a99cc455
commit 49a74cf4df
2 changed files with 3 additions and 3 deletions

View File

@@ -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 }
}

View File

@@ -26,7 +26,7 @@ const typeDefs = /* GraphQL */ `
mutationKey: String
): Groups!
increment(
link: Boolean
link: Int
command: Boolean
trigger: Boolean
mutationKey: String