mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
remove nextOrderedStop from Route schema
This commit is contained in:
@@ -18,7 +18,6 @@ type Route {
|
|||||||
name: String!
|
name: String!
|
||||||
id: ID!
|
id: ID!
|
||||||
orderedStops: [OrderedStop!]
|
orderedStops: [OrderedStop!]
|
||||||
nextOrderedStop(forStopId: ID): OrderedStop
|
|
||||||
shuttles: [Shuttle!]
|
shuttles: [Shuttle!]
|
||||||
polylineCoordinates: [Coordinates!]!
|
polylineCoordinates: [Coordinates!]!
|
||||||
color: String!
|
color: String!
|
||||||
|
|||||||
@@ -88,14 +88,6 @@ export const resolvers: Resolvers<ServerContext> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Route: {
|
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: {
|
Shuttle: {
|
||||||
eta: (parent, args, contextValue, info) => {
|
eta: (parent, args, contextValue, info) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user