Commit 2794e981 authored by Volker Krause's avatar Volker Krause
Browse files

Support locales, bike rentals and optional journey data for Entur

Mostly brings the Entur journey GraphQL on the same level as the OTP2 one.
parent 38aa9c15
......@@ -8,7 +8,10 @@ query journeys(
$toLon: Float!,
$dateTime: DateTime!,
$arriveBy: Boolean!,
$maxResults: Int!
$maxResults: Int!,
$lang: Locale!,
$withIntermediateStops: Boolean!,
$withPaths: Boolean!
) {
plan: trip (
from: { coordinates: { latitude: $fromLat, longitude: $fromLon } }
......@@ -16,6 +19,7 @@ query journeys(
dateTime: $dateTime
arriveBy: $arriveBy
numTripPatterns: $maxResults
locale: $lang
) {
itineraries: tripPatterns {
legs {
......@@ -27,27 +31,9 @@ query journeys(
distance
mode
transitLeg: ride
from: fromPlace {
name
lat: latitude
lon: longitude
stop: quay {
platformCode: publicCode
description
id
timezone
}
}
to: toPlace {
name
lat: latitude
lon: longitude
stop: quay {
platformCode: publicCode
id
timezone
}
}
rentedBike
from: fromPlace { ...locationFragment }
to: toPlace { ...locationFragment }
line {
presentation {
color: colour
......@@ -68,7 +54,7 @@ query journeys(
}
}
}
intermediateStops: intermediateEstimatedCalls {
intermediateStops: intermediateEstimatedCalls @include(if: $withIntermediateStops) {
stop: quay {
id
name
......@@ -82,7 +68,7 @@ query journeys(
scheduledDepartureTime: aimedDepartureTime
expectedDepartureTime: actualDepartureTime
}
legGeometry: pointsOnLink {
legGeometry: pointsOnLink @include(if: $withPaths) {
length
points
}
......@@ -90,3 +76,19 @@ query journeys(
}
}
}
fragment locationFragment on Place {
name
lat: latitude
lon: longitude
stop: quay {
platformCode: publicCode
id
timezone
}
bikeRentalStation {
id
networks,
bikesAvailable
}
}
......@@ -99,6 +99,7 @@
}
]
},
"supportedLanguages": [ "no" ],
"type": {
"otpGraphQl": true
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment