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
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 5m1s
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ const typeDefs = /* GraphQL */ `
|
||||
mutationKey: String
|
||||
): Groups!
|
||||
increment(
|
||||
link: Boolean
|
||||
link: Int
|
||||
command: Boolean
|
||||
trigger: Boolean
|
||||
mutationKey: String
|
||||
|
||||
Reference in New Issue
Block a user