mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
update query resolvers to add the seconds threshold
This commit is contained in:
@@ -3,10 +3,10 @@ import { Resolvers } from "../generated/graphql";
|
||||
|
||||
export const QueryResolvers: Resolvers<ServerContext> = {
|
||||
Query: {
|
||||
systems: async (parent, args, contextValue, info) => {
|
||||
systems: async (_parent, args, contextValue, _info) => {
|
||||
return await contextValue.repository.getSystems();
|
||||
},
|
||||
system: async (parent, args, contextValue, info) => {
|
||||
system: async (_parent, args, contextValue, _info) => {
|
||||
if (!args.id) return null;
|
||||
const system = await contextValue.repository.getSystemById(args.id);
|
||||
if (system === null) return null;
|
||||
@@ -19,6 +19,10 @@ export const QueryResolvers: Resolvers<ServerContext> = {
|
||||
isNotificationScheduled: async (_parent, args, contextValue, _info) => {
|
||||
const notificationData = args.input;
|
||||
return contextValue.notificationService.isNotificationScheduled(notificationData);
|
||||
}
|
||||
},
|
||||
secondsThresholdForNotification: async (_parent, args, contextValue, _info) => {
|
||||
const notificationData = args.input;
|
||||
return contextValue.notificationService.getSecondsThresholdForScheduledNotification(notificationData);
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user