Commit 7835e777 authored by Volker Krause's avatar Volker Krause
Browse files

De-duplicate the location part of the OTP2 journey GraphQL query

parent fbae3649
...@@ -35,36 +35,8 @@ query journeys( ...@@ -35,36 +35,8 @@ query journeys(
distance distance
mode mode
transitLeg transitLeg
from { from { ...locationFragment }
name to { ...locationFragment }
lat
lon
stop {
id: gtfsId
platformCode
}
bikeRentalStation {
id
networks,
bikesAvailable,
spacesAvailable
}
}
to {
name
lat
lon
stop {
id: gtfsId
platformCode
}
bikeRentalStation {
id
stationId,
networks,
bikesAvailable
}
}
trip { trip {
route { route {
type type
...@@ -113,3 +85,19 @@ query journeys( ...@@ -113,3 +85,19 @@ query journeys(
searchWindowUsed searchWindowUsed
} }
} }
fragment locationFragment on Place {
name
lat
lon
stop {
id: gtfsId
platformCode
}
bikeRentalStation {
id
stationId,
networks,
bikesAvailable
}
}
Supports Markdown
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