diff --git a/src/resolvers/EtaResolvers.ts b/src/resolvers/EtaResolvers.ts index 0dabe62..0a2219f 100644 --- a/src/resolvers/EtaResolvers.ts +++ b/src/resolvers/EtaResolvers.ts @@ -4,15 +4,13 @@ import { ServerContext } from "../ServerContext"; export const EtaResolvers: Resolvers = { ETA: { stop: async (parent, args, contextValue, info) => { - if (!parent.shuttle) return null; - const system = contextValue.findSystemById(parent.shuttle.systemId); + const system = contextValue.findSystemById(parent.systemId); if (!system) return null; return await system.shuttleRepository.getStopById(parent.stopId); }, shuttle: async (parent, args, contextValue, info) => { - if (!parent.stop) return null; - const system = contextValue.findSystemById(parent.stop.systemId); + const system = contextValue.findSystemById(parent.systemId); if (!system) return null; return await system.shuttleRepository.getShuttleById(parent.shuttleId);