digitransit-ui/app/component/routepage/schedule/queries/ScheduleRouteFragment.js
2026-01-28 16:46:17 +02:00

50 lines
1,022 B
JavaScript

import { graphql } from 'react-relay';
export const ScheduleRouteFragment = graphql`
fragment ScheduleRouteFragment on Route
@argumentDefinitions(
date: { type: "String" }
serviceDate: { type: "String" }
) {
gtfsId
color
shortName
longName
mode
type
...RouteAgencyInfo_route
...RoutePatternSelectContainer_route @arguments(date: $date)
agency {
name
phone
}
patterns {
alerts(types: [ROUTE, STOPS_ON_PATTERN]) {
id
alertSeverityLevel
effectiveEndDate
effectiveStartDate
}
headsign
code
stops {
name
}
trips: tripsForDate(serviceDate: $serviceDate) {
stoptimes: stoptimesForDate(serviceDate: $serviceDate) {
stop {
id
}
realtimeState
scheduledArrival
scheduledDeparture
serviceDay
}
}
activeDates: trips {
serviceId
day: activeDates
}
}
}
`;