fix incorrect id passed into find system method for stop resolvers

This commit is contained in:
2025-04-06 11:37:53 -07:00
parent 8a600565dc
commit 28c3e2f5f5

View File

@@ -4,14 +4,14 @@ import { ServerContext } from "../ServerContext";
export const StopResolvers: Resolvers<ServerContext> = { export const StopResolvers: Resolvers<ServerContext> = {
Stop: { Stop: {
orderedStops: async (parent, args, contextValue, _info) => { orderedStops: async (parent, args, contextValue, _info) => {
const system = contextValue.findSystemById(parent.id); const system = contextValue.findSystemById(parent.systemId);
if (!system) { if (!system) {
return []; return [];
} }
return await system.shuttleRepository.getOrderedStopsByStopId(parent.id); return await system.shuttleRepository.getOrderedStopsByStopId(parent.id);
}, },
etas: async (parent, args, contextValue, _info) => { etas: async (parent, args, contextValue, _info) => {
const system = contextValue.findSystemById(parent.id); const system = contextValue.findSystemById(parent.systemId);
if (!system) { if (!system) {
return []; return [];
} }