digitransit-ui/build/schema.graphql
2024-05-09 07:30:16 +03:00

5582 lines
170 KiB
GraphQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Use an asynchronous data fetcher on a separate thread for this field.
This is useful when adding several queries in the same HTTP request, for example by using a batch: Those
fields annotated with this directive run in parallel.
This is only worth it when the execution is long running, i.e. more than ~50 milliseconds, so this doesn't happen by default.
"""
directive @async on FIELD_DEFINITION
"""
Exactly one of the fields on an input object must be set and non-null while all others are omitted.
"""
directive @oneOf on INPUT_OBJECT
schema {
query: QueryType
}
"""
Plan accessibilty preferences. This can be expanded to contain preferences for various accessibility use cases
in the future. Currently only generic wheelchair preferences are available.
"""
input AccessibilityPreferencesInput {
"""
Wheelchair related preferences. Note, currently this is the only accessibility mode that is available.
"""
wheelchair: WheelchairPreferencesInput
}
"""A public transport agency"""
type Agency implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""Agency feed and id"""
gtfsId: String!
"""Name of the agency"""
name: String!
"""URL to the home page of the agency"""
url: String!
"""ID of the time zone which this agency operates on"""
timezone: String!
lang: String
"""Phone number which customers can use to contact this agency"""
phone: String
"""URL to a web page which has information of fares used by this agency"""
fareUrl: String
"""List of routes operated by this agency"""
routes: [Route]
"""
By default, list of alerts which have an effect on all operations of the agency (e.g. a strike).
It's also possible to return other relevant alerts through defining types.
"""
alerts(
"""
Returns alerts for these types that are relevant for the agency.
By default only returns alerts that have an effect on all operations of the agency (e.g. a strike).
"""
types: [AgencyAlertType]
): [Alert]
}
"""Entities, which are relevant for an agency and can contain alerts"""
enum AgencyAlertType {
"""Alerts affecting the agency."""
AGENCY
"""Alerts affecting agency's routes"""
ROUTES
"""
Alerts affecting the different route types of the agency.
Alerts that affect route types on all agencies can be fetched through Feed.
"""
ROUTE_TYPES
}
"""Alert of a current or upcoming disruption in public transportation"""
type Alert implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""hashcode from the original GTFS-RT alert"""
alertHash: Int
"""The feed in which this alert was published"""
feed: String
"""
Agency affected by the disruption. Note that this value is present only if the
disruption has an effect on all operations of the agency (e.g. in case of a strike).
"""
agency: Agency @deprecated(reason:
"""
Alert can have multiple affected entities now instead of there being duplicate alerts
for different entities. This will return only one of the affected agencies.
Use entities instead.
"""
)
"""Route affected by the disruption"""
route: Route @deprecated(reason:
"""
Alert can have multiple affected entities now instead of there being duplicate alerts
for different entities. This will return only one of the affected routes.
Use entities instead.
"""
)
"""Trip affected by the disruption"""
trip: Trip @deprecated(reason:
"""
Alert can have multiple affected entities now instead of there being duplicate alerts
for different entities. This will return only one of the affected trips.
Use entities instead.
"""
)
"""Stop affected by the disruption"""
stop: Stop @deprecated(reason:
"""
Alert can have multiple affected entities now instead of there being duplicate alerts
for different entities. This will return only one of the affected stops.
Use entities instead.
"""
)
"""Patterns affected by the disruption"""
patterns: [Pattern] @deprecated(reason: "This will always return an empty list. Use entities instead.")
"""Header of the alert, if available"""
alertHeaderText: String
"""Header of the alert in all different available languages"""
alertHeaderTextTranslations: [TranslatedString!]!
"""Long description of the alert"""
alertDescriptionText: String!
"""Long descriptions of the alert in all different available languages"""
alertDescriptionTextTranslations: [TranslatedString!]!
"""Url with more information"""
alertUrl: String
"""Url with more information in all different available languages"""
alertUrlTranslations: [TranslatedString!]!
"""Alert effect"""
alertEffect: AlertEffectType
"""Alert cause"""
alertCause: AlertCauseType
"""Alert severity level"""
alertSeverityLevel: AlertSeverityLevelType
"""
Time when this alert comes into effect. Format: Unix timestamp in seconds
"""
effectiveStartDate: Long
"""
Time when this alert is not in effect anymore. Format: Unix timestamp in seconds
"""
effectiveEndDate: Long
"""
Entities affected by the disruption.
"""
entities: [AlertEntity]
}
"""Cause of a alert"""
enum AlertCauseType {
"""UNKNOWN_CAUSE"""
UNKNOWN_CAUSE
"""OTHER_CAUSE"""
OTHER_CAUSE
"""TECHNICAL_PROBLEM"""
TECHNICAL_PROBLEM
"""STRIKE"""
STRIKE
"""DEMONSTRATION"""
DEMONSTRATION
"""ACCIDENT"""
ACCIDENT
"""HOLIDAY"""
HOLIDAY
"""WEATHER"""
WEATHER
"""MAINTENANCE"""
MAINTENANCE
"""CONSTRUCTION"""
CONSTRUCTION
"""POLICE_ACTIVITY"""
POLICE_ACTIVITY
"""MEDICAL_EMERGENCY"""
MEDICAL_EMERGENCY
}
"""Effect of a alert"""
enum AlertEffectType {
"""NO_SERVICE"""
NO_SERVICE
"""REDUCED_SERVICE"""
REDUCED_SERVICE
"""SIGNIFICANT_DELAYS"""
SIGNIFICANT_DELAYS
"""DETOUR"""
DETOUR
"""ADDITIONAL_SERVICE"""
ADDITIONAL_SERVICE
"""MODIFIED_SERVICE"""
MODIFIED_SERVICE
"""OTHER_EFFECT"""
OTHER_EFFECT
"""UNKNOWN_EFFECT"""
UNKNOWN_EFFECT
"""STOP_MOVED"""
STOP_MOVED
"""NO_EFFECT"""
NO_EFFECT
"""ACCESSIBILITY_ISSUE"""
ACCESSIBILITY_ISSUE
}
"""Entity related to an alert"""
union AlertEntity = Agency | Route | Pattern | Stop | Trip | StopOnRoute | StopOnTrip | RouteType | Unknown
"""Severity level of a alert"""
enum AlertSeverityLevelType {
"""Severity of alert is unknown"""
UNKNOWN_SEVERITY
"""
Info alerts are used for informational messages that should not have a
significant effect on user's journey, for example: A single entrance to a
metro station is temporarily closed.
"""
INFO
"""
Warning alerts are used when a single stop or route has a disruption that can
affect user's journey, for example: All trams on a specific route are running
with irregular schedules.
"""
WARNING
"""
Severe alerts are used when a significant part of public transport services is
affected, for example: All train services are cancelled due to technical problems.
"""
SEVERE
}
"""
Preferences related to alighting from a transit vehicle.
"""
input AlightPreferencesInput {
"""
What is the required minimum time alighting from a vehicle.
"""
slack: Duration
}
type OpeningHours {
"""
OSM-formatted string of the opening hours.
The spec is available at: https://wiki.openstreetmap.org/wiki/Key:opening_hours
"""
osm: String
"""
Opening hours for the selected dates using the local time of the parking lot.
Each date can have multiple time spans.
Note: This is not implemented yet and always returns null.
"""
dates(
"""
Opening hours will be returned for these dates. Dates should use YYYYMMDD format.
"""
dates: [String!]!
): [LocalTimeSpanDate]
}
"""Bike park represents a location where bicycles can be parked."""
type BikePark implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the bike park"""
bikeParkId: String
"""Name of the bike park"""
name(
"""Returns name with the specified language, if found, otherwise returns with some default language."""
language: String): String!
"""Number of spaces available for bikes"""
spacesAvailable: Int
"""
If true, value of `spacesAvailable` is updated from a real-time source.
"""
realtime: Boolean
"""Longitude of the bike park (WGS 84)"""
lon: Float
"""Latitude of the bike park (WGS 84)"""
lat: Float
"""
Source specific tags of the bike park, which describe the available features.
"""
tags: [String]
"""Opening hours of the parking facility"""
openingHours: OpeningHours
}
"""
Is it possible to arrive to the destination with a rented bicycle and does it
come with an extra cost.
"""
input DestinationBicyclePolicyInput {
"""
For networks that require station drop-off, should the routing engine offer results that go directly to the destination without dropping off the rental bicycle first.
"""
allowKeeping: Boolean
"""
Cost associated with arriving to the destination with a rented bicycle.
No cost is applied if arriving to the destination after dropping off the rented
bicycle.
"""
keepingCost: Cost
}
"""
Is it possible to arrive to the destination with a rented scooter and does it
come with an extra cost.
"""
input DestinationScooterPolicyInput {
"""
For networks that require station drop-off, should the routing engine offer results that go directly to the destination without dropping off the rental scooter first.
"""
allowKeeping: Boolean
"""
Cost associated with arriving to the destination with a rented scooter.
No cost is applied if arriving to the destination after dropping off the rented
scooter.
"""
keepingCost: Cost
}
"""Vehicle parking represents a location where bicycles or cars can be parked."""
type VehicleParking implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the park"""
vehicleParkingId: String
"""Name of the park"""
name(
"""Returns name with the specified language, if found, otherwise returns with some default language."""
language: String): String!
"""
If true, value of `spacesAvailable` is updated from a real-time source.
"""
realtime: Boolean
"""Longitude of the bike park (WGS 84)"""
lon: Float
"""Latitude of the bike park (WGS 84)"""
lat: Float
"""
URL which contains details of this vehicle parking.
"""
detailsUrl: String
"""
URL of an image which may be displayed to the user showing the vehicle parking.
"""
imageUrl: String
"""
Source specific tags of the vehicle parking, which describe the available features. For example
park_and_ride, bike_lockers, or static_osm_data.
"""
tags: [String]
"""
A short translatable note containing details of this vehicle parking.
"""
note(
"""Returns note with the specified language, if found, otherwise returns with some default language."""
language: String): String
"""
The state of this vehicle parking.
Only ones in an OPERATIONAL state may be used for Park and Ride.
"""
state: VehicleParkingState
"""
Does this vehicle parking have spaces (capacity) for bicycles.
"""
bicyclePlaces: Boolean
"""
Does this vehicle parking have spaces (capacity) for either wheelchair accessible (disabled)
or normal cars.
"""
anyCarPlaces: Boolean
"""
Does this vehicle parking have spaces (capacity) for cars excluding wheelchair accessible spaces.
Use anyCarPlaces to check if any type of car may use this vehicle parking.
"""
carPlaces: Boolean
"""
Does this vehicle parking have wheelchair accessible (disabled) car spaces (capacity).
"""
wheelchairAccessibleCarPlaces: Boolean
"""
The capacity (maximum available spaces) of this vehicle parking.
"""
capacity: VehicleParkingSpaces
"""
The currently available spaces at this vehicle parking.
"""
availability: VehicleParkingSpaces
"""Opening hours of the parking facility"""
openingHours: OpeningHours
}
"""
The state of the vehicle parking. TEMPORARILY_CLOSED and CLOSED are distinct states so that they
may be represented differently to the user.
"""
enum VehicleParkingState {
"""May be used for park and ride."""
OPERATIONAL
"""Can't be used for park and ride."""
TEMPORARILY_CLOSED
"""Can't be used for park and ride."""
CLOSED
}
"""
The number of spaces by type. null if unknown.
"""
type VehicleParkingSpaces {
"""
The number of bicycle spaces.
"""
bicycleSpaces: Int
"""
The number of car spaces.
"""
carSpaces: Int
"""
The number of wheelchair accessible (disabled) car spaces.
"""
wheelchairAccessibleCarSpaces: Int
}
"""
Bike rental station represents a location where users can rent bicycles for a fee.
"""
type BikeRentalStation implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the bike rental station"""
stationId: String
"""Name of the bike rental station"""
name: String!
"""
Number of bikes currently available on the rental station.
See field `allowPickupNow` to know if is currently possible to pick up a bike.
"""
bikesAvailable: Int
"""
Number of free spaces currently available on the rental station.
Note that this value being 0 does not necessarily indicate that bikes cannot be returned
to this station, as for example it might be possible to leave the bike in the vicinity of
the rental station, even if the bike racks don't have any spaces available.
See field `allowDropoffNow` to know if is currently possible to return a bike.
"""
spacesAvailable: Int
"""
A description of the current state of this bike rental station, e.g. "Station on"
"""
state: String @deprecated(reason: "Use operative instead")
"""
If true, values of `bikesAvailable` and `spacesAvailable` are updated from a
real-time source. If false, values of `bikesAvailable` and `spacesAvailable`
are always the total capacity divided by two.
"""
realtime: Boolean
"""
If true, bikes can be returned to this station if the station has spaces available
or allows overloading.
"""
allowDropoff: Boolean
"""
If true, bikes can be picked up from this station if the station has bikes available.
"""
allowPickup: Boolean
"""If true, bikes can be currently returned to this station."""
allowDropoffNow: Boolean
"""If true, bikes can be currently picked up from this station."""
allowPickupNow: Boolean
networks: [String]
"""Longitude of the bike rental station (WGS 84)"""
lon: Float
"""Latitude of the bike rental station (WGS 84)"""
lat: Float
"""Nominal capacity (number of racks) of the rental station."""
capacity: Int
"""If true, bikes can be returned even if spacesAvailable is zero or bikes > capacity."""
allowOverloading: Boolean
"""Platform-specific URLs to begin renting a bike from this station."""
rentalUris: BikeRentalStationUris
"""
If true, station is on and in service.
"""
operative: Boolean
}
"""
Vehicle rental station represents a location where users can rent bicycles etc. for a fee.
"""
type VehicleRentalStation implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the vehicle in the format of network:id"""
stationId: String
"""Name of the vehicle rental station"""
name: String!
"""
Number of vehicles currently available on the rental station.
See field `allowPickupNow` to know if is currently possible to pick up a vehicle.
"""
vehiclesAvailable: Int @deprecated(reason: "Use `availableVehicles` instead, which also contains vehicle types")
"""
Number of free spaces currently available on the rental station.
Note that this value being 0 does not necessarily indicate that vehicles cannot be returned
to this station, as for example it might be possible to leave the vehicle in the vicinity of
the rental station, even if the vehicle racks don't have any spaces available.
See field `allowDropoffNow` to know if is currently possible to return a vehicle.
"""
spacesAvailable: Int @deprecated(reason: "Use `availableSpaces` instead, which also contains the space vehicle types")
"""
Number of vehicles currently available on the rental station, grouped by vehicle type.
"""
availableVehicles: RentalVehicleEntityCounts
"""
Number of free spaces currently available on the rental station, grouped by vehicle type.
"""
availableSpaces: RentalVehicleEntityCounts
"""
If true, values of `vehiclesAvailable` and `spacesAvailable` are updated from a
real-time source. If false, values of `vehiclesAvailable` and `spacesAvailable`
are always the total capacity divided by two.
"""
realtime: Boolean
"""
If true, vehicles can be returned to this station if the station has spaces available
or allows overloading.
"""
allowDropoff: Boolean
"""
If true, vehicles can be picked up from this station if the station has vehicles available.
"""
allowPickup: Boolean
"""If true, vehicles can be currently returned to this station."""
allowDropoffNow: Boolean
"""If true, vehicles can be currently picked up from this station."""
allowPickupNow: Boolean
"""ID of the rental network."""
network: String
"""Longitude of the vehicle rental station (WGS 84)"""
lon: Float
"""Latitude of the vehicle rental station (WGS 84)"""
lat: Float
"""Nominal capacity (number of racks) of the rental station."""
capacity: Int
"""If true, vehicles can be returned even if spacesAvailable is zero or vehicles > capacity."""
allowOverloading: Boolean
"""Platform-specific URLs to begin renting a vehicle from this station."""
rentalUris: VehicleRentalUris
"""
If true, station is on and in service.
"""
operative: Boolean
}
type RentalVehicleEntityCounts {
"""The total number of entities (e.g. vehicles, spaces)."""
total: Int!
"""The number of entities by type"""
byType: [RentalVehicleTypeCount!]!
}
type RentalVehicleTypeCount {
"""The type of the rental vehicle (scooter, bicycle, car...)"""
vehicleType: RentalVehicleType!
"""The number of vehicles of this type"""
count: Int!
}
"""
Rental vehicle represents a vehicle that belongs to a rental network.
"""
type RentalVehicle implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the vehicle in the format of network:id"""
vehicleId: String
"""Name of the vehicle"""
name: String!
"""If true, vehicle is currently available for renting."""
allowPickupNow: Boolean
"""ID of the rental network."""
network: String
"""Longitude of the vehicle (WGS 84)"""
lon: Float
"""Latitude of the vehicle (WGS 84)"""
lat: Float
"""Platform-specific URLs to begin the vehicle."""
rentalUris: VehicleRentalUris
"""
If true, vehicle is not disabled.
"""
operative: Boolean
"""The type of the rental vehicle (scooter, bicycle, car...)"""
vehicleType: RentalVehicleType
}
type BikeRentalStationUris {
"""
A URI that can be passed to an Android app with an {@code android.intent.action.VIEW} Android
intent to support Android Deep Links.
May be null if a rental URI does not exist.
"""
android: String
"""
A URI that can be used on iOS to launch the rental app for this station.
May be {@code null} if a rental URI does not exist.
"""
ios: String
"""
A URL that can be used by a web browser to show more information about renting a vehicle at
this station.
May be {@code null} if a rental URL does not exist.
"""
web: String
}
type VehicleRentalUris {
"""
A URI that can be passed to an Android app with an {@code android.intent.action.VIEW} Android
intent to support Android Deep Links.
May be null if a rental URI does not exist.
"""
android: String
"""
A URI that can be used on iOS to launch the rental app for this rental network.
May be {@code null} if a rental URI does not exist.
"""
ios: String
"""
A URL that can be used by a web browser to show more information about renting a vehicle.
May be {@code null} if a rental URL does not exist.
"""
web: String
}
type RentalVehicleType {
"""The vehicle's general form factor"""
formFactor: FormFactor
"""The primary propulsion type of the vehicle"""
propulsionType: PropulsionType
}
enum FormFactor {
"""A bicycle"""
BICYCLE
"""A bicycle with additional space for cargo"""
CARGO_BICYCLE
"""An automobile"""
CAR
"""A moped that the rider sits on. For a disambiguation see https://github.com/NABSA/gbfs/pull/370#issuecomment-982631989"""
MOPED
"""A kick scooter that the rider either sits or stands on. Will be deprecated in GBFS v3.0."""
SCOOTER
"""A kick scooter that the rider stands on"""
SCOOTER_STANDING
"""A kick scooter with a seat"""
SCOOTER_SEATED
"""A vehicle that doesn't fit into any other category"""
OTHER
}
enum PropulsionType {
"""Pedal or foot propulsion"""
HUMAN
"""Provides electric motor assist only in combination with human propulsion - no throttle mode"""
ELECTRIC_ASSIST
"""Powered by battery-powered electric motor with throttle mode"""
ELECTRIC
"""Powered by gasoline combustion engine"""
COMBUSTION
"""Powered by diesel combustion engine"""
COMBUSTION_DIESEL
"""Powered by combined combustion engine and battery-powered motor"""
HYBRID
"""Powered by combined combustion engine and battery-powered motor with plug-in charging"""
PLUG_IN_HYBRID
"""Powered by hydrogen fuel cell powered electric motor"""
HYDROGEN_FUEL_CELL
}
enum BikesAllowed {
"""There is no bike information for the trip."""
NO_INFORMATION
"""
The vehicle being used on this particular trip can accommodate at least one bicycle.
"""
ALLOWED
"""No bicycles are allowed on this trip."""
NOT_ALLOWED
}
"""
Preferences related to travel with a bicycle.
"""
input BicyclePreferencesInput {
"""
A multiplier for how bad cycling is compared to being in transit for equal lengths of time.
"""
reluctance: Reluctance
"""
Walking preferences when walking a bicycle.
"""
walk: BicycleWalkPreferencesInput
"""
Maximum speed on flat ground while riding a bicycle. Note, this speed is higher than
the average speed will be in itineraries as this is the maximum speed but there are
factors that slow down cycling such as crossings, intersections and elevation changes.
"""
speed: Speed
"""
What criteria should be used when optimizing a cycling route.
"""
optimization: CyclingOptimizationInput
"""
Cost of boarding a vehicle with a bicycle.
"""
boardCost: Cost
"""
Bicycle rental related preferences.
"""
rental: BicycleRentalPreferencesInput
"""
Bicycle parking related preferences.
"""
parking: BicycleParkingPreferencesInput
}
"""
Preferences related to boarding a transit vehicle. Note, board costs for each street mode
can be found under the street mode preferences.
"""
input BoardPreferencesInput {
"""
A multiplier for how bad waiting at a stop is compared to being in transit for equal lengths of time.
"""
waitReluctance: Reluctance
"""
What is the required minimum waiting time at a stop. Setting this value as `PT0S`, for example, can lead
to passenger missing a connection when the vehicle leaves ahead of time or the passenger arrives to the
stop later than expected.
"""
slack: Duration
}
"""Car park represents a location where cars can be parked."""
type CarPark implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the car park"""
carParkId: String
"""Name of the car park"""
name(
"""Returns name with the specified language, if found, otherwise returns with some default language."""
language: String): String!
"""Number of parking spaces at the car park"""
maxCapacity: Int
"""Number of currently available parking spaces at the car park"""
spacesAvailable: Int
"""
If true, value of `spacesAvailable` is updated from a real-time source.
"""
realtime: Boolean
"""Longitude of the car park (WGS 84)"""
lon: Float
"""Latitude of the car park (WGS 84)"""
lat: Float
"""
Source specific tags of the car park, which describe the available features.
"""
tags: [String]
"""
Opening hours for the selected dates using the local time of the park.
Each date can have multiple time spans.
"""
openingHours: OpeningHours
}
"""
Preferences related to traveling on a car (excluding car travel on transit services such as taxi).
"""
input CarPreferencesInput {
"""
A multiplier for how bad travelling on car is compared to being in transit for equal lengths of time.
"""
reluctance: Reluctance
"""
Car rental related preferences.
"""
rental: CarRentalPreferencesInput
"""
Car parking related preferences.
"""
parking: CarParkingPreferencesInput
}
"""Cluster is a list of stops grouped by name and proximity"""
type Cluster implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the cluster"""
gtfsId: String!
"""Name of the cluster"""
name: String!
"""
Latitude of the center of this cluster (i.e. average latitude of stops in this cluster)
"""
lat: Float!
"""
Longitude of the center of this cluster (i.e. average longitude of stops in this cluster)
"""
lon: Float!
"""List of stops in the cluster"""
stops: [Stop!]
}
"""
A static cost that is applied to a certain event or entity. Cost is a positive integer,
for example `450`. One cost unit should roughly match a one second travel on transit.
"""
scalar Cost
"""
Coordinate (often referred as coordinates), which is used to specify a location using in the
WGS84 coordinate system.
"""
type Coordinate {
"""
Latitude as a WGS84 format number.
"""
latitude: CoordinateValue!
"""
Longitude as a WGS84 format number.
"""
longitude: CoordinateValue!
}
"""
Either a latitude or a longitude as a WGS84 format floating point number.
"""
scalar CoordinateValue @specifiedBy(url: "https://earth-info.nga.mil/?dir=wgs84&action=wgs84")
type Coordinates {
"""Latitude (WGS 84)"""
lat: Float
"""Longitude (WGS 84)"""
lon: Float
}
"""
Plan date time options. Only one of the values should be defined.
"""
input PlanDateTimeInput @oneOf {
"""
Earliest departure date time. The returned itineraries should not
depart before this instant unless one is using paging to find earlier
itineraries. Note, it is not currently possible to define both
`earliestDeparture` and `latestArrival`.
"""
earliestDeparture: OffsetDateTime
"""
Latest arrival time date time. The returned itineraries should not
arrive to the destination after this instant unless one is using
paging to find later itineraries. Note, it is not currently possible
to define both `earliestDeparture` and `latestArrival`.
"""
latestArrival: OffsetDateTime
}
type debugOutput {
totalTime: Long
pathCalculationTime: Long
precalculationTime: Long
renderingTime: Long
timedOut: Boolean
}
"""
Departure row is a combination of a pattern and a stop of that pattern.
They are de-duplicated so for each pattern there will only be a single departure row.
This is useful if you want to show a list of stop/pattern combinations but want each pattern to be
listed only once.
"""
type DepartureRow implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""Stop from which the departures leave"""
stop: Stop
"""Latitude of the stop (WGS 84)"""
lat: Float
"""Longitude of the stop (WGS 84)"""
lon: Float
"""Pattern of the departure row"""
pattern: Pattern
"""Departures of the pattern from the stop"""
stoptimes(
"""
Return rows departing after this time. Time format: Unix timestamp in seconds. Default: current time.
"""
startTime: Long = 0
"""How many seconds ahead to search for departures. Default is one day."""
timeRange: Int = 86400
"""Maximum number of departures to return."""
numberOfDepartures: Int = 1
"""If true, only those departures which allow boarding are returned"""
omitNonPickups: Boolean = false
"""If false, returns also canceled trips"""
omitCanceled: Boolean = true
): [Stoptime]
}
type elevationProfileComponent {
"""The distance from the start of the step, in meters."""
distance: Float
"""The elevation at this distance, in meters."""
elevation: Float
}
type Emissions {
"""
CO emissions in grams.
"""
co2: Grams
}
"""
This type is only here for backwards-compatibility and this API will never return it anymore.
Please use the leg's `fareProducts` instead.
"""
type fare {
type: String @deprecated
"""ISO 4217 currency code"""
currency: String @deprecated
"""
Fare price in cents. **Note:** this value is dependent on the currency used,
as one cent is not necessarily ¹/ of the basic monerary unit.
"""
cents: Int @deprecated
"""Components which this fare is composed of"""
components: [fareComponent] @deprecated
}
"""
This type is only here for backwards-compatibility and this API will never return it anymore.
Please use the leg's `fareProducts` instead.
"""
type fareComponent {
"""ID of the ticket type. Corresponds to `fareId` in **TicketType**."""
fareId: String @deprecated
"""ISO 4217 currency code"""
currency: String @deprecated
"""
Fare price in cents. **Note:** this value is dependent on the currency used,
as one cent is not necessarily ¹/ of the basic monerary unit.
"""
cents: Int @deprecated
"""List of routes which use this fare component"""
routes: [Route] @deprecated
}
"""
A feed provides routing data (stops, routes, timetables, etc.) from one or more public transport agencies.
"""
type Feed {
"""ID of the feed"""
feedId: String!
"""List of agencies which provide data to this feed"""
agencies: [Agency]
"""Name of feed publisher"""
publisherName: String!
"""Web address of feed publisher"""
publisherUrl: String!
"""
Alerts relevant for the feed.
"""
alerts(
"""
Returns alerts for these types that are relevant for the feed.
"""
types: [FeedAlertType!]
): [Alert]
}
"""Entities, which are relevant for a feed and can contain alerts"""
enum FeedAlertType {
"""Alerts affecting the feed's agencies"""
AGENCIES
"""
Alerts affecting the route types across the feed.
There might be alerts that only affect route types within an agency of the feed,
and those can be fetched through the Agency.
"""
ROUTE_TYPES
}
enum FilterPlaceType {
"""
Stops.
NOTE: if this is selected at the same time as `STATION`, stops that have a parent station will not be returned but their parent stations will be returned instead.
"""
STOP
"""Departure rows"""
DEPARTURE_ROW
"""Old value for VEHICLE_RENT"""
BICYCLE_RENT @deprecated(reason: "Use VEHICLE_RENT instead as it's clearer that it also returns rental scooters, cars...")
"""Vehicle (bicycles, scooters, cars ...) rental stations and vehicles"""
VEHICLE_RENT
"""Parking lots (not rental stations) that contain spaces for bicycles"""
BIKE_PARK
"""Parking lots that contain spaces for cars"""
CAR_PARK
"""
Stations.
NOTE: if this is selected at the same time as `STOP`, stops that have a parent station will not be returned but their parent stations will be returned instead.
"""
STATION
}
type Geometry {
"""The number of points in the string"""
length: Int
"""
List of coordinates of in a Google encoded polyline format (see
https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
"""
points: Polyline
}
scalar GeoJson @specifiedBy(url: "https://www.rfcreader.com/#rfc7946")
scalar Grams
type StopGeometries {
"""Representation of the stop geometries as GeoJSON (https://geojson.org/)"""
geoJson: GeoJson,
"""
Representation of a stop as a series of polylines.
Polygons of flex stops are represented as linear rings (lines where the first and last point are the same).
Proper stops are represented as single point "lines".
"""
googleEncoded: [Geometry]
}
"""
A coordinate used for a location in a plan query.
"""
input PlanCoordinateInput {
"""
Latitude as a WGS84 format number.
"""
latitude: CoordinateValue!
"""
Longitude as a WGS84 format number.
"""
longitude: CoordinateValue!
}
input InputBanned {
"""A comma-separated list of banned route ids"""
routes: String
"""A comma-separated list of banned agency ids"""
agencies: String
"""A comma-separated list of banned trip ids"""
trips: String
"""
A comma-separated list of banned stop ids. Note that these stops are only
banned for boarding and disembarking vehicles it is possible to get an
itinerary where a vehicle stops at one of these stops
"""
stops: String
"""
A comma-separated list of banned stop ids. Only itineraries where these stops
are not travelled through are returned, e.g. if a bus route stops at one of
these stops, that route will not be used in the itinerary, even if the stop is
not used for boarding or disembarking the vehicle.
"""
stopsHard: String
}
input InputCoordinates {
"""Latitude of the place (WGS 84)"""
lat: Float!
"""Longitude of the place (WGS 84)"""
lon: Float!
"""
The name of the place. If specified, the place name in results uses this value instead of `"Origin"` or `"Destination"`
"""
address: String
"""
The amount of time, in seconds, to spend at this location before venturing forth.
"""
locationSlack: Int
}
input InputFilters {
"""Stops to include by GTFS id."""
stops: [String]
"""Stations to include by GTFS id."""
stations: [String]
"""Routes to include by GTFS id."""
routes: [String]
"""Bike rentals to include by id (without network identifier)."""
bikeRentalStations: [String]
"""Bike parks to include by id."""
bikeParks: [String]
"""Car parks to include by id."""
carParks: [String]
}
input InputModeWeight {
"""
The weight of TRAM traverse mode. Values over 1 add cost to tram travel and values under 1 decrease cost
"""
TRAM: Float
"""
The weight of SUBWAY traverse mode. Values over 1 add cost to subway travel and values under 1 decrease cost
"""
SUBWAY: Float
"""
The weight of RAIL traverse mode. Values over 1 add cost to rail travel and values under 1 decrease cost
"""
RAIL: Float
"""
The weight of BUS traverse mode. Values over 1 add cost to bus travel and values under 1 decrease cost
"""
BUS: Float
"""
The weight of FERRY traverse mode. Values over 1 add cost to ferry travel and values under 1 decrease cost
"""
FERRY: Float
"""
The weight of CABLE_CAR traverse mode. Values over 1 add cost to cable car travel and values under 1 decrease cost
"""
CABLE_CAR: Float
"""
The weight of GONDOLA traverse mode. Values over 1 add cost to gondola travel and values under 1 decrease cost
"""
GONDOLA: Float
"""
The weight of FUNICULAR traverse mode. Values over 1 add cost to funicular travel and values under 1 decrease cost
"""
FUNICULAR: Float
"""
The weight of AIRPLANE traverse mode. Values over 1 add cost to airplane travel and values under 1 decrease cost
"""
AIRPLANE: Float
}
input InputPreferred {
"""A comma-separated list of ids of the routes preferred by the user."""
routes: String
"""A comma-separated list of ids of the agencies preferred by the user."""
agencies: String
"""
Penalty added for using every route that is not preferred if user set any
route as preferred. We return number of seconds that we are willing to wait
for preferred route.
"""
otherThanPreferredRoutesPenalty: Int
}
"""
Locale in the format defined in [RFC5646](https://datatracker.ietf.org/doc/html/rfc5646). For example, `en` or `en-US`.
"""
scalar Locale @specifiedBy(url: "https://www.rfcreader.com/#rfc5646")
"""
Preferences for car parking facilities used during the routing.
"""
input CarParkingPreferencesInput {
"""
Selection filters to include or exclude parking facilities.
An empty list will include all facilities in the routing search.
"""
filters: [ParkingFilter!]
"""
If `preferred` is non-empty, using a parking facility that doesn't contain
at least one of the preferred conditions, will receive this extra cost and therefore avoided if
preferred options are available.
"""
unpreferredCost: Cost
"""
If non-empty every parking facility that doesn't match this set of conditions will
receive an extra cost (defined by `unpreferredCost`) and therefore avoided.
"""
preferred: [ParkingFilter!]
}
"""
Preferences for bicycle parking facilities used during the routing.
"""
input BicycleParkingPreferencesInput {
"""
Selection filters to include or exclude parking facilities.
An empty list will include all facilities in the routing search.
"""
filters: [ParkingFilter!]
"""
If `preferred` is non-empty, using a parking facility that doesn't contain
at least one of the preferred conditions, will receive this extra cost and therefore avoided if
preferred options are available.
"""
unpreferredCost: Cost
"""
If non-empty every parking facility that doesn't match this set of conditions will
receive an extra cost (defined by `unpreferredCost`) and therefore avoided.
"""
preferred: [ParkingFilter!]
}
"""
Preferences for parking facilities used during the routing.
"""
input VehicleParkingInput {
"""
Selection filters to include or exclude parking facilities.
An empty list will include all facilities in the routing search.
"""
filters: [ParkingFilter]
"""
If `preferred` is non-empty, using a parking facility that doesn't contain
at least one of the preferred conditions, will receive this extra cost and therefore avoided if
preferred options are available.
"""
unpreferredCost: Int
"""
If non-empty every parking facility that doesn't match this set of conditions will
receive an extra cost (defined by `unpreferredCost`) and therefore avoided.
"""
preferred: [ParkingFilter]
}
input ParkingFilterOperation {
"""Filter parking facilities based on their tag"""
tags: [String]
}
"""
The filter definition to include or exclude parking facilities used during routing.
Logically, the filter algorithm work as follows:
- The starting point is the set of all facilities, lets call it `A`.
- Then all `select` filters are applied to `A`, potentially reducing the number of facilities used.
Let's call the result of this `B`.
An empty `select` will lead to `A` being equal to `B`.
- Lastly, the `not` filters are applied to `B`, reducing the set further.
Lets call this final set `C`.
An empty `not` will lead to `B` being equal to `C`.
- The remaining parking facilities in `C` are used for routing.
"""
input ParkingFilter {
"""
Exclude parking facilities based on their properties.
If empty nothing is excluded from the initial set of facilities but may be filtered down
further by the `select` filter.
"""
not: [ParkingFilterOperation!]
"""
Include parking facilities based on their properties.
If empty everything is included from the initial set of facilities but may be filtered down
further by the `not` filter.
"""
select: [ParkingFilterOperation!]
}
"""
Settings that control the behavior of itinerary filtering. **These are advanced settings and
should not be set by a user through user preferences.**
"""
input PlanItineraryFilterInput {
"""
Itinerary filter debug profile used to control the behaviour of itinerary filters.
"""
itineraryFilterDebugProfile: ItineraryFilterDebugProfile = OFF
"""
Pick one itinerary from each group after putting itineraries that are `85%` similar together,
if the given value is `0.85`, for example. Itineraries are grouped together based on relative
the distance of transit travel that is identical between the itineraries (access, egress and
transfers are ignored). The value must be at least `0.5`.
"""
groupSimilarityKeepOne: Ratio = 0.85
"""
Pick three itineraries from each group after putting itineraries that are `68%` similar together,
if the given value is `0.68`, for example. Itineraries are grouped together based on relative
the distance of transit travel that is identical between the itineraries (access, egress and
transfers are ignored). The value must be at least `0.5`.
"""
groupSimilarityKeepThree: Ratio = 0.68
"""
Of the itineraries grouped to maximum of three itineraries, how much worse can the non-grouped
legs be compared to the lowest cost. `2.0` means that they can be double the cost, and any
itineraries having a higher cost will be filtered away. Use a value lower than `1.0` to turn the
grouping off.
"""
groupedOtherThanSameLegsMaxCostMultiplier: Float = 2.0
}
"""
Plan location settings. Location must be set. Label is optional
and used for naming the location.
"""
input PlanLabeledLocationInput {
"""
A location that has to be used in an itinerary.
"""
location: PlanLocationInput!
"""
A label that can be attached to the location. This label is then returned with the location
in the itineraries.
"""
label: String
}
"""
Plan location. Either a coordinate or a stop location should be defined.
"""
input PlanLocationInput @oneOf {
"""
Coordinate of the location. Note, either a coordinate or a stop location should be defined.
"""
coordinate: PlanCoordinateInput
"""
Stop, station, a group of stop places or multimodal stop place that should be used as
a location for the search. The trip doesn't have to use the given stop location for a
transit connection as it's possible to start walking to another stop from the given
location. If a station or a group of stop places is provided, a stop that makes the most
sense for the journey is picked as the location within the station or group of stop places.
"""
stopLocation: PlanStopLocationInput
}
"""
Wrapper type for different types of preferences related to plan query.
"""
input PlanPreferencesInput {
"""
Street routing preferences used for ingress, egress and transfers. These do not directly affect
the transit legs but can change how preferable walking or cycling, for example, is compared to
transit.
"""
street: PlanStreetPreferencesInput
"""
Transit routing preferences used for transit legs.
"""
transit: TransitPreferencesInput
"""
Accessibility preferences that affect both the street and transit routing.
"""
accessibility: AccessibilityPreferencesInput
}
"""
Stop, station, a group of stop places or multimodal stop place that should be used as
a location for the search. The trip doesn't have to use the given stop location for a
transit connection as it's possible to start walking to another stop from the given
location. If a station or a group of stop places is provided, a stop that makes the most
sense for the journey is picked as the location within the station or group of stop places.
"""
input PlanStopLocationInput {
"""
ID of the stop, station, a group of stop places or multimodal stop place. Format
should be `FeedId:StopLocationId`.
"""
stopLocationId: String!
}
"""
Mode selections for the plan search.
"""
input PlanModesInput {
"""
Should only the direct search without any transit be done.
"""
directOnly: Boolean = false
"""
Should only the transit search be done and never suggest itineraries that don't
contain any transit legs.
"""
transitOnly: Boolean = false
"""
Street mode that is used when searching for itineraries that don't use any transit.
If more than one mode is selected, at least one of them must be used but not necessarily all.
There are modes that automatically also use walking such as the rental modes. To force rental
to be used, this should only include the rental mode and not `WALK` in addition.
The default access mode is `WALK`.
"""
direct: [PlanDirectMode!]
"""
Modes for different phases of an itinerary when transit is included. Also
includes street mode selections related to connecting to the transit network
and transfers. By default, all transit modes are usable and `WALK` is used for
access, egress and transfers.
"""
transit: PlanTransitModesInput
}
"""
Modes for different phases of an itinerary when transit is included. Also includes street
mode selections related to connecting to the transit network and transfers.
"""
input PlanTransitModesInput {
"""
Street mode that is used when searching for access to the transit network from origin.
If more than one mode is selected, at least one of them must be used but not necessarily all.
There are modes that automatically also use walking such as the rental modes. To force rental
to be used, this should only include the rental mode and not `WALK` in addition.
The default access mode is `WALK`.
"""
access: [PlanAccessMode!]
"""
Street mode that is used when searching for egress to destination from the transit network.
If more than one mode is selected, at least one of them must be used but not necessarily all.
There are modes that automatically also use walking such as the rental modes. To force rental
to be used, this should only include the rental mode and not `WALK` in addition.
The default access mode is `WALK`.
"""
egress: [PlanEgressMode!]
"""
Street mode that is used when searching for transfers. Selection of only one allowed for now.
The default transfer mode is `WALK`.
"""
transfer: [PlanTransferMode!]
"""
Transit modes and reluctances associated with them. Each defined mode can be used in
an itinerary but doesn't have to be. If direct search is not disabled, there can be an
itinerary without any transit legs. By default, all transit modes are usable.
"""
transit: [PlanTransitModePreferenceInput!]
}
"""
Street routing preferences used for ingress, egress and transfers. These do not directly affect
the transit legs but can change how preferable walking or cycling, for example, is compared to
transit.
"""
input PlanStreetPreferencesInput {
"""
Cycling related preferences.
"""
bicycle: BicyclePreferencesInput
"""
Scooter (kick or electrical) related preferences.
"""
scooter: ScooterPreferencesInput
"""
Car related preferences. These are not used for car travel as part of transit, such as
taxi travel.
"""
car: CarPreferencesInput
"""
Walk related preferences. These are not used when walking a bicycle or a scooter as they
have their own preferences.
"""
walk: WalkPreferencesInput
}
"""
Relative importances of optimization factors. Only effective for bicycling legs.
Invariant: `timeFactor + slopeFactor + safetyFactor == 1`
"""
input InputTriangle {
"""Relative importance of safety"""
safetyFactor: Float
"""Relative importance of flat terrain"""
slopeFactor: Float
"""Relative importance of duration"""
timeFactor: Float
}
"""
Relative importance of optimization factors. Only effective for bicycling legs.
Invariant: `safety + flatness + time == 1`
"""
input TriangleCyclingFactorsInput {
"""
Relative importance of cycling safety, but this factor can also include other
concerns such as convenience and general cyclist preferences by taking into account
road surface etc.
"""
safety: Ratio!
"""Relative importance of flat terrain"""
flatness: Ratio!
"""Relative importance of duration"""
time: Ratio!
}
"""
Relative importance of optimization factors. Only effective for scooter legs.
Invariant: `safety + flatness + time == 1`
"""
input TriangleScooterFactorsInput {
"""
Relative importance of scooter safety, but this factor can also include other
concerns such as convenience and general scooter preferences by taking into account
road surface etc.
"""
safety: Ratio!
"""Relative importance of flat terrain"""
flatness: Ratio!
"""Relative importance of duration"""
time: Ratio!
}
input InputUnpreferred {
"""A comma-separated list of ids of the routes unpreferred by the user."""
routes: String
"""A comma-separated list of ids of the agencies unpreferred by the user."""
agencies: String
"""
An cost function used to calculate penalty for an unpreferred route/agency. Function should return
number of seconds that we are willing to wait for unpreferred route/agency.
String must be of the format:
`A + B x`, where A is fixed penalty and B is a multiplier of transit leg travel time x.
For example: `600 + 2.0 x`
"""
unpreferredCost: String
"""
Penalty added for using route that is unpreferred, i.e. number of seconds that we are willing to
wait for route that is unpreferred.
Deprecated: Use `unpreferredCost` instead.
"""
useUnpreferredRoutesPenalty: Int @deprecated(reason: "Use unpreferredCost instead")
}
enum RoutingErrorCode {
"""
No transit connection was found between the origin and destination within the operating day or
the next day, not even sub-optimal ones.
"""
NO_TRANSIT_CONNECTION
"""
A transit connection was found, but it was outside the search window. See the metadata for a token
for retrieving the result outside the search window.
"""
NO_TRANSIT_CONNECTION_IN_SEARCH_WINDOW
"""
The date specified is outside the range of data currently loaded into the system as it is too
far into the future or the past.
The specific date range of the system is configurable by an administrator and also depends on
the input data provided.
"""
OUTSIDE_SERVICE_PERIOD
"""
The coordinates are outside the geographic bounds of the transit and street data currently loaded
into the system and therefore cannot return any results.
"""
OUTSIDE_BOUNDS
"""
The specified location is not close to any streets or transit stops currently loaded into the
system, even though it is generally within its bounds.
This can happen when there is only transit but no street data coverage at the location in
question.
"""
LOCATION_NOT_FOUND
"""
No stops are reachable from the start or end locations specified.
You can try searching using a different access or egress mode, for example cycling instead of walking,
increase the walking/cycling/driving speed or have an administrator change the system's configuration
so that stops further away are considered.
"""
NO_STOPS_IN_RANGE
"""
Transit connections were requested and found but because it is easier to just walk all the way
to the destination they were removed.
If you want to still show the transit results, you need to make walking less desirable by
increasing the walk reluctance.
"""
WALKING_BETTER_THAN_TRANSIT
}
enum InputField {
DATE_TIME
FROM
TO
}
"""Description of the reason, why the planner did not return any results"""
type RoutingError {
"""An enum describing the reason"""
code: RoutingErrorCode!
"""An enum describing the field which should be changed, in order for the search to succeed"""
inputField: InputField
"""A textual description of why the search failed. The clients are expected to have their own translations based on the code, for user visible error messages."""
description: String!
}
"Category of riders a fare product applies to, for example students or pensioners."
type RiderCategory {
"ID of the category"
id: String!
"Human readable name of the category."
name: String
}
"""
A 'medium' that a fare product applies to, for example cash, 'Oyster Card' or 'DB Navigator App'.
"""
type FareMedium {
"ID of the medium"
id: String!
"Human readable name of the medium."
name: String
}
"A container for both a fare product (a ticket) and its relationship to the itinerary."
type FareProductUse {
"""
Represents the use of a single instance of a fare product throughout the itinerary. It can
be used to cross-reference and de-duplicate fare products that are applicable for more than one
leg.
If you want to uniquely identify the fare product itself (not its use) use the product's `id`.
### Example: Day pass
The day pass is valid for both legs in the itinerary. It is listed as the applicable `product` for each leg,
and the same FareProductUse id is shown, indicating that only one pass was used/bought.
**Illustration**
```yaml
itinerary:
leg1:
fareProducts:
id: "AAA" // id of a FareProductUse instance
product:
id: "day-pass" // product id
name: "Day Pass"
leg2:
fareProducts:
id: "AAA" // identical to leg1. the passenger needs to buy ONE pass, not two.
product:
id: "day-pass" // product id
name: "Day Pass"
```
**It is the responsibility of the API consumers to display the day pass as a product for the
entire itinerary rather than two day passes!**
### Example: Several single tickets
If you have two legs and need to buy two single tickets they will appear in each leg with the
same `FareProduct.id` but different `FareProductUse.id`.
**Illustration**
```yaml
itinerary:
leg1:
fareProducts:
id: "AAA" // id of a FareProductUse instance, not product id
product:
id: "single-ticket" // product id
name: "Single Ticket"
leg2:
fareProducts:
id: "BBB" // different to leg1. the passenger needs to buy two single tickets.
product:
id: "single-ticket" // product id
name: "Single Ticket"
```
"""
id: String!
"The purchasable fare product"
product: FareProduct
}
"A fare product (a ticket) to be bought by a passenger"
interface FareProduct {
"Identifier for the fare product."
id: String!
"""
Human readable name of the product, for example example "Day pass" or "Single ticket".
"""
name: String!
"The category of riders this product applies to, for example students or pensioners."
riderCategory: RiderCategory
"""
The 'medium' that this product applies to, for example "Oyster Card" or "Berlin Ticket App".
This communicates to riders that a specific way of buying or keeping this product is required.
"""
medium: FareMedium
}
"""
The standard case of a fare product: it only has a single price to be paid by the passenger
and no discounts are applied.
"""
type DefaultFareProduct implements FareProduct {
"Identifier for the fare product."
id: String!
"""
Human readable name of the product, for example example "Day pass" or "Single ticket".
"""
name: String!
"The price of the product"
price: Money!
"The category of riders this product applies to, for example students or pensioners."
riderCategory: RiderCategory
"""
The 'medium' that this product applies to, for example "Oyster Card" or "Berlin Ticket App".
This communicates to riders that a specific way of buying or keeping this product is required.
"""
medium: FareMedium
}
type Itinerary {
"Time when the user leaves from the origin."
start: OffsetDateTime
"Time when the user leaves arrives at the destination."
end: OffsetDateTime
"""Duration of the trip on this itinerary, in seconds."""
duration: Long
"""Generalized cost of the itinerary. Used for debugging search results."""
generalizedCost: Int
"""How much time is spent waiting for transit to arrive, in seconds."""
waitingTime: Long
"""How much time is spent walking, in seconds."""
walkTime: Long
"""How far the user has to walk, in meters."""
walkDistance: Float
"""Emissions of this itinerary per traveler."""
emissionsPerPerson: Emissions
"""
A list of Legs. Each Leg is either a walking (cycling, car) portion of the
itinerary, or a transit leg on a particular vehicle. So a itinerary where the
user walks to the Q train, transfers to the 6, then walks to their
destination, has four legs.
"""
legs: [Leg]!
"""
How much elevation is gained, in total, over the course of the itinerary, in meters.
"""
elevationGained: Float
"""
How much elevation is lost, in total, over the course of the itinerary, in meters.
"""
elevationLost: Float
"""
Does the itinerary end without dropping off the rented bicycle:
"""
arrivedAtDestinationWithRentedBicycle: Boolean
"""
A list of system notices. Contains debug information for itineraries.
One use-case is to run a routing search with 'debugItineraryFilter: true'.
This will then tag itineraries instead of removing them from the result.
This make it possible to inspect the itinerary-filter-chain.
"""
systemNotices: [SystemNotice]!
"""
Computes a numeric accessibility score between 0 and 1.
The closer the value is to 1 the better the wheelchair-accessibility of this itinerary is.
A value of `null` means that no score has been computed, not that the leg is inaccessible.
More information is available in the [feature documentation](https://docs.opentripplanner.org/en/dev-2.x/sandbox/IBIAccessibilityScore/).
"""
accessibilityScore: Float
"""
How many transfers are part of this itinerary.
Notes:
- Interlined/stay-seated transfers do not increase this count.
- Transferring from a flex to a fixed schedule trip and vice versa increases this count.
"""
numberOfTransfers: Int!
#
# deprecated fields
#
"""
Information about the fares for this itinerary. This is primarily a GTFS Fares V1 interface
and always returns an empty list. Use the leg's `fareProducts` instead.
"""
fares: [fare] @deprecated(reason: "Use the leg's `fareProducts`.")
"""
Time when the user leaves from the origin. Format: Unix timestamp in milliseconds.
"""
startTime: Long @deprecated(reason: "Use `start` instead which includes timezone information.")
"""
Time when the user arrives to the destination. Format: Unix timestamp in milliseconds.
"""
endTime: Long @deprecated(reason: "Use `end` instead which includes timezone information.")
}
"A currency"
type Currency {
"ISO-4217 currency code, for example `USD` or `EUR`."
code: String!
"""
Fractional digits of this currency. A value of 2 would express that in this currency
100 minor units make up one major unit.
Expressed more concretely: 100 Euro-cents make up one Euro.
Note: Some currencies don't even have any fractional digits, for example the Japanese Yen.
See also https://en.wikipedia.org/wiki/ISO_4217#Minor_unit_fractions
"""
digits: Int!
}
"An amount of money."
type Money {
"The currency of this money amount."
currency: Currency!
"""
Money in the major currency unit, so 3.10 USD is represented as `3.1`.
If you want to get the minor currency unit (310 cents), multiply with
(10 to the power of `currency.digits`).
"""
amount: Float!
}
"""
An ISO-8601-formatted duration, i.e. `PT2H30M` for 2 hours and 30 minutes.
Negative durations are formatted like `-PT10M`.
"""
scalar Duration @specifiedBy(url:"https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/Duration.html#parse(java.lang.CharSequence)")
type RideHailingProvider {
"The ID of the ride hailing provider."
id: String!
}
"An estimate for a ride on a hailed vehicle, like an Uber car."
type RideHailingEstimate {
"The provider of the ride hailing service."
provider: RideHailingProvider!
"The lower bound of the price estimate of this ride."
minPrice: Money!
"The upper bound of the price estimate of this ride."
maxPrice: Money!
"The estimated time it takes for the vehicle to arrive."
arrival: Duration!
"The name of the ride, ie. UberX"
productName: String
}
"""
An ISO-8601-formatted datetime with offset, i.e. `2023-06-13T14:30+03:00` for 2:30pm on June 13th 2023 at Helsinki's offset from UTC at that time.
ISO-8601 allows many different formats but OTP will only return the profile specified in RFC3339.
"""
scalar OffsetDateTime @specifiedBy(url: "https://www.rfcreader.com/#rfc3339")
"Real-time estimates for a vehicle at a certain place."
type RealTimeEstimate {
time: OffsetDateTime!
"""
The delay or "earliness" of the vehicle at a certain place.
If the vehicle is early then this is a negative duration.
"""
delay: Duration!
}
"""
Time information about a passenger at a certain place. May contain real-time information if
available.
"""
type LegTime {
"The scheduled time of the event."
scheduledTime: OffsetDateTime!
"The estimated time of the event. If no real-time information is available, this is null."
estimated: RealTimeEstimate
}
type Leg {
"""
The time when the leg starts including real-time information, if available.
"""
start: LegTime!
"""
The time when the leg ends including real-time information, if available.
"""
end: LegTime!
"""The mode (e.g. `WALK`) used when traversing this leg."""
mode: Mode
"""The leg's duration in seconds"""
duration: Float
"""Generalized cost of the leg. Used for debugging search results."""
generalizedCost: Int
"""The leg's geometry."""
legGeometry: Geometry
"""
For transit legs, the transit agency that operates the service used for this leg. For non-transit legs, `null`.
"""
agency: Agency
"""Whether there is real-time data about this Leg"""
realTime: Boolean
"""State of real-time data"""
realtimeState: RealtimeState
"""The distance traveled while traversing the leg in meters."""
distance: Float
"""Whether this leg is a transit leg or not."""
transitLeg: Boolean
"Whether this leg is walking with a bike."
walkingBike: Boolean
"""Whether this leg is traversed with a rented bike."""
rentedBike: Boolean
"""The Place where the leg originates."""
from: Place!
"""The Place where the leg ends."""
to: Place!
"""
For transit legs, the route that is used for traversing the leg. For non-transit legs, `null`.
"""
route: Route
"""
For transit legs, the trip that is used for traversing the leg. For non-transit legs, `null`.
"""
trip: Trip
"""
For transit legs, the service date of the trip. Format: YYYYMMDD. For non-transit legs, null.
"""
serviceDate: String
"""
For transit legs, intermediate stops between the Place where the leg
originates and the Place where the leg ends. For non-transit legs, null.
"""
intermediateStops: [Stop]
"""
For transit legs, intermediate stops between the Place where the leg
originates and the Place where the leg ends. For non-transit legs, null.
Returns Place type, which has fields for e.g. departure and arrival times
"""
intermediatePlaces: [Place]
"""
Whether the destination of this leg (field `to`) is one of the intermediate places specified in the query.
"""
intermediatePlace: Boolean
"The turn-by-turn navigation instructions."
steps: [step]
"""
For transit legs, the headsign that the vehicle shows at the stop where the passenger boards.
For non-transit legs, null.
"""
headsign: String
"""
This is used to indicate if boarding this leg is possible only with special arrangements.
"""
pickupType: PickupDropoffType
"""
This is used to indicate if alighting from this leg is possible only with special arrangements.
"""
dropoffType: PickupDropoffType
"""
Interlines with previous leg.
This is true when the same vehicle is used for the previous leg as for this leg
and passenger can stay inside the vehicle.
"""
interlineWithPreviousLeg: Boolean
"""
Special booking information for the drop off stop of this leg if, for example, it needs
to be booked in advance. This could be due to a flexible or on-demand service.
"""
dropOffBookingInfo: BookingInfo
"""
Special booking information for the pick up stop of this leg if, for example, it needs
to be booked in advance. This could be due to a flexible or on-demand service.
"""
pickupBookingInfo: BookingInfo
"""Applicable alerts for this leg."""
alerts: [Alert]
"""
Future legs with same origin and destination stops or stations
"""
nextLegs(
"""
The number of alternative legs searched. If fewer than the requested number are found,
then only the found legs are returned.
"""
numberOfLegs: Int!
"""
Transportation modes for which all stops in the parent station are used as possible origin stops
for the next legs. For modes not listed, only the exact origin stop of the leg is considered.
"""
originModesWithParentStation: [TransitMode!]
"""
Transportation modes for which all stops in the parent station are used as possible destination stops
for the next legs. For modes not listed, only the exact destination stop of the leg is considered.
"""
destinationModesWithParentStation: [TransitMode!]
): [Leg!]
"Estimate of a hailed ride like Uber."
rideHailingEstimate: RideHailingEstimate
"""
Computes a numeric accessibility score between 0 and 1.
The closer the value is to 1 the better the wheelchair-accessibility of this leg is.
A value of `null` means that no score has been computed, not that the itinerary is inaccessible.
More information is available in the [feature documentation](https://docs.opentripplanner.org/en/dev-2.x/sandbox/IBIAccessibilityScore/).
"""
accessibilityScore: Float
"""
Fare products are purchasable tickets which may have an optional fare container or rider
category that limits who can buy them or how.
Please read the documentation of `id` very carefully to learn how a single fare product
that applies to multiple legs can appear several times.
"""
fareProducts: [FareProductUse]
"""
The date and time when this leg begins. Format: Unix timestamp in milliseconds.
"""
startTime: Long @deprecated(reason: "Use `start.estimated.time` instead which contains timezone information.")
"""
The date and time when this leg ends. Format: Unix timestamp in milliseconds.
"""
endTime: Long @deprecated(reason: "Use `end.estimated.time` instead which contains timezone information.")
"""
For transit leg, the offset from the scheduled departure time of the boarding
stop in this leg, i.e. scheduled time of departure at boarding stop =
`startTime - departureDelay`
"""
departureDelay: Int @deprecated(reason: "Use `end.estimated.delay` instead.")
"""
For transit leg, the offset from the scheduled arrival time of the alighting
stop in this leg, i.e. scheduled time of arrival at alighting stop = `endTime
- arrivalDelay`
"""
arrivalDelay: Int @deprecated(reason: "Use `start.estimated.delay` instead.")
}
"""A span of time."""
type LocalTimeSpan {
"""The start of the time timespan as seconds from midnight."""
from: Int!
"""The end of the timespan as seconds from midnight."""
to: Int!
}
"""A date using the local timezone of the object that can contain timespans."""
type LocalTimeSpanDate {
"""The time spans for this date."""
timeSpans: [LocalTimeSpan]
"""The date of this time span. Format: YYYYMMDD."""
date: String!
}
"""Identifies whether this stop represents a stop or station."""
enum LocationType {
"""A location where passengers board or disembark from a transit vehicle."""
STOP
"""A physical structure or area that contains one or more stop."""
STATION
ENTRANCE
}
"""Long type"""
scalar Long
enum Mode {
"""AIRPLANE"""
AIRPLANE
"""BICYCLE"""
BICYCLE
"""BUS"""
BUS
"""CABLE_CAR"""
CABLE_CAR
"""CAR"""
CAR
"""COACH"""
COACH
"""FERRY"""
FERRY
"""Enables flexible transit for access and egress legs"""
FLEX
"""Enables flexible transit for access and egress legs"""
FLEXIBLE @deprecated(reason: "Use FLEX instead")
"""FUNICULAR"""
FUNICULAR
"""GONDOLA"""
GONDOLA
"""Only used internally. No use for API users."""
LEG_SWITCH @deprecated
"""RAIL"""
RAIL
"""SCOOTER"""
SCOOTER
"""SUBWAY"""
SUBWAY
"""TRAM"""
TRAM
"""Private car trips shared with others."""
CARPOOL
"""A taxi, possibly operated by a public transport agency."""
TAXI
"""A special transport mode, which includes all public transport."""
TRANSIT
"""WALK"""
WALK
"Electric buses that draw power from overhead wires using poles."
TROLLEYBUS
"Railway in which the track consists of a single rail or a beam."
MONORAIL
}
"""
Transit modes include modes that are used within organized transportation networks
run by public transportation authorities, taxi companies etc.
Equivalent to GTFS route_type or to NeTEx TransportMode.
"""
enum TransitMode {
AIRPLANE
BUS
CABLE_CAR
COACH
FERRY
FUNICULAR
GONDOLA
"""
This includes long or short distance trains.
"""
RAIL
"""
Subway or metro, depending on the local terminology.
"""
SUBWAY
TRAM
"""Private car trips shared with others."""
CARPOOL
"""A taxi, possibly operated by a public transport agency."""
TAXI
"Electric buses that draw power from overhead wires using poles."
TROLLEYBUS
"Railway in which the track consists of a single rail or a beam."
MONORAIL
}
"""An object with an ID"""
interface Node {
"""The ID of an object"""
id: ID!
}
"""Optimization type for bicycling legs"""
enum OptimizeType {
"""Prefer faster routes"""
QUICK
"""
Prefer safer routes, i.e. avoid crossing streets and use bike paths when possible
"""
SAFE
"""Prefer flat terrain"""
FLAT
"""GREENWAYS"""
GREENWAYS
"""
**TRIANGLE** optimization type can be used to set relative preferences of optimization factors. See argument `triangle`.
"""
TRIANGLE
}
"""Information about pagination in a connection."""
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
}
"""
Information about pagination in a connection. Part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
type PlanPageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
"""The search window that was used for the search in the current page."""
searchWindowUsed: Duration
}
"""
Street modes that can be used for access to the transit network from origin.
"""
enum PlanAccessMode {
"""
Cycling to a stop and boarding a vehicle with the bicycle.
Note, this can include walking when it's needed to walk the bicycle.
Access can use cycling only if the mode used for transfers
and egress is also `BICYCLE`.
"""
BICYCLE
"""
Bicycle rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, access will include only walking. Also, this
can include walking before picking up or after dropping off the
bicycle or when it's needed to walk the bicycle.
"""
BICYCLE_RENTAL
"""
Starting the itinerary with a bicycle and parking the bicycle to
a parking location. Note, this can include walking after parking
the bicycle or when it's needed to walk the bicycle.
"""
BICYCLE_PARKING
"""
Car rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, access will include only walking. Also, this
can include walking before picking up or after dropping off the
car.
"""
CAR_RENTAL
"""
Starting the itinerary with a car and parking the car to a parking location.
Note, this can include walking after parking the car.
"""
CAR_PARKING
"""
Getting dropped off by a car to a location that is accessible with a car.
Note, this can include walking after the drop-off.
"""
CAR_DROP_OFF
"""
Flexible transit. This can include different forms of flexible transit that
can be defined in GTFS-Flex or in Netex. Note, this can include walking before
or after the flexible transit leg.
"""
FLEX
"""
Scooter rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, access will include only walking. Also, this
can include walking before picking up or after dropping off the
scooter.
"""
SCOOTER_RENTAL
"""
Walking to a stop.
"""
WALK
}
"""
Street mode that is used when searching for itineraries that don't use any transit.
"""
enum PlanDirectMode {
"""
Cycling from the origin to the destination. Note, this can include walking
when it's needed to walk the bicycle.
"""
BICYCLE
"""
Bicycle rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, itinerary will include only walking.
Also, it can include walking before picking up or after dropping off the
bicycle or when it's needed to walk the bicycle.
"""
BICYCLE_RENTAL
"""
Starting the itinerary with a bicycle and parking the bicycle to
a parking location. Note, this can include walking after parking
the bicycle or when it's needed to walk the bicycle.
"""
BICYCLE_PARKING
"""
Driving a car from the origin to the destination.
"""
CAR
"""
Car rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, itinerary will include only walking. Also, this
can include walking before picking up or after dropping off the
car.
"""
CAR_RENTAL
"""
Starting the itinerary with a car and parking the car to a parking location.
Note, this can include walking after parking the car.
"""
CAR_PARKING
"""
Flexible transit. This can include different forms of flexible transit that
can be defined in GTFS-Flex or in Netex. Note, this can include walking before
or after the flexible transit leg.
"""
FLEX
"""
Scooter rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, itinerary will include only walking. Also, this
can include walking before picking up or after dropping off the
scooter.
"""
SCOOTER_RENTAL
"""
Walking from the origin to the destination. Note, this can include walking
when it's needed to walk the bicycle.
"""
WALK
}
"""
Street modes that can be used for egress from the transit network to destination.
"""
enum PlanEgressMode {
"""
Cycling from a stop to the destination. Note, this can include walking when
it's needed to walk the bicycle. Egress can use cycling only if the mode used
for access and transfers is also `BICYCLE`.
"""
BICYCLE
"""
Bicycle rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, egress will include only walking. Also, this
can include walking before picking up or after dropping off the
bicycle or when it's needed to walk the bicycle.
"""
BICYCLE_RENTAL
"""
Car rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, egress will include only walking. Also, this
can include walking before picking up or after dropping off the
car.
"""
CAR_RENTAL
"""
Getting picked up by a car from a location that is accessible with a car.
Note, this can include walking before the pickup.
"""
CAR_PICKUP
"""
Flexible transit. This can include different forms of flexible transit that
can be defined in GTFS-Flex or in Netex. Note, this can include walking before
or after the flexible transit leg.
"""
FLEX
"""
Scooter rental can use either station based systems or "floating"
vehicles which are not linked to a rental station. Note, if there are no
rental options available, egress will include only walking. Also, this
can include walking before picking up or after dropping off the
scooter.
"""
SCOOTER_RENTAL
"""
Walking from a stop to the destination.
"""
WALK
}
enum PlanTransferMode {
"""
Cycling between transit vehicles (typically between stops). Note, this can
include walking when it's needed to walk the bicycle. Transfers can only use
cycling if the mode used for access and egress is also `BICYCLE`.
"""
BICYCLE
"""
Walking between transit vehicles (typically between stops).
"""
WALK
}
"""Real-time vehicle position"""
type VehiclePosition {
"""Feed-scoped ID that uniquely identifies the vehicle in the format FeedId:VehicleId"""
vehicleId: String,
"""Human-readable label of the vehicle, eg. a publicly visible number or a license plate"""
label: String
"""Latitude of the vehicle"""
lat: Float
"""Longitude of the vehicle"""
lon: Float
"""The current stop where the vehicle will be or is currently arriving."""
stopRelationship: StopRelationship
"""Speed of the vehicle in meters/second"""
speed: Float
"""
Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East. This can be the
compass bearing, or the direction towards the next stop or intermediate location.
"""
heading: Float
"""When the position of the vehicle was recorded in seconds since the UNIX epoch."""
lastUpdated: Long
"""Which trip this vehicles runs on."""
trip: Trip!
}
"""Upcoming or current stop and how close the vehicle is to it."""
type StopRelationship {
"""How close the vehicle is to `stop`"""
status: VehicleStopStatus!
stop: Stop!
}
"""How close the vehicle is to the stop."""
enum VehicleStopStatus {
"""
The vehicle is standing at the stop.
"""
STOPPED_AT,
"""
The vehicle has departed the previous stop and is in transit.
"""
IN_TRANSIT_TO,
"""
The vehicle is just about to arrive at the stop (on a stop display, the vehicle symbol typically flashes).
"""
INCOMING_AT
}
"""
Pattern is sequence of stops used by trips on a specific direction and variant
of a route. Most routes have only two patterns: one for outbound trips and one
for inbound trips
"""
type Pattern implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""The route this pattern runs on"""
route: Route!
"""
Direction of the pattern. Possible values: 0, 1 or -1.
-1 indicates that the direction is irrelevant, i.e. the route has patterns only in one direction.
"""
directionId: Int
"""
Name of the pattern. Pattern name can be just the name of the route or it can
include details of destination and origin stops.
"""
name: String
"""ID of the pattern"""
code: String!
"""Vehicle headsign used by trips of this pattern"""
headsign: String
"""Trips which run on this pattern"""
trips: [Trip!]
"""Trips which run on this pattern on the specified date"""
tripsForDate(
"""Return trips of the pattern active on this date. Format: YYYYMMDD"""
serviceDate: String
): [Trip!]
"""List of stops served by this pattern"""
stops: [Stop!]
geometry: [Coordinates]
"""
Coordinates of the route of this pattern in Google polyline encoded format
"""
patternGeometry: Geometry
"""
Hash code of the pattern. This value is stable and not dependent on the
pattern id, i.e. this value can be used to check whether two patterns are the
same, even if their ids have changed.
"""
semanticHash: String
"""
By default, list of alerts which have directly an effect on just the pattern.
It's also possible to return other relevant alerts through defining types.
"""
alerts(
"""
Returns alerts for these types that are relevant for the pattern.
By default, list of alerts which have directly an effect on just the pattern.
"""
types: [PatternAlertType]
): [Alert]
"""
Real-time updated position of vehicles that are serving this pattern.
"""
vehiclePositions: [VehiclePosition!]
"""Original Trip pattern for changed patterns"""
originalTripPattern: Pattern
}
"""Entities, which are relevant for a pattern and can contain alerts"""
enum PatternAlertType {
"""Alerts affecting the pattern"""
PATTERN
"""Alerts affecting the pattern's route's agency"""
AGENCY
"""Alerts affecting the route that the pattern runs on"""
ROUTE
"""Alerts affecting the route type of the route that the pattern runs on"""
ROUTE_TYPE
"""Alerts affecting the trips which run on this pattern"""
TRIPS
"""Alerts affecting the stops which are on this pattern"""
STOPS_ON_PATTERN
"""Alerts affecting the stops of the trips which run on this pattern"""
STOPS_ON_TRIPS
}
enum PickupDropoffType {
"""Regularly scheduled pickup / drop off."""
SCHEDULED
"""No pickup / drop off available."""
NONE
"""Must phone agency to arrange pickup / drop off."""
CALL_AGENCY
"""Must coordinate with driver to arrange pickup / drop off."""
COORDINATE_WITH_DRIVER
}
"Contact information for booking an on-demand or flexible service."
type ContactInfo {
"Name of the person to contact"
contactPerson: String
"Phone number to contact"
phoneNumber: String
"Email to contact"
eMail: String
"Fax number to contact"
faxNumber: String
"URL containing general information about the service"
infoUrl: String
"URL to the booking systems of the service"
bookingUrl: String
"Additional notes about the contacting the service provider"
additionalDetails: String
}
"Temporal restriction for a booking"
type BookingTime {
"Time of the booking"
time: String
"How many days before the booking"
daysPrior: Int
}
"""
Booking information for a stop time which has special requirements to use, like calling ahead or
using an app.
"""
type BookingInfo {
"Contact information for reaching the service provider"
contactInfo: ContactInfo
"When is the earliest time the service can be booked."
earliestBookingTime: BookingTime
"When is the latest time the service can be booked"
latestBookingTime: BookingTime
"Minimum number of seconds before travel to make the request"
minimumBookingNoticeSeconds: Long
"Maximum number of seconds before travel to make the request"
maximumBookingNoticeSeconds: Long
"A general message for those booking the service"
message: String
"A message specific to the pick up"
pickupMessage: String
"A message specific to the drop off"
dropOffMessage: String
}
"""
What criteria should be used when optimizing a cycling route.
"""
input CyclingOptimizationInput @oneOf {
"""
Use one of the predefined optimization types.
"""
type: CyclingOptimizationType
"""
Define optimization by weighing three criteria.
"""
triangle: TriangleCyclingFactorsInput
}
"""
Predefined optimization alternatives for bicycling routing. For more customization,
one can use the triangle factors.
"""
enum CyclingOptimizationType {
"""
Search for routes with the shortest duration while ignoring the cycling safety
of the streets (the routes should still follow local regulations). Routes can include
steep streets, if they are the fastest alternatives. This option was previously called
`QUICK`.
"""
SHORTEST_DURATION
"""
Emphasize flatness over safety or duration of the route. This option was previously called `FLAT`.
"""
FLAT_STREETS
"""
Emphasize cycling safety over flatness or duration of the route. Safety can also include other
concerns such as convenience and general cyclist preferences by taking into account
road surface etc. This option was previously called `SAFE`.
"""
SAFE_STREETS
"""
Completely ignore the elevation differences and prefer the streets, that are evaluated
to be the safest, even more than with the `SAFE_STREETS` option.
Safety can also include other concerns such as convenience and general cyclist preferences
by taking into account road surface etc. This option was previously called `GREENWAYS`.
"""
SAFEST_STREETS
}
"""
What criteria should be used when optimizing a scooter route.
"""
input ScooterOptimizationInput @oneOf {
"""
Use one of the predefined optimization types.
"""
type: ScooterOptimizationType
"""
Define optimization by weighing three criteria.
"""
triangle: TriangleScooterFactorsInput
}
"""
Predefined optimization alternatives for scooter routing. For more customization,
one can use the triangle factors.
"""
enum ScooterOptimizationType {
"""
Search for routes with the shortest duration while ignoring the scooter safety
of the streets. The routes should still follow local regulations, but currently scooters
are only allowed on the same streets as bicycles which might not be accurate for each country
or with different types of scooters. Routes can include steep streets, if they are
the fastest alternatives. This option was previously called `QUICK`.
"""
SHORTEST_DURATION
"""
Emphasize flatness over safety or duration of the route. This option was previously called `FLAT`.
"""
FLAT_STREETS
"""
Emphasize scooter safety over flatness or duration of the route. Safety can also include other
concerns such as convenience and general preferences by taking into account road surface etc.
Note, currently the same criteria is used both for cycling and scooter travel to determine how
safe streets are for cycling or scooter. This option was previously called `SAFE`.
"""
SAFE_STREETS
"""
Completely ignore the elevation differences and prefer the streets, that are evaluated
to be safest for scooters, even more than with the `SAFE_STREETS` option.
Safety can also include other concerns such as convenience and general preferences by taking
into account road surface etc. Note, currently the same criteria is used both for cycling and
scooter travel to determine how safe streets are for cycling or scooter.
This option was previously called `GREENWAYS`.
"""
SAFEST_STREETS
}
"""
Speed in meters per seconds. Values are positive floating point numbers (for example, 2.34).
"""
scalar Speed
"The board/alight position in between two stops of the pattern of a trip with continuous pickup/drop off."
type PositionBetweenStops {
"Position of the previous stop in the pattern. Positions are not required to start from 0 or be consecutive."
previousPosition: Int
"Position of the next stop in the pattern. Positions are not required to start from 0 or be consecutive."
nextPosition: Int
}
"Stop position at a specific stop."
type PositionAtStop {
"Position of the stop in the pattern. Positions are not required to start from 0 or be consecutive."
position: Int
}
union StopPosition = PositionAtStop | PositionBetweenStops
type Place {
"""
For transit stops, the name of the stop. For points of interest, the name of the POI.
"""
name: String
"""
Type of vertex. (Normal, Bike sharing station, Bike P+R, Transit stop) Mostly
used for better localization of bike sharing and P+R station names
"""
vertexType: VertexType
"""Latitude of the place (WGS 84)"""
lat: Float!
"""Longitude of the place (WGS 84)"""
lon: Float!
"""
The time the rider will arrive at the place. This also includes real-time information
if available.
"""
arrival: LegTime
"""
The time the rider will depart the place. This also includes real-time information
if available.
"""
departure: LegTime
"""The stop related to the place."""
stop: Stop
"""
The position of the stop in the pattern. This is not required to start from 0 or be consecutive - any
increasing integer sequence along the stops is valid.
The purpose of this field is to identify the stop within the pattern so it can be cross-referenced
between it and the itinerary. It is safe to cross-reference when done quickly, i.e. within seconds.
However, it should be noted that real-time updates can change the values, so don't store it for
longer amounts of time.
Depending on the source data, this might not be the GTFS `stop_sequence` but another value, perhaps
even generated.
The position can be either at a certain stop or in between two for trips where this is possible.
"""
stopPosition: StopPosition
"""The vehicle rental station related to the place"""
vehicleRentalStation: VehicleRentalStation
"""The rental vehicle related to the place"""
rentalVehicle: RentalVehicle
"""The vehicle parking related to the place"""
vehicleParking: VehicleParking
"""The bike rental station related to the place"""
bikeRentalStation: BikeRentalStation @deprecated(reason: "Use vehicleRentalStation and rentalVehicle instead")
"""The bike parking related to the place"""
bikePark: BikePark @deprecated(reason: "bikePark is deprecated. Use vehicleParking instead.")
"""The car parking related to the place"""
carPark: CarPark @deprecated(reason: "carPark is deprecated. Use vehicleParking instead.")
"""
The time the rider will arrive at the place. Format: Unix timestamp in milliseconds.
"""
arrivalTime: Long! @deprecated(reason: "Use `arrival` which includes timezone information.")
"""
The time the rider will depart the place. Format: Unix timestamp in milliseconds.
"""
departureTime: Long! @deprecated(reason: "Use `departure` which includes timezone information.")
}
type placeAtDistance implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
place: PlaceInterface
"""Walking distance to the place along streets and paths"""
distance: Int
}
"""A connection to a list of items."""
type placeAtDistanceConnection {
edges: [placeAtDistanceEdge]
pageInfo: PageInfo!
}
"""An edge in a connection."""
type placeAtDistanceEdge {
"""The item at the end of the edge"""
node: placeAtDistance
cursor: String!
}
"""Interface for places, e.g. stops, stations, parking areas.."""
interface PlaceInterface {
id: ID!
"""Latitude of the place (WGS 84)"""
lat: Float
"""Longitude of the place (WGS 84)"""
lon: Float
}
type Plan {
"""The time and date of travel. Format: Unix timestamp in milliseconds."""
date: Long
"""The origin"""
from: Place!
"""The destination"""
to: Place!
"""A list of possible itineraries"""
itineraries: [Itinerary]!
"""A list of possible error messages as enum"""
messageEnums: [String]!
"""A list of possible error messages in cleartext"""
messageStrings: [String]!
"""A list of routing errors, and fields which caused them"""
routingErrors: [RoutingError!]!
"""
Use the cursor to go to the next "page" of itineraries. Copy the cursor from the last response
to the pageCursor query parameter and keep the original request as is. This will enable you to
search for itineraries in the next search-window.
The cursor based paging only support stepping to the next page, as it does not support jumping.
This is only usable when public transportation mode(s) are included in the query.
"""
nextPageCursor: String
"""
Use the cursor to go to the previous "page" of itineraries. Copy the cursor from the last
response to the pageCursor query parameter and keep the original request otherwise as is.
This will enable you to search for itineraries in the previous search-window.
The cursor based paging only support stepping to the previous page, as it does not support
jumping.
This is only usable when public transportation mode(s) are included in the query.
"""
previousPageCursor: String
"""
This is the suggested search time for the "previous page" or time window. Insert it together
with the searchWindowUsed in the request to get a new set of trips preceding in the
search-window BEFORE the current search. No duplicate trips should be returned, unless a trip
is delayed and new real-time data is available.
"""
prevDateTime: Long @deprecated(reason: "Use previousPageCursor instead")
"""
This is the suggested search time for the "next page" or time window. Insert it together
with the searchWindowUsed in the request to get a new set of trips following in the
search-window AFTER the current search. No duplicate trips should be returned, unless a trip
is delayed and new real-time data is available.
"""
nextDateTime: Long @deprecated(reason: "Use nextPageCursor instead")
"""
This is the `searchWindow` used by the raptor search. It is provided here for debugging
purpousess.
The unit is seconds.
"""
searchWindowUsed: Long
"""Information about the timings for the plan generation"""
debugOutput: debugOutput!
}
"""
Plan (result of an itinerary search) that follows
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
type PlanConnection {
"""
What was the starting point for the itinerary search.
"""
searchDateTime: OffsetDateTime
"""
Errors faced during the routing search.
"""
routingErrors: [RoutingError!]!
"""
Edges which contain the itineraries. Part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
edges: [PlanEdge]
"""
Contains cursors to continue the search and the information if there are more itineraries available.
Part of the [GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
pageInfo: PlanPageInfo!
}
"""
Edge outputted by a plan search. Part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
type PlanEdge {
"""
An itinerary suggestion. Part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
node: Itinerary!
"""
The cursor of the edge. Part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
cursor: String!
}
"""
List of coordinates in an encoded polyline format (see
https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
The value appears in JSON as a string.
"""
scalar Polyline @specifiedBy(url: "https://developers.google.com/maps/documentation/utilities/polylinealgorithm")
"""
Additional qualifier for a transport mode.
Note that qualifiers can only be used with certain transport modes.
"""
enum Qualifier {
"""The vehicle used for transport can be rented"""
RENT
"""
~~HAVE~~
**Currently not used**
"""
HAVE @deprecated(reason: "Currently not used")
"""
The vehicle used must be left to a parking area before continuing the journey.
This qualifier is usable with transport modes `CAR` and `BICYCLE`.
Note that the vehicle is only parked if the journey is continued with public
transportation (e.g. if only `CAR` and `WALK` transport modes are allowed to
be used, the car will not be parked as it is used for the whole journey).
"""
PARK
"""
~~KEEP~~
**Currently not used**
"""
KEEP @deprecated(reason: "Currently not used")
"""The user can be picked up by someone else riding a vehicle"""
PICKUP
"""The user can be dropped off by someone else riding a vehicle"""
DROPOFF
"""The mode is used for the access part of the search."""
ACCESS,
"""The mode is used for the egress part of the search."""
EGRESS,
"""The mode is used for the direct street search."""
DIRECT,
"""Hailing a ride, for example via an app like Uber."""
HAIL
}
type QueryType {
"""Fetches an object given its ID"""
node(
"""The ID of an object"""
id: ID!
): Node
"""Get all available feeds"""
feeds: [Feed]
"""Get all agencies"""
agencies: [Agency]
"""Return list of available ticket types"""
ticketTypes: [TicketType]
"""
Get a single agency based on agency ID, i.e. value of field `gtfsId` (ID format is `FeedId:StopId`)
"""
agency(id: String!): Agency
"""Get all stops"""
stops(
"""Return stops with these ids"""
ids: [String]
"""Query stops by this name"""
name: String
): [Stop]
"""Get all stops within the specified bounding box"""
stopsByBbox(
"""Southern bound of the bounding box"""
minLat: Float!
"""Western bound of the bounding box"""
minLon: Float!
"""Northern bound of the bounding box"""
maxLat: Float!
"""Eastern bound of the bounding box"""
maxLon: Float!
"""List of feed ids from which stops are returned"""
feeds: [String!]
): [Stop]
"""
Get all stops within the specified radius from a location. The returned type
is a Relay connection (see
https://facebook.github.io/relay/graphql/connections.htm). The stopAtDistance
type has two values: stop and distance.
"""
stopsByRadius(
"""Latitude of the location (WGS 84)"""
lat: Float!
"""Longitude of the location (WGS 84)"""
lon: Float!
"""
Radius (in meters) to search for from the specified location. Note that this
is walking distance along streets and paths rather than a geographic distance.
"""
radius: Int!
"""List of feed ids from which stops are returned"""
feeds: [String!]
before: String
after: String
first: Int
last: Int
): stopAtDistanceConnection
"""
Get all places (stops, stations, etc. with coordinates) within the specified
radius from a location. The returned type is a Relay connection (see
https://facebook.github.io/relay/graphql/connections.htm). The placeAtDistance
type has two fields: place and distance. The search is done by walking so the
distance is according to the network of walkable streets and paths.
"""
nearest(
"""Latitude of the location (WGS 84)"""
lat: Float!
"""Longitude of the location (WGS 84)"""
lon: Float!
"""
Maximum distance (in meters) to search for from the specified location. Note
that this is walking distance along streets and paths rather than a
geographic distance. Default is 2000m
"""
maxDistance: Int = 2000
"""
Maximum number of results. Search is stopped when this limit is reached. Default is 20.
"""
maxResults: Int = 20
"""
Only return places that are one of these types, e.g. `STOP` or `VEHICLE_RENT`
"""
filterByPlaceTypes: [FilterPlaceType]
"""
Only return places that are related to one of these transport modes. This
argument can be used to return e.g. only nearest railway stations or only
nearest places related to bicycling.
"""
filterByModes: [Mode]
"""Only include places that match one of the given GTFS ids."""
filterByIds: InputFilters @deprecated(reason: "Not actively maintained")
before: String
after: String
first: Int
last: Int
): placeAtDistanceConnection @async
"""
Get a single departure row based on its ID (ID format is `FeedId:StopId:PatternId`)
"""
departureRow(id: String!): DepartureRow
"""
Get a single stop based on its ID, i.e. value of field `gtfsId` (ID format is `FeedId:StopId`)
"""
stop(id: String!): Stop
"""
Get a single station based on its ID, i.e. value of field `gtfsId` (format is `FeedId:StopId`)
"""
station(id: String!): Stop
"""Get all stations"""
stations(
"""Only return stations that match one of the ids in this list"""
ids: [String]
"""Query stations by name"""
name: String
): [Stop]
"""Get all routes"""
routes(
"""Only return routes with these ids"""
ids: [String]
"""Only return routes with these feedIds"""
feeds: [String]
"""Query routes by this name"""
name: String
"""Only include routes, which use one of these modes"""
transportModes: [Mode]
): [Route]
"""
Get a single route based on its ID, i.e. value of field `gtfsId` (format is `FeedId:RouteId`)
"""
route(id: String!): Route
"""Get all trips"""
trips(
"""Only return trips with these feedIds"""
feeds: [String]
): [Trip]
"""
Get a single trip based on its ID, i.e. value of field `gtfsId` (format is `FeedId:TripId`)
"""
trip(id: String!): Trip
"""
Finds a trip matching the given parameters. This query type is useful if the
id of a trip is not known, but other details uniquely identifying the trip are
available from some source (e.g. MQTT vehicle positions).
"""
fuzzyTrip(
"""id of the route"""
route: String!
"""
Direction of the trip, possible values: 0, 1 or -1.
-1 indicates that the direction is irrelevant, i.e. in case the route has
trips only in one direction. See field `directionId` of Pattern.
"""
direction: Int = -1
"""Departure date of the trip, format: YYYY-MM-DD"""
date: String!
"""
Departure time of the trip, format: seconds since midnight of the departure date
"""
time: Int!
): Trip
"""Get cancelled TripTimes."""
cancelledTripTimes(
"""Feed feedIds (e.g. ["HSL"])."""
feeds: [String]
"""Route gtfsIds (e.g. ["HSL:1098"])."""
routes: [String]
"""TripPattern codes (e.g. ["HSL:1098:1:01"])."""
patterns: [String]
"""Trip gtfsIds (e.g. ["HSL:1098_20190405_Ma_2_1455"])."""
trips: [String]
"""
Only cancelled trip times scheduled to run on minDate or after are returned. Format: "2019-12-23" or "20191223".
"""
minDate: String
"""
Only cancelled trip times scheduled to run on maxDate or before are returned. Format: "2019-12-23" or "20191223".
"""
maxDate: String
"""
Only cancelled trip times that have first stop departure time at
minDepartureTime or after are returned. Format: seconds since midnight of minDate.
"""
minDepartureTime: Int
"""
Only cancelled trip times that have first stop departure time at
maxDepartureTime or before are returned. Format: seconds since midnight of maxDate.
"""
maxDepartureTime: Int
"""
Only cancelled trip times that have last stop arrival time at minArrivalTime
or after are returned. Format: seconds since midnight of minDate.
"""
minArrivalTime: Int
"""
Only cancelled trip times that have last stop arrival time at maxArrivalTime
or before are returned. Format: seconds since midnight of maxDate.
"""
maxArrivalTime: Int
): [Stoptime]
"""Get all patterns"""
patterns: [Pattern]
"""
Get a single pattern based on its ID, i.e. value of field `code` (format is
`FeedId:RouteId:DirectionId:PatternVariantNumber`)
"""
pattern(id: String!): Pattern
"""Get all clusters"""
clusters: [Cluster]
"""Get a single cluster based on its ID, i.e. value of field `gtfsId`"""
cluster(id: String!): Cluster
"""Get all active alerts"""
alerts(
"""Only return alerts in these feeds"""
feeds: [String!]
"""Only return alerts with these severity levels"""
severityLevel: [AlertSeverityLevelType!]
"""Only return alerts with these effects"""
effect: [AlertEffectType!]
"""Only return alerts with these causes"""
cause: [AlertCauseType!]
"""Only return alerts affecting these routes"""
route: [String!]
"""Only return alerts affecting these stops"""
stop: [String!]
): [Alert]
"""Get the time range for which the API has data available"""
serviceTimeRange: serviceTimeRange
"""Get all bike rental stations"""
bikeRentalStations(
"""
Return bike rental stations with these ids.
**Note:** if an id is invalid (or the bike rental station service is unavailable)
the returned list will contain `null` values.
"""
ids: [String]
): [BikeRentalStation] @deprecated(reason: "Use rentalVehicles or vehicleRentalStations instead")
"""
Get a single bike rental station based on its ID, i.e. value of field `stationId`
"""
bikeRentalStation(id: String!): BikeRentalStation @deprecated(reason: "Use rentalVehicle or vehicleRentalStation instead")
"""Get all rental vehicles"""
rentalVehicles(
"""
Return rental vehicles with these ids, i.e. value of field `vehicleId`.
**Note:** if an id is invalid (or the rental service is unavailable)
the returned list will contain `null` values.
If this is provided all other filters are ignored.
"""
ids: [String],
"""
Return only rental vehicles that have this form factor.
"""
formFactors: [FormFactor]
): [RentalVehicle]
"""
Get a single rental vehicle based on its ID, i.e. value of field `vehicleId`
"""
rentalVehicle(id: String!): RentalVehicle
"""Get all vehicle rental stations"""
vehicleRentalStations(
"""
Return vehicle rental stations with these ids, i.e. value of field `stationId`.
**Note:** if an id is invalid (or the rental service is unavailable)
the returned list will contain `null` values.
"""
ids: [String]
): [VehicleRentalStation]
"""
Get a single vehicle rental station based on its ID, i.e. value of field `stationId`
"""
vehicleRentalStation(id: String!): VehicleRentalStation
## Deprecated fields
"""Get all bike parks"""
bikeParks: [BikePark] @deprecated(reason: "bikeParks is deprecated. Use vehicleParkings instead.")
"""
Get a single bike park based on its ID, i.e. value of field `bikeParkId`
"""
bikePark(id: String!): BikePark @deprecated(reason: "bikePark is deprecated. Use vehicleParking instead.")
"""Get all car parks"""
carParks(
"""
Return car parks with these ids.
**Note:** if an id is invalid (or the car park service is unavailable) the returned list will contain `null` values.
"""
ids: [String]
): [CarPark] @deprecated(reason: "carParks is deprecated. Use vehicleParkings instead.")
"""Get a single car park based on its ID, i.e. value of field `carParkId`"""
carPark(id: String!): CarPark @deprecated(reason: "carPark is deprecated. Use vehicleParking instead.")
"""Get all vehicle parkings"""
vehicleParkings(
"""
Return vehicle parkings with these ids.
**Note:** if an id is invalid (or the vehicle parking service is unavailable)
the returned list will contain `null` values.
"""
ids: [String]
): [VehicleParking]
"""
Get a single vehicle parking based on its ID
"""
vehicleParking(id: String!): VehicleParking
"""Needed until https://github.com/facebook/relay/issues/112 is resolved"""
viewer: QueryType
"""
Plans an itinerary from point A to point B based on the given arguments
"""
plan(
"""
Date of departure or arrival in format YYYY-MM-DD. Default value: current date
"""
date: String
"""
Time of departure or arrival in format hh:mm:ss. Default value: current time
"""
time: String
"""
The geographical location where the itinerary begins.
Use either this argument or `fromPlace`, but not both.
"""
from: InputCoordinates
"""
The geographical location where the itinerary ends.
Use either this argument or `toPlace`, but not both.
"""
to: InputCoordinates
"""
The place where the itinerary begins in format `name::place`, where `place`
is either a lat,lng pair (e.g. `Pasila::60.199041,24.932928`) or a stop id
(e.g. `Pasila::HSL:1000202`).
Use either this argument or `from`, but not both.
"""
fromPlace: String
"""
The place where the itinerary ends in format `name::place`, where `place` is
either a lat,lng pair (e.g. `Pasila::60.199041,24.932928`) or a stop id
(e.g. `Pasila::HSL:1000202`).
Use either this argument or `to`, but not both.
"""
toPlace: String
"""
Whether the itinerary must be wheelchair accessible. Default value: false
"""
wheelchair: Boolean
"""The maximum number of itineraries to return. Default value: 3."""
numItineraries: Int = 3
"""
The length of the search-window in seconds. This parameter is optional.
The search-window is defined as the duration between the earliest-departure-time(EDT) and
the latest-departure-time(LDT). OTP will search for all itineraries in this departure
window. If `arriveBy=true` the `dateTime` parameter is the latest-arrival-time, so OTP
will dynamically calculate the EDT. Using a short search-window is faster than using a
longer one, but the search duration is not linear. Using a \"too\" short search-window will
waste resources server side, while using a search-window that is too long will be slow.
OTP will dynamically calculate a reasonable value for the search-window, if not provided.
The calculation comes with a significant overhead (10-20% extra). Whether you should use the
dynamic calculated value or pass in a value depends on your use-case. For a travel planner
in a small geographical area, with a dense network of public transportation, a fixed value
between 40 minutes and 2 hours makes sense. To find the appropriate search-window, adjust
it so that the number of itineraries on average is around the wanted `numItineraries`. Make
sure you set the `numItineraries` to a high number while testing. For a country wide area
like Norway, using the dynamic search-window is the best.
When paginating, the search-window is calculated using the `numItineraries` in the original
search together with statistics from the search for the last page. This behaviour is
configured server side, and can not be overridden from the client.
The search-window used is returned to the response metadata as `searchWindowUsed` for
debugging purposes.
"""
searchWindow: Long,
"""
Use the cursor to get the next or previous page of results.
The next page is a set of itineraries departing after the last itinerary in this result and
the previous page is a set of itineraries departing before the first itinerary.
This is only usable when public transportation mode(s) are included in the query.
"""
pageCursor: String
"""
A multiplier for how bad biking is, compared to being in transit for equal
lengths of time. Default value: 2.0
"""
bikeReluctance: Float
"""
A multiplier for how bad walking with a bike is, compared to being in transit for equal
lengths of time. Default value: 5.0
"""
bikeWalkingReluctance: Float
"""
A multiplier for how bad driving is, compared to being in transit for equal
lengths of time. Default value: 3.0
"""
carReluctance: Float
"""
A multiplier for how bad walking is, compared to being in transit for equal
lengths of time. Empirically, values between 2 and 4 seem to correspond
well to the concept of not wanting to walk too much without asking for
totally ridiculous itineraries, but this observation should in no way be
taken as scientific or definitive. Your mileage may vary. See
https://github.com/opentripplanner/OpenTripPlanner/issues/4090 for impact on
performance with high values. Default value: 2.0
"""
walkReluctance: Float
"""
How much worse is waiting for a transit vehicle than being on a transit
vehicle, as a multiplier. The default value treats wait and on-vehicle time
as the same. It may be tempting to set this higher than walkReluctance (as
studies often find this kind of preferences among riders) but the planner
will take this literally and walk down a transit line to avoid waiting at a
stop. This used to be set less than 1 (0.95) which would make waiting
offboard preferable to waiting onboard in an interlined trip. That is also
undesirable. If we only tried the shortest possible transfer at each stop to
neighboring stop patterns, this problem could disappear. Default value: 1.0.
"""
waitReluctance: Float
"""
Max walk speed along streets, in meters per second. Default value: 1.33
"""
walkSpeed: Float
"""Max bike speed along streets, in meters per second. Default value: 5.0"""
bikeSpeed: Float
"""Time to get on and off your own bike, in seconds. Default value: 0"""
bikeSwitchTime: Int
"""
Cost of getting on and off your own bike. Unit: seconds. Default value: 0
"""
bikeSwitchCost: Int
"""
Optimization type for bicycling legs, e.g. prefer flat terrain. Default value: `QUICK`
"""
optimize: OptimizeType
"""
Triangle optimization parameters for bicycling legs. Only effective when `optimize` is set to **TRIANGLE**.
"""
triangle: InputTriangle
"""
Whether the itinerary should depart at the specified time (false), or arrive
to the destination at the specified time (true). Default value: false.
"""
arriveBy: Boolean
"""
List of routes and agencies which are given higher preference when planning the itinerary
"""
preferred: InputPreferred
"""
List of routes and agencies which are given lower preference when planning the itinerary
"""
unpreferred: InputUnpreferred
"""
This prevents unnecessary transfers by adding a cost for boarding a vehicle. Unit: seconds. Default value: 600
"""
walkBoardCost: Int
"""
Separate cost for boarding a vehicle with a bicycle, which is more difficult
than on foot. Unit: seconds. Default value: 600
"""
bikeBoardCost: Int
"""
List of routes, trips, agencies and stops which are not used in the itinerary
"""
banned: InputBanned
"""
An extra penalty added on transfers (i.e. all boardings except the first
one). Not to be confused with bikeBoardCost and walkBoardCost, which are the
cost of boarding a vehicle with and without a bicycle. The boardCosts are
used to model the 'usual' perceived cost of using a transit vehicle, and the
transferPenalty is used when a user requests even less transfers. In the
latter case, we don't actually optimize for fewest transfers, as this can
lead to absurd results. Consider a trip in New York from Grand Army Plaza
(the one in Brooklyn) to Kalustyan's at noon. The true lowest transfers
route is to wait until midnight, when the 4 train runs local the whole way.
The actual fastest route is the 2/3 to the 4/5 at Nevins to the 6 at Union
Square, which takes half an hour. Even someone optimizing for fewest
transfers doesn't want to wait until midnight. Maybe they would be willing
to walk to 7th Ave and take the Q to Union Square, then transfer to the 6.
If this takes less than optimize_transfer_penalty seconds, then that's what
we'll return. Default value: 0.
"""
transferPenalty: Int
"""
List of transportation modes that the user is willing to use. Default: `["WALK","TRANSIT"]`
"""
transportModes: [TransportMode]
"""
The weight multipliers for transit modes. WALK, BICYCLE, CAR, TRANSIT and LEG_SWITCH are not included.
"""
modeWeight: InputModeWeight
"""
Debug the itinerary-filter-chain. The filters will mark itineraries as deleted, but does NOT delete them when this is enabled.
"""
debugItineraryFilter: Boolean
"""
Whether arriving at the destination with a rented (station) bicycle is allowed without
dropping it off. Default: false.
"""
allowKeepingRentedBicycleAtDestination: Boolean
"""
The cost of arriving at the destination with the rented vehicle, to discourage doing so.
Default value: 0.
"""
keepingRentedBicycleAtDestinationCost: Int
"""
Invariant: `boardSlack + alightSlack <= transferSlack`. Default value: 0
"""
boardSlack: Int
"""
Invariant: `boardSlack + alightSlack <= transferSlack`. Default value: 0
"""
alightSlack: Int
"""
A global minimum transfer time (in seconds) that specifies the minimum
amount of time that must pass between exiting one transit vehicle and
boarding another. This time is in addition to time it might take to walk
between transit stops. Default value: 0
"""
minTransferTime: Int
"""
Penalty (in seconds) for using a non-preferred transfer. Default value: 180
"""
nonpreferredTransferPenalty: Int
"""Maximum number of transfers. Default value: 2"""
maxTransfers: Int
"""
This argument has currently no effect on which itineraries are returned. Use
argument `fromPlace` to start the itinerary from a specific stop.
~~A transit stop that this trip must start from~~
"""
startTransitStopId: String
"""
When false, return itineraries using canceled trips. Default value: true.
"""
omitCanceled: Boolean = true
"""
When true, real-time updates are ignored during this search. Default value: false
"""
ignoreRealtimeUpdates: Boolean
"""
Two-letter language code (ISO 639-1) used for returned text.
**Note:** only part of the data has translations available and names of
stops and POIs are returned in their default language. Due to missing
translations, it is sometimes possible that returned text uses a mixture of two languages.
"""
locale: String
"""
List of ticket types that are allowed to be used in itineraries.
See `ticketTypes` query for list of possible ticket types.
"""
allowedTicketTypes: [String]
"""
Which vehicle rental networks can be used. By default, all networks are allowed.
"""
allowedVehicleRentalNetworks: [String]
"""
Which vehicle rental networks cannot be used. By default, all networks are allowed.
"""
bannedVehicleRentalNetworks: [String]
"""
Factor for how much the walk safety is considered in routing. Value should be between 0 and 1.
If the value is set to be 0, safety is ignored. Default is 1.0.
"""
walkSafetyFactor: Float
"Preferences for vehicle parking"
parking: VehicleParkingInput
## Deprecated fields, none of these have any effect on the routing anymore
"""
The maximum distance (in meters) the user is willing to walk per walking
section. If the only transport mode allowed is `WALK`, then the value of
this argument is ignored.
Default: 2000m
Maximum value: 15000m
**Note:** If this argument has a relatively small value and only some
transport modes are allowed (e.g. `WALK` and `RAIL`), it is possible to get
an itinerary which has (useless) back and forth public transport legs to
avoid walking too long distances.
"""
maxWalkDistance: Float @deprecated(reason: "Does nothing. Use walkReluctance instead.")
"""
How much more reluctant is the user to walk on streets with car traffic allowed. Default value: 1.0
"""
walkOnStreetReluctance: Float @deprecated(reason: "Use `walkSafetyFactor` instead")
"""
How much less bad is waiting at the beginning of the trip (replaces
`waitReluctance` on the first boarding). Default value: 0.4
"""
waitAtBeginningFactor: Float @deprecated(reason: "Removed in OTP 2, the timetable-view replaces this functionality.")
"""
This argument has no use for itinerary planning and will be removed later.
When true, do not use goal direction or stop at the target, build a full SPT. Default value: false.
"""
batch: Boolean @deprecated(reason: "Removed in OTP 2")
"""Is bike rental allowed? Default value: false"""
allowBikeRental: Boolean @deprecated(reason: "Rental is specified by modes")
"""
No effect on itinerary planning, adjust argument `time` instead to get later departures.
~~The maximum wait time in seconds the user is willing to delay trip start. Only effective in Analyst.~~
"""
claimInitialWait: Long @deprecated(reason: "Removed in OTP 2")
"""
**Consider this argument experimental** setting this argument to true
causes timeouts and unoptimal routes in many cases.
When true, reverse optimize (find alternative transportation mode, which
still arrives to the destination in time) this search on the fly after
processing each transit leg, rather than reverse-optimizing the entire path
when it's done. Default value: false.
"""
reverseOptimizeOnTheFly: Boolean @deprecated(reason: "Removed in OTP 2")
"""
If true, the remaining weight heuristic is disabled. Currently only
implemented for the long distance path service.
"""
disableRemainingWeightHeuristic: Boolean @deprecated(reason: "Removed in OTP 2.2")
"""
Whether legs should be compacted by performing a reversed search.
"""
compactLegsByReversedSearch: Boolean @deprecated(reason: "Removed in OTP 2")
"""
Which vehicle rental networks can be used. By default, all networks are allowed.
"""
allowedBikeRentalNetworks: [String] @deprecated(reason: "Use allowedVehicleRentalNetworks instead")
"""
The maximum time (in seconds) of pre-transit travel when using
drive-to-transit (park and ride or kiss and ride). Default value: 1800.
"""
maxPreTransitTime: Int @deprecated(reason: "Use walkReluctance or future reluctance parameters for other modes")
"""
How expensive it is to drive a car when car&parking, increase this value to
make car driving legs shorter. Default value: 1.
"""
carParkCarLegWeight: Float @deprecated(reason: "Use `carReluctance` instead.")
"""Tuning parameter for the search algorithm, mainly useful for testing."""
heuristicStepsPerMainStep: Int @deprecated(reason: "Removed. Doesn't do anything.")
"""
How easily bad itineraries are filtered from results. Value 0 (default)
disables filtering. Itineraries are filtered if they are worse than another
one in some respect (e.g. more walking) by more than the percentage of
filtering level, which is calculated by dividing 100% by the value of this
argument (e.g. `itineraryFiltering = 0.5` 200% worse itineraries are filtered).
"""
itineraryFiltering: Float @deprecated(reason: "Removed. Doesn't do anything.")
"""An ordered list of intermediate locations to be visited."""
intermediatePlaces: [InputCoordinates] @deprecated(reason: "Not implemented in OTP2.")
"""
ID of the trip on which the itinerary starts. This argument can be used to
plan itineraries when the user is already onboard a vehicle. When using this
argument, arguments `time` and `from` should be set based on a vehicle
position message received from the vehicle running the specified trip.
**Note:** this argument only takes into account the route and estimated
travel time of the trip (and therefore arguments `time` and `from` must be
used correctly to get meaningful itineraries).
"""
startTransitTripId: String @deprecated(reason: "Not implemented in OTP2")
): Plan @async
"""
Plan (itinerary) search that follows
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm).
"""
planConnection(
"""
Datetime of the search. It's possible to either define the earliest departure time
or the latest arrival time. By default, earliest departure time is set as now.
"""
dateTime: PlanDateTimeInput
"""
Duration of the search window. This either starts at the defined earliest departure
time or ends at the latest arrival time. If this is not provided, a reasonable
search window is automatically generated. When searching for earlier or later itineraries
with paging, this search window is no longer used and the new window will be based
on how many suggestions were returned in the previous search. The new search window can be
shorter or longer than the original search window. Note, itineraries are returned faster
with a smaller search window and search window limitation is done mainly for performance reasons.
Setting this parameter makes especially sense if the transportation network is as sparse or dense
in the whole itinerary search area. Otherwise, letting the system decide what is the search window
is in combination of using paging can lead to better performance and to getting a more consistent
number of itineraries in each search.
"""
searchWindow: Duration
"""
The origin where the search starts. Usually coordinates but can also be a stop location.
"""
origin: PlanLabeledLocationInput!
"""
The destination where the search ends. Usually coordinates but can also be a stop location.
"""
destination: PlanLabeledLocationInput!
"""
Street and transit modes used during the search. This also includes options to only return
an itinerary that contains no transit legs or force transit to be used in all itineraries.
By default, all transit modes are usable and `WALK` is used for direct street suggestions,
access, egress and transfers.
"""
modes: PlanModesInput
"""
Preferences that affect what itineraries are returned. Preferences are split into categories.
"""
preferences: PlanPreferencesInput
"""
Settings that control the behavior of itinerary filtering. These are advanced settings and
should not be set by a user through user preferences.
"""
itineraryFilter: PlanItineraryFilterInput
"""
Locale used for translations. Note, there might not necessarily be translations available.
It's possible and recommended to use the ´accept-language´ header instead of this parameter.
"""
locale: Locale
"""
Takes in cursor from a previous search. Used for forward pagination. If earliest departure time
is used in the original query, the new search then returns itineraries that depart after
the start time of the last itinerary that was returned, or at the same time if there are multiple
itinerary options that can depart at that moment in time.
If latest arrival time is defined, the new search returns itineraries that arrive before the end
time of the last itinerary that was returned in the previous search, or at the same time if there
are multiple itinerary options that can arrive at that moment in time. This parameter is part of
the [GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm) and
should be used together with the `first` parameter.
"""
after: String
"""
How many new itineraries should at maximum be returned in either the first search or with
forward pagination. This parameter is part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm)
and should be used together with the `after` parameter (although `after` shouldn't be defined
in the first search).
"""
first: Int
"""
Takes in cursor from a previous search. Used for backwards pagination. If earliest departure time
is used in the original query, the new search then returns itineraries that depart before that time.
If latest arrival time is defined, the new search returns itineraries that arrive after that time.
This parameter is part of the [GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm)
and should be used together with the `last` parameter.
"""
before: String
"""
How many new itineraries should at maximum be returned in backwards pagination. It's recommended to
use the same value as was used for the `first` parameter in the original search for optimal
performance. This parameter is part of the
[GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm)
and should be used together with the `before` parameter.
"""
last: Int
): PlanConnection @async @deprecated(reason: "Experimental and can include breaking changes, use plan instead")
}
enum RealtimeState {
"""
The trip information comes from the GTFS feed, i.e. no real-time update has been applied.
"""
SCHEDULED
"""
The trip information has been updated, but the trip pattern stayed the same as the trip pattern of the scheduled trip.
"""
UPDATED
"""The trip has been canceled by a real-time update."""
CANCELED
"""
The trip has been added using a real-time update, i.e. the trip was not present in the GTFS feed.
"""
ADDED
"""
The trip information has been updated and resulted in a different trip pattern
compared to the trip pattern of the scheduled trip.
"""
MODIFIED
}
"""
A cost multiplier for how bad something is compared to being in transit for equal lengths of time.
The value should be greater than 0. 1 means neutral and values below 1 mean that something is
preferred over transit.
"""
scalar Reluctance
"""
Preferences related to scooter rental (station based or floating scooter rental).
"""
input ScooterRentalPreferencesInput {
"""
Is it possible to arrive to the destination with a rented scooter and does it
come with an extra cost.
"""
destinationScooterPolicy: DestinationScooterPolicyInput
"""
Rental networks which can be potentially used as part of an itinerary.
"""
allowedNetworks: [String!]
"""
Rental networks which cannot be used as part of an itinerary.
"""
bannedNetworks: [String!]
}
"""
Preferences related to car rental (station based or floating car rental).
"""
input CarRentalPreferencesInput {
"""
Rental networks which can be potentially used as part of an itinerary.
"""
allowedNetworks: [String!]
"""
Rental networks which cannot be used as part of an itinerary.
"""
bannedNetworks: [String!]
}
"""
Preferences related to bicycle rental (station based or floating bicycle rental).
"""
input BicycleRentalPreferencesInput {
"""
Is it possible to arrive to the destination with a rented bicycle and does it
come with an extra cost.
"""
destinationBicyclePolicy: DestinationBicyclePolicyInput
"""
Rental networks which can be potentially used as part of an itinerary.
"""
allowedNetworks: [String!]
"""
Rental networks which cannot be used as part of an itinerary.
"""
bannedNetworks: [String!]
}
"""
Route represents a public transportation service, usually from point A to point
B and *back*, shown to customers under a single name, e.g. bus 550. Routes
contain patterns (see field `patterns`), which describe different variants of
the route, e.g. outbound pattern from point A to point B and inbound pattern
from point B to point A.
"""
type Route implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the route in format `FeedId:RouteId`"""
gtfsId: String!
"""Agency operating the route"""
agency: Agency
"""Short name of the route, usually a line number, e.g. 550"""
shortName: String
"""Long name of the route, e.g. Helsinki-Leppävaara"""
longName(
"""If translated longName is found from gtfs translation.txt and wanted language is not same as
feed's language then returns wanted translation. Otherwise uses name from routes.txt.
"""
language: String): String
"""Transport mode of this route, e.g. `BUS`"""
mode: TransitMode
"""
The raw GTFS route type as a integer. For the list of possible values, see:
https://developers.google.com/transit/gtfs/reference/#routestxt and
https://developers.google.com/transit/gtfs/reference/extended-route-types
"""
type: Int
desc: String
url: String
"""
The color (in hexadecimal format) the agency operating this route would prefer
to use on UI elements (e.g. polylines on a map) related to this route. This
value is not available for most routes.
"""
color: String
"""
The color (in hexadecimal format) the agency operating this route would prefer
to use when displaying text related to this route. This value is not available
for most routes.
"""
textColor: String
bikesAllowed: BikesAllowed
"""List of patterns which operate on this route"""
patterns: [Pattern]
"""List of stops on this route"""
stops: [Stop]
"""List of trips which operate on this route"""
trips: [Trip]
"""
List of alerts which have an effect on the route directly or indirectly.
By default only alerts directly affecting this route are returned. It's also possible
to return other relevant alerts through defining types.
"""
alerts(
"""
Returns alerts for these types that are relevant for the route.
By default only returns alerts that directly affect this route.
"""
types: [RouteAlertType]
): [Alert]
"""
Orders the routes in a way which is useful for presentation to passengers.
Routes with smaller values should be displayed first.
The value can be any non-negative integer. A null value means that no information was supplied.
This value is passed through from the source data without modification. If multiple feeds
define sort orders for their routes, they may not be comparable to each other as no agreed scale
exists.
Two routes may also have the same sort order and clients must decide based on other criteria
what the actual order is.
"""
sortOrder: Int
}
"""Entities that are relevant for routes that can contain alerts"""
enum RouteAlertType {
"""Alerts affecting the route's agency."""
AGENCY
"""Alerts directly affecting the route."""
ROUTE
"""Alerts affecting the route type of the route."""
ROUTE_TYPE
"""Alerts affecting the stops that are on the route."""
STOPS_ON_ROUTE
"""Alerts affecting the route's trips."""
TRIPS
"""Alerts affecting the stops on some trips of the route."""
STOPS_ON_TRIPS
"""
Alerts affecting route's patterns.
"""
PATTERNS
}
"""
Route type entity which covers all agencies if agency is null,
otherwise only relevant for one agency.
"""
type RouteType {
"""
GTFS Route type.
For the list of possible values, see:
https://developers.google.com/transit/gtfs/reference/#routestxt and
https://developers.google.com/transit/gtfs/reference/extended-route-types
"""
routeType: Int!
"""A public transport agency"""
agency: Agency
"""
The routes which have the defined routeType and belong to the agency, if defined.
Otherwise all routes of the feed that have the defined routeType.
"""
routes: [Route]
}
"""Time range for which the API has data available"""
type serviceTimeRange {
"""
Time from which the API has data available. Format: Unix timestamp in seconds
"""
start: Long
"""
Time until which the API has data available. Format: Unix timestamp in seconds
"""
end: Long
}
"""Actions to take relative to the current position when engaging a walking/driving step."""
enum RelativeDirection {
DEPART
HARD_LEFT
LEFT
SLIGHTLY_LEFT
CONTINUE
SLIGHTLY_RIGHT
RIGHT
HARD_RIGHT
CIRCLE_CLOCKWISE
CIRCLE_COUNTERCLOCKWISE
ELEVATOR
UTURN_LEFT
UTURN_RIGHT
ENTER_STATION
EXIT_STATION
FOLLOW_SIGNS
}
"""The cardinal (compass) direction taken when engaging a walking/driving step."""
enum AbsoluteDirection {
NORTH
NORTHEAST
EAST
SOUTHEAST
SOUTH
SOUTHWEST
WEST
NORTHWEST
}
"""Occupancy status of a vehicle."""
enum OccupancyStatus {
"""Default. There is no occupancy-data on this departure."""
NO_DATA_AVAILABLE
"""
The vehicle is considered empty by most measures, and has few or no passengers onboard, but is
still accepting passengers. There isn't a big difference between this and MANY_SEATS_AVAILABLE
so it's possible to handle them as the same value, if one wants to limit the number of different
values.
SIRI nordic profile: merge these into `MANY_SEATS_AVAILABLE`.
"""
EMPTY
"""
The vehicle or carriage has a large number of seats available. The amount of free seats out of
the total seats available to be considered large enough to fall into this category is
determined at the discretion of the producer. There isn't a big difference between this and
EMPTY so it's possible to handle them as the same value, if one wants to limit the number of
different values.
SIRI nordic profile: more than ~50% of seats available.
"""
MANY_SEATS_AVAILABLE
"""
The vehicle or carriage has a small number of seats available. The amount of free seats out of
the total seats available to be considered small enough to fall into this category is
determined at the discretion of the producer.
SIRI nordic profile: less than ~50% of seats available.
"""
FEW_SEATS_AVAILABLE
"""
The vehicle or carriage can currently accommodate only standing passengers.
SIRI nordic profile: less than ~10% of seats available.
"""
STANDING_ROOM_ONLY
"""
The vehicle or carriage can currently accommodate only standing passengers and has limited
space for them. There isn't a big difference between this and FULL so it's possible to handle
them as the same value, if one wants to limit the number of different values.
SIRI nordic profile: merge into `STANDING_ROOM_ONLY`.
"""
CRUSHED_STANDING_ROOM_ONLY
"""
The vehicle is considered full by most measures, but may still be allowing passengers to
board.
"""
FULL
"""
The vehicle or carriage is not accepting passengers.
SIRI nordic profile: if vehicle/carriage is not in use / unavailable, or passengers are only allowed
to alight due to e.g. crowding.
"""
NOT_ACCEPTING_PASSENGERS
}
"""
Preferences related to travel with a scooter (kick or e-scooter).
"""
input ScooterPreferencesInput {
"""
A multiplier for how bad riding a scooter is compared to being in transit
for equal lengths of time.
"""
reluctance: Reluctance
"""
Maximum speed on flat ground while riding a scooter. Note, this speed is higher than
the average speed will be in itineraries as this is the maximum speed but there are
factors that slow down the travel such as crossings, intersections and elevation changes.
"""
speed: Speed
"""
What criteria should be used when optimizing a scooter route.
"""
optimization: ScooterOptimizationInput
"""
Scooter rental related preferences.
"""
rental: ScooterRentalPreferencesInput
}
type step {
"""The distance in meters that this step takes."""
distance: Float
"""The longitude of the start of the step."""
lon: Float
"""The latitude of the start of the step."""
lat: Float
"""The elevation profile as a list of { distance, elevation } values."""
elevationProfile: [elevationProfileComponent]
"""The relative direction (e.g. left or right turn) to take when engaging this step."""
relativeDirection: RelativeDirection
"""The cardinal (compass) direction (e.g. north, northeast) taken when engaging this step."""
absoluteDirection: AbsoluteDirection
"""The name of the street, road, or path taken for this step."""
streetName: String
"""When exiting a highway or traffic circle, the exit name/number."""
exit: String
"""Indicates whether or not a street changes direction at an intersection."""
stayOn: Boolean
"""
This step is on an open area, such as a plaza or train platform,
and thus the directions should say something like "cross".
"""
area: Boolean
"""
The name of this street was generated by the system, so we should only display it once, and
generally just display right/left directions
"""
bogusName: Boolean
"""Is this step walking with a bike?"""
walkingBike: Boolean
"""A list of alerts (e.g. construction, detours) applicable to the step."""
alerts: [Alert]
}
"""
Stop can represent either a single public transport stop, where passengers can
board and/or disembark vehicles, or a station, which contains multiple stops.
See field `locationType`.
"""
type Stop implements Node & PlaceInterface {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""Returns timetable of the specified pattern at this stop"""
stopTimesForPattern(
"""Id of the pattern"""
id: String!
"""
Return departures after this time. Format: Unix timestamp in seconds. Default value: current time
"""
startTime: Long = 0
"""
Return stoptimes within this time range, starting from `startTime`. Unit: Seconds
"""
timeRange: Int = 86400
numberOfDepartures: Int = 2
"""If true, only those departures which allow boarding are returned"""
omitNonPickups: Boolean = false
"""If false, returns also canceled trips"""
omitCanceled: Boolean = true
): [Stoptime]
"""ÌD of the stop in format `FeedId:StopId`"""
gtfsId: String!
"""Name of the stop, e.g. Pasilan asema"""
name(
"""If translated name is found from gtfs translation.txt and wanted language is not same as
feed's language then returns wanted translation. Otherwise uses name from stops.txt.
E.g. Swedish name for Pasilan asema is Böle station."""
language: String): String!
"""Latitude of the stop (WGS 84)"""
lat: Float
"""Longitude of the stop (WGS 84)"""
lon: Float
"""
Representations of this stop's geometry. This is mainly interesting for flex stops which can be
a polygon or a group of stops either consisting of either points or polygons.
Regular fixed-schedule stops return a single point.
Stations (parent stations with child stops) contain a geometry collection with a point for the
central coordinate plus a convex hull polygon (https://en.wikipedia.org/wiki/Convex_hull) of all
coordinates of the child stops.
If there are only two child stops then the convex hull is a straight line between the them. If
there is a single child stop then it's a single point.
"""
geometries: StopGeometries
"""Stop code which is visible at the stop"""
code: String
"""Description of the stop, usually a street name"""
desc(
"""If translated description is found from gtfs translation.txt and wanted language is not same as
feed's language then returns wanted translation. Otherwise uses descriptions from stops.txt.
"""
language: String): String
"""ID of the zone where this stop is located"""
zoneId: String
url(
"""If translated url is found from gtfs translation.txt and wanted language is not same as
feed's language then returns wanted translation. Otherwise uses url from stops.txt."""
language: String): String
"""Identifies whether this stop represents a stop or station."""
locationType: LocationType
"""
The station which this stop is part of (or null if this stop is not part of a station)
"""
parentStation: Stop
"""
Whether wheelchair boarding is possible for at least some of vehicles on this stop
"""
wheelchairBoarding: WheelchairBoarding
direction: String
timezone: String
"""
The raw GTFS route type used by routes which pass through this stop. For the
list of possible values, see:
https://developers.google.com/transit/gtfs/reference/#routestxt and
https://developers.google.com/transit/gtfs/reference/extended-route-types
"""
vehicleType: Int
"""
Transport mode (e.g. `BUS`) used by routes which pass through this stop or
`null` if mode cannot be determined, e.g. in case no routes pass through the stop.
Note that also other types of vehicles may use the stop, e.g. tram replacement
buses might use stops which have `TRAM` as their mode.
"""
vehicleMode: Mode
"""
Identifier of the platform, usually a number. This value is only present for stops that are part of a station
"""
platformCode: String
"""The cluster which this stop is part of"""
cluster: Cluster
"""
Returns all stops that are children of this station (Only applicable for stations)
"""
stops: [Stop]
"""Routes which pass through this stop"""
routes: [Route!]
"""Patterns which pass through this stop"""
patterns: [Pattern]
"""List of nearby stops which can be used for transfers"""
transfers(
"""
Maximum distance to the transfer stop. Defaults to unlimited.
**Note:** only stops that are linked as a transfer stops to this stop are
returned, i.e. this does not do a query to search for *all* stops within
radius of `maxDistance`.
"""
maxDistance: Int
): [stopAtDistance]
"""Returns list of stoptimes for the specified date"""
stoptimesForServiceDate(
"""Date in format YYYYMMDD"""
date: String
"""If true, only those departures which allow boarding are returned"""
omitNonPickups: Boolean = false
"""If false, returns also canceled trips"""
omitCanceled: Boolean = false
): [StoptimesInPattern]
"""
Returns list of stoptimes (arrivals and departures) at this stop, grouped by patterns
"""
stoptimesForPatterns(
"""
Return departures after this time. Format: Unix timestamp in seconds. Default value: current time
"""
startTime: Long = 0
"""
Return stoptimes within this time range, starting from `startTime`. Unit: Seconds
"""
timeRange: Int = 86400
numberOfDepartures: Int = 5
"""If true, only those departures which allow boarding are returned"""
omitNonPickups: Boolean = false
"""If false, returns also canceled trips"""
omitCanceled: Boolean = true
): [StoptimesInPattern]
"""Returns list of stoptimes (arrivals and departures) at this stop"""
stoptimesWithoutPatterns(
"""
Return departures after this time. Format: Unix timestamp in seconds. Default value: current time
"""
startTime: Long = 0
"""
Return stoptimes within this time range, starting from `startTime`. Unit: Seconds
"""
timeRange: Int = 86400
numberOfDepartures: Int = 5
"""If true, only those departures which allow boarding are returned"""
omitNonPickups: Boolean = false
"""If false, returns also canceled trips"""
omitCanceled: Boolean = true
): [Stoptime]
"""
By default, list of alerts which have directly an effect on just the stop.
It's also possible to return other relevant alerts through defining types.
"""
alerts(
"""
Returns alerts for these types that are relevant for the stop.
By default, list of alerts which have directly an effect on just the stop.
"""
types: [StopAlertType]
): [Alert]
}
"""Entities, which are relevant for a stop and can contain alerts"""
enum StopAlertType {
"""Alerts affecting the stop"""
STOP
"""Alerts affecting the stop's patterns"""
PATTERNS
"""Alerts affecting the agencies of the routes going through the stop"""
AGENCIES_OF_ROUTES
"""Alerts affecting the routes that go through the stop"""
ROUTES
"""Alerts affecting the trips that go through this stop"""
TRIPS
"""Alerts affecting the stop on specific routes"""
STOP_ON_ROUTES
"""Alerts affecting the stop on specific trips"""
STOP_ON_TRIPS
}
type stopAtDistance implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
stop: Stop
"""Walking distance to the stop along streets and paths"""
distance: Int
}
"""A connection to a list of items."""
type stopAtDistanceConnection {
edges: [stopAtDistanceEdge]
pageInfo: PageInfo!
}
"""An edge in a connection."""
type stopAtDistanceEdge {
"""The item at the end of the edge"""
node: stopAtDistance
cursor: String!
}
"""
Stop that should (but not guaranteed) to exist on a route.
"""
type StopOnRoute {
"""
Stop at the route. It's also possible that the stop is no longer on the route.
"""
stop: Stop!
"""Route which contains the stop."""
route: Route!
}
"""
Stop that should (but not guaranteed) to exist on a trip.
"""
type StopOnTrip {
"""
Stop at the trip. It's also possible that the stop is no longer on the trip.
"""
stop: Stop!
"""
Trip which contains the stop.
"""
trip: Trip!
}
"""
Stoptime represents the time when a specific trip arrives to or departs from a specific stop.
"""
type Stoptime {
"""The stop where this arrival/departure happens"""
stop: Stop
"""
The sequence of the stop in the pattern. This is not required to start from 0 or be consecutive - any
increasing integer sequence along the stops is valid.
The purpose of this field is to identify the stop within the pattern so it can be cross-referenced
between it and the itinerary. It is safe to cross-reference when done quickly, i.e. within seconds.
However, it should be noted that real-time updates can change the values, so don't store it for
longer amounts of time.
Depending on the source data, this might not be the GTFS `stop_sequence` but another value, perhaps
even generated.
"""
stopPosition: Int
"""
Scheduled arrival time. Format: seconds since midnight of the departure date
"""
scheduledArrival: Int
"""
Real-time prediction of arrival time. Format: seconds since midnight of the departure date
"""
realtimeArrival: Int
"""
The offset from the scheduled arrival time in seconds. Negative values
indicate that the trip is running ahead of schedule.
"""
arrivalDelay: Int
"""
Scheduled departure time. Format: seconds since midnight of the departure date
"""
scheduledDeparture: Int
"""
Real-time prediction of departure time. Format: seconds since midnight of the departure date
"""
realtimeDeparture: Int
"""
The offset from the scheduled departure time in seconds. Negative values
indicate that the trip is running ahead of schedule
"""
departureDelay: Int
"""
true, if this stop is used as a time equalization stop. false otherwise.
"""
timepoint: Boolean
"""true, if this stoptime has real-time data available"""
realtime: Boolean
"""State of real-time data"""
realtimeState: RealtimeState
"""
Whether the vehicle can be boarded at this stop. This field can also be used
to indicate if boarding is possible only with special arrangements.
"""
pickupType: PickupDropoffType
"""
Whether the vehicle can be disembarked at this stop. This field can also be
used to indicate if disembarkation is possible only with special arrangements.
"""
dropoffType: PickupDropoffType
"""
Departure date of the trip. Format: Unix timestamp (local time) in seconds.
"""
serviceDay: Long
"""Trip which this stoptime is for"""
trip: Trip
"""
Vehicle headsign of the trip on this stop. Trip headsigns can change during
the trip (e.g. on routes which run on loops), so this value should be used
instead of `tripHeadsign` to display the headsign relevant to the user.
"""
headsign(
"""If translated headsign is found from gtfs translation.txt and wanted language is not same as
feed's language then returns wanted translation. Otherwise uses name from trip_headsign.txt.
"""
language: String): String
}
"""Stoptimes grouped by pattern"""
type StoptimesInPattern {
pattern: Pattern
stoptimes: [Stoptime]
}
"""Describes ticket type"""
type TicketType implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""
Ticket type ID in format `FeedId:TicketTypeId`. Ticket type IDs are usually
combination of ticket zones where the ticket is valid.
"""
fareId: String!
"""Price of the ticket in currency that is specified in `currency` field"""
price: Float
"""ISO 4217 currency code"""
currency: String
"""
List of zones where this ticket is valid.
Corresponds to field `zoneId` in **Stop** type.
"""
zones: [String!]
}
input TimetablePreferencesInput {
"""
When false, real-time updates are considered during the routing.
In practice, when this option is set as true, some of the suggestions might not be
realistic as the transfers could be invalid due to delays,
trips can be cancelled or stops can be skipped.
"""
excludeRealTimeUpdates: Boolean
"""
When true, departures that have been cancelled ahead of time will be
included during the routing. This means that an itinerary can include
a cancelled departure while some other alternative that contains no cancellations
could be filtered out as the alternative containing a cancellation would normally
be better.
"""
includePlannedCancellations: Boolean
"""
When true, departures that have been cancelled through a real-time feed will be
included during the routing. This means that an itinerary can include
a cancelled departure while some other alternative that contains no cancellations
could be filtered out as the alternative containing a cancellation would normally
be better. This option can't be set to true while `includeRealTimeUpdates` is false.
"""
includeRealTimeCancellations: Boolean
}
"""
Preferences related to transfers between transit vehicles (typically between stops).
"""
input TransferPreferencesInput {
"""
A static cost that is added for each transfer on top of other costs.
"""
cost: Cost
"""
A global minimum transfer time (in seconds) that specifies the minimum amount of time
that must pass between exiting one transit vehicle and boarding another. This time is
in addition to time it might take to walk between transit stops. Setting this value
as `PT0S`, for example, can lead to passenger missing a connection when the vehicle leaves
ahead of time or the passenger arrives to the stop later than expected.
"""
slack: Duration
"""
How many additional transfers there can be at maximum compared to the itinerary with the
least number of transfers.
"""
maximumAdditionalTransfers: Int
"""
How many transfers there can be at maximum in an itinerary.
"""
maximumTransfers: Int
}
"""
Transit mode and a reluctance associated with it.
"""
input PlanTransitModePreferenceInput {
"""
Transit mode that could be (but doesn't have to be) used in an itinerary.
"""
mode: TransitMode!
"""
Costs related to using a transit mode.
"""
cost: TransitModePreferenceCostInput
}
"""
Costs related to using a transit mode.
"""
input TransitModePreferenceCostInput {
"""
A cost multiplier of transit leg travel time.
"""
reluctance: Reluctance!
}
"""
Transit routing preferences used for transit legs.
"""
input TransitPreferencesInput {
"""
Preferences related to boarding a transit vehicle. Note, board costs for each street mode
can be found under the street mode preferences.
"""
board: BoardPreferencesInput
"""
Preferences related to alighting from a transit vehicle.
"""
alight: AlightPreferencesInput
"""
Preferences related to transfers between transit vehicles (typically between stops).
"""
transfer: TransferPreferencesInput
"""
Preferences related to cancellations and real-time.
"""
timetable: TimetablePreferencesInput
}
"""Text with language"""
type TranslatedString {
text: String
"""Two-letter language code (ISO 639-1)"""
language: String
}
"""Transportation mode which can be used in the itinerary"""
input TransportMode {
mode: Mode!
"""Optional additional qualifier for transport mode, e.g. `RENT`"""
qualifier: Qualifier
}
"""
Trip is a specific occurance of a pattern, usually identified by route, direction on the route and exact departure time.
"""
type Trip implements Node {
"""
Global object ID provided by Relay. This value can be used to refetch this object using **node** query.
"""
id: ID!
"""ID of the trip in format `FeedId:TripId`"""
gtfsId: String!
"""The route the trip is running on"""
route: Route!
serviceId: String
"""List of dates when this trip is in service. Format: YYYYMMDD"""
activeDates: [String]
tripShortName: String
"""Headsign of the vehicle when running on this trip"""
tripHeadsign(
"""If a translated headsign is found from GTFS translation.txt and wanted language is not same as
feed's language then returns wanted translation. Otherwise uses name from trip_headsign.txt.
"""
language: String): String
"""
Short name of the route this trip is running. See field `shortName` of Route.
"""
routeShortName: String
"""
Direction code of the trip, i.e. is this the outbound or inbound trip of a
pattern. Possible values: 0, 1 or `null` if the direction is irrelevant, i.e.
the pattern has trips only in one direction.
"""
directionId: String
blockId: String
shapeId: String
"""Whether the vehicle running this trip can be boarded by a wheelchair"""
wheelchairAccessible: WheelchairBoarding
"""Whether bikes are allowed on board the vehicle running this trip"""
bikesAllowed: BikesAllowed
"""The pattern the trip is running on"""
pattern: Pattern
"""List of stops this trip passes through"""
stops: [Stop!]!
"""
Hash code of the trip. This value is stable and not dependent on the trip id.
"""
semanticHash: String!
"""List of times when this trip arrives to or departs from a stop"""
stoptimes: [Stoptime]
"""Departure time from the first stop"""
departureStoptime(
"""
Date for which the departure time is returned. Format: YYYYMMDD. If this
argument is not used, field `serviceDay` in the stoptime will have a value of 0.
"""
serviceDate: String
): Stoptime
"""Arrival time to the final stop"""
arrivalStoptime(
"""
Date for which the arrival time is returned. Format: YYYYMMDD. If this
argument is not used, field `serviceDay` in the stoptime will have a value of 0.
"""
serviceDate: String
): Stoptime
stoptimesForDate(
"""Date for which stoptimes are returned. Format: YYYYMMDD"""
serviceDate: String
): [Stoptime]
"""List of coordinates of this trip's route"""
geometry: [[Float]]
"""
Coordinates of the route of this trip in Google polyline encoded format
"""
tripGeometry: Geometry
"""
By default, list of alerts which have directly an effect on just the trip.
It's also possible to return other relevant alerts through defining types.
"""
alerts(
"""
Returns alerts for these types that are relevant for the trip.
By default, list of alerts which have directly an effect on just the trip.
"""
types: [TripAlertType]
): [Alert]
"""
The latest real-time occupancy information for the latest occurance of this
trip.
"""
occupancy: TripOccupancy
}
"""
Enable this to attach a system notice to itineraries instead of removing them. This is very
convenient when tuning the itinerary-filter-chain.
"""
enum ItineraryFilterDebugProfile {
"""
Only return the requested number of itineraries, counting both actual and deleted ones.
The top `numItineraries` using the request sort order is returned. This does not work
with paging, itineraries after the limit, but inside the search-window are skipped when
moving to the next page.
"""
LIMIT_TO_NUMBER_OF_ITINERARIES
"""
Return all itineraries, including deleted ones, inside the actual search-window used
(the requested search-window may differ).
"""
LIMIT_TO_SEARCH_WINDOW
"List all itineraries, including all deleted itineraries."
LIST_ALL
"By default, the debug itinerary filters is turned off."
OFF
}
"""Entities, which are relevant for a trip and can contain alerts"""
enum TripAlertType {
"""Alerts affecting the trip"""
TRIP
"""Alerts affecting the trip's pattern"""
PATTERN
"""Alerts affecting the trip's agency"""
AGENCY
"""Alerts affecting the trip's route"""
ROUTE
"""Alerts affecting the route type of the trip's route"""
ROUTE_TYPE
"""
Alerts affecting the stops visited on the trip.
Some of the alerts can only affect the trip or its route on the stop.
"""
STOPS_ON_TRIP
}
"""
Occupancy of a vehicle on a trip. This should include the most recent occupancy information
available for a trip. Historic data might not be available.
"""
type TripOccupancy {
"""
Occupancy information mapped to a limited set of descriptive states.
"""
occupancyStatus: OccupancyStatus
}
"""
A system notice is used to tag elements with system information for debugging
or other system related purpose. One use-case is to run a routing search with
'debugItineraryFilter: true'. This will then tag itineraries instead of removing
them from the result. This make it possible to inspect the itinerary-filter-chain.
A SystemNotice only has english text,
because the primary user are technical staff, like testers and developers.
"""
type SystemNotice {
"""Notice's tag"""
tag: String
"""Notice's description"""
text: String
}
"""
This is used for alert entities that we don't explicitly handle or they are missing.
"""
type Unknown {
"""Entity's description"""
description: String
}
enum VertexType {
"""NORMAL"""
NORMAL
"""TRANSIT"""
TRANSIT
"""BIKEPARK"""
BIKEPARK
"""BIKESHARE"""
BIKESHARE
"""PARKANDRIDE"""
PARKANDRIDE
}
"""
Preferences for walking a bicycle.
"""
input BicycleWalkPreferencesInput {
"""
Maximum walk speed on flat ground. Note, this speed is higher than the average speed
will be in itineraries as this is the maximum speed but there are
factors that slow down walking such as crossings, intersections and elevation changes.
"""
speed: Speed
"""
Costs related to walking a bicycle.
"""
cost: BicycleWalkPreferencesCostInput
""""
How long it takes to hop on or off a bicycle when switching to walking the bicycle
or when getting on the bicycle again. However, this is not applied when getting
on a rented bicycle for the first time or off the bicycle when returning the bicycle.
"""
mountDismountTime: Duration
}
"""
Costs related to walking a bicycle.
"""
input BicycleWalkPreferencesCostInput {
"""
A static cost that is added each time hopping on or off a bicycle to start or end
bicycle walking. However, this cost is not applied when getting on a rented bicycle
for the first time or when getting off the bicycle when returning the bicycle.
"""
mountDismountCost: Cost
"""
A cost multiplier of bicycle walking travel time. The multiplier is for how bad
walking the bicycle is compared to being in transit for equal lengths of time.
"""
reluctance: Reluctance
}
"""
Preferences related to walking (excluding walking a bicycle or a scooter).
"""
input WalkPreferencesInput {
"""
Maximum walk speed on flat ground. Note, this speed is higher than the average speed
will be in itineraries as this is the maximum speed but there are
factors that slow down walking such as crossings, intersections and elevation changes.
"""
speed: Speed
"""
A multiplier for how bad walking is compared to being in transit for equal lengths of time.
"""
reluctance: Reluctance
"""
Factor for how much the walk safety is considered in routing. Value should be between 0 and 1.
If the value is set to be 0, safety is ignored.
"""
safetyFactor: Ratio
"""
The cost of boarding a vehicle while walking.
"""
boardCost: Cost
}
"""A fractional multiplier between 0 and 1, for example 0.25. 0 means 0% and 1 means 100%."""
scalar Ratio
enum WheelchairBoarding {
"""There is no accessibility information for the stop."""
NO_INFORMATION
"""
At least some vehicles at this stop can be boarded by a rider in a wheelchair.
"""
POSSIBLE
"""Wheelchair boarding is not possible at this stop."""
NOT_POSSIBLE
}
"""
Wheelchair related preferences. Note, this is the only from of accessibilty available
currently and is sometimes is used for other accessibility needs as well.
"""
input WheelchairPreferencesInput {
"""
Is wheelchair accessibility considered in routing. Note, this does not guarantee
that the itineraries are wheelchair accessible as there can be data issues.
"""
enabled: Boolean
}