From 74ada7ed4b401f1e15b0c6bfa295f4d2d1bd5cea Mon Sep 17 00:00:00 2001 From: Mario Sergio Date: Fri, 28 Jun 2024 17:49:44 -0300 Subject: [PATCH] feat(notifications): Inserted total emails fireld on autofire API graphql --- packages/notifications/src/graphql-api/resolvers/email_stats.ts | 2 ++ packages/notifications/src/graphql-api/schema/schema.graphql | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/notifications/src/graphql-api/resolvers/email_stats.ts b/packages/notifications/src/graphql-api/resolvers/email_stats.ts index cc43b70..a7d4b07 100644 --- a/packages/notifications/src/graphql-api/resolvers/email_stats.ts +++ b/packages/notifications/src/graphql-api/resolvers/email_stats.ts @@ -20,6 +20,7 @@ interface EmailStatsResponse { bounced: number; processed: number; click: number; + total: number; }; } @@ -79,6 +80,7 @@ export default async (_: void, args: EmailStatsArgs): Promise event.event === "bounced").length, processed: events.filter(event => event.event === "processed").length, click: events.filter(event => event.event === "click").length, + total: events.length }; return { events, stats }; diff --git a/packages/notifications/src/graphql-api/schema/schema.graphql b/packages/notifications/src/graphql-api/schema/schema.graphql index 2c54ac0..0eddc52 100644 --- a/packages/notifications/src/graphql-api/schema/schema.graphql +++ b/packages/notifications/src/graphql-api/schema/schema.graphql @@ -78,6 +78,7 @@ type EmailStats { bounced: Int processed: Int click: Int + total: Int } type EmailStatsResponse {