Skip to content

Commit

Permalink
backend/fix: add gtfsId to gql request
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayanth-Parthsarathy authored and piyushKumar-1 committed Oct 15, 2024
1 parent 15a23db commit 9b9d354
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ instance ToJSON TransportMode where
instance RequestType OTPPlan where
type RequestArgs OTPPlan = OTPPlanArgs
__name _ = "OTPPlan"
__query _ = "query OTPPlan (\n $from: InputCoordinates!,\n $to: InputCoordinates!,\n $date: String,\n $time:String,\n $transportModes: [TransportMode],\n $numItineraries: Int\n){\n plan(\n from: $from,\n to: $to,\n date: $date,\n time: $time,\n transportModes: $transportModes,\n numItineraries : $numItineraries\n ) {\n itineraries {\n duration\n legs {\n pickupType\n distance\n mode\n duration\n startTime\n endTime\n from {\n name\n lat\n lon\n departureTime\n arrivalTime\n stop {\n code\n }\n }\n to {\n name\n lat\n lon\n departureTime\n arrivalTime\n stop {\n code\n }\n }\n route {\n gtfsId\n longName\n shortName\n agency {\n gtfsId\n name\n }\n }\n legGeometry {\n points\n }\n fareProducts {\n id\n }\n }\n }\n }\n}\n"
__query _ = "query OTPPlan (\n $from: InputCoordinates!,\n $to: InputCoordinates!,\n $date: String,\n $time:String,\n $transportModes: [TransportMode],\n $numItineraries: Int\n){\n plan(\n from: $from,\n to: $to,\n date: $date,\n time: $time,\n transportModes: $transportModes,\n numItineraries : $numItineraries\n ) {\n itineraries {\n duration\n legs {\n pickupType\n distance\n mode\n duration\n startTime\n endTime\n from {\n name\n lat\n lon\n departureTime\n arrivalTime\n stop {\n code\n gtfsId\n }\n }\n to {\n name\n lat\n lon\n departureTime\n arrivalTime\n stop {\n code\n gtfsId\n }\n }\n route {\n gtfsId\n longName\n shortName\n agency {\n gtfsId\n name\n }\n }\n legGeometry {\n points\n }\n fareProducts {\n id\n }\n }\n }\n }\n}\n"
__type _ = OPERATION_QUERY

newtype OTPPlan = OTPPlan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,34 @@ type Itinerary {
legs: [Leg]!
}

enum Mode {
AIRPLANE
BICYCLE
BUS
CABLE_CAR
CAR
COACH
FERRY
FLEX
FUNICULAR
GONDOLA
RAIL
SCOOTER
SUBWAY
TRAM
CARPOOL
TAXI
TRANSIT
WALK
TROLLEYBUS
MONORAIL
}

type Leg {
distance: Float
duration: Float
legGeometry: Geometry
mode: String
mode: Mode
startTime: Float
pickupType: String
endTime: Float
Expand Down

0 comments on commit 9b9d354

Please sign in to comment.