move other resolvers into their own files

This commit is contained in:
2025-01-23 03:39:50 -08:00
parent 718677d6dd
commit 5813408a36
7 changed files with 241 additions and 198 deletions

View File

@@ -0,0 +1,13 @@
import { Resolvers } from "../generated/graphql";
import { ServerContext } from "../ServerContext";
export const StopResolvers: Resolvers<ServerContext> = {
Stop: {
orderedStops: async (parent, args, contextValue, info) => {
return await contextValue.repository.getOrderedStopsByStopId(parent.id);
},
etas: async (parent, args, contextValue, info) => {
return await contextValue.repository.getEtasForStopId(parent.id);
},
},
}