mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
remove nextOrderedStop from Route schema
This commit is contained in:
@@ -18,7 +18,6 @@ type Route {
|
||||
name: String!
|
||||
id: ID!
|
||||
orderedStops: [OrderedStop!]
|
||||
nextOrderedStop(forStopId: ID): OrderedStop
|
||||
shuttles: [Shuttle!]
|
||||
polylineCoordinates: [Coordinates!]!
|
||||
color: String!
|
||||
|
||||
@@ -88,14 +88,6 @@ export const resolvers: Resolvers<ServerContext> = {
|
||||
}
|
||||
},
|
||||
Route: {
|
||||
nextOrderedStop: (parent, args, contextValue, info) => {
|
||||
const orderedStop = parent.orderedStops?.find((orderedStop) => orderedStop.stop?.id === args.forStopId);
|
||||
if (!orderedStop || !orderedStop.nextStop) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return orderedStop.nextStop;
|
||||
},
|
||||
},
|
||||
Shuttle: {
|
||||
eta: (parent, args, contextValue, info) => {
|
||||
|
||||
Reference in New Issue
Block a user