add system ID to ETA object in graphql schema

This commit is contained in:
2025-04-07 12:40:53 -07:00
parent c8ea822626
commit ea46115b86
2 changed files with 4 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ type ETA {
shuttle: Shuttle shuttle: Shuttle
shuttleId: ID! shuttleId: ID!
secondsRemaining: Float! secondsRemaining: Float!
systemId: ID!
} }
type Shuttle { type Shuttle {

View File

@@ -17,6 +17,7 @@ export const ShuttleResolvers: Resolvers<ServerContext> = {
secondsRemaining: etaForStopId.secondsRemaining, secondsRemaining: etaForStopId.secondsRemaining,
shuttleId: parent.id, shuttleId: parent.id,
shuttle: parent, shuttle: parent,
systemId: system.id,
}; };
}, },
etas: async (parent, args, contextValue, info) => { etas: async (parent, args, contextValue, info) => {
@@ -35,6 +36,7 @@ export const ShuttleResolvers: Resolvers<ServerContext> = {
stopId, stopId,
shuttle: parent, shuttle: parent,
shuttleId: parent.id, shuttleId: parent.id,
systemId: system.id,
} }
})); }));
@@ -56,7 +58,7 @@ export const ShuttleResolvers: Resolvers<ServerContext> = {
id: route.id, id: route.id,
name: route.name, name: route.name,
polylineCoordinates: route.polylineCoordinates, polylineCoordinates: route.polylineCoordinates,
systemId: parent.systemId, systemId: system.id,
} }
} }
}, },