From c8cf99d5d9eee6b46ebacdcce0e83040c7c286e2 Mon Sep 17 00:00:00 2001 From: nick-funk Date: Thu, 2 Nov 2023 10:22:34 -0600 Subject: [PATCH] rename loader function for single DSA Report --- server/src/core/server/graph/loaders/DSAReports.ts | 2 +- server/src/core/server/graph/resolvers/Notification.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/core/server/graph/loaders/DSAReports.ts b/server/src/core/server/graph/loaders/DSAReports.ts index 17c5159b57..af8d1da4e8 100644 --- a/server/src/core/server/graph/loaders/DSAReports.ts +++ b/server/src/core/server/graph/loaders/DSAReports.ts @@ -10,7 +10,7 @@ export interface FindDSAReportInput { } export default (ctx: GraphContext) => ({ - find: new DataLoader( + dsaReport: new DataLoader( createManyBatchLoadFn((input: FindDSAReportInput) => find(ctx.mongo, ctx.tenant, input) ), diff --git a/server/src/core/server/graph/resolvers/Notification.ts b/server/src/core/server/graph/resolvers/Notification.ts index 56e86def8a..1ea492ac9c 100644 --- a/server/src/core/server/graph/resolvers/Notification.ts +++ b/server/src/core/server/graph/resolvers/Notification.ts @@ -28,6 +28,6 @@ export const NotificationResolver: Required< return null; } - return await ctx.loaders.DSAReports.find.load({ id: reportID }); + return await ctx.loaders.DSAReports.dsaReport.load({ id: reportID }); }, };