mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
14 lines
464 B
TypeScript
14 lines
464 B
TypeScript
import { Resolvers } from "../generated/graphql";
|
|
import { ServerContext } from "../ServerContext";
|
|
|
|
export const EtaResolvers: Resolvers<ServerContext> = {
|
|
ETA: {
|
|
stop: async (parent, args, contextValue, info) => {
|
|
return await contextValue.shuttleRepository.getStopById(parent.stopId);
|
|
},
|
|
shuttle: async (parent, args, contextValue, info) => {
|
|
return await contextValue.shuttleRepository.getShuttleById(parent.shuttleId);
|
|
},
|
|
},
|
|
}
|