From 6e9478cd18b679c17c6a3d0a9f9b478c6dd34321 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Mon, 7 Apr 2025 12:41:27 -0700 Subject: [PATCH] update parent system ID reference for ETA resolvers --- src/resolvers/EtaResolvers.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);