From 2ca9551bfac9a300827e07bc07b03ab34bc0e874 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Sun, 22 Dec 2024 19:51:14 -0800 Subject: [PATCH] remove nextOrderedStop from Route schema --- schema.graphql | 1 - src/resolvers.ts | 8 -------- 2 files changed, 9 deletions(-) diff --git a/schema.graphql b/schema.graphql index 7401505..fed40f6 100644 --- a/schema.graphql +++ b/schema.graphql @@ -18,7 +18,6 @@ type Route { name: String! id: ID! orderedStops: [OrderedStop!] - nextOrderedStop(forStopId: ID): OrderedStop shuttles: [Shuttle!] polylineCoordinates: [Coordinates!]! color: String! diff --git a/src/resolvers.ts b/src/resolvers.ts index 91aea32..5dc5691 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -88,14 +88,6 @@ export const resolvers: Resolvers = { } }, 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) => {