-
Notifications
You must be signed in to change notification settings - Fork 0
/
queries.txt
42 lines (37 loc) · 969 Bytes
/
queries.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Guide to forming queries can be found in https://www.digitraffic.fi/rautatieliikenne/#graphql
All currently running VR trains and their location, when speed is over 30km/h:
{
currentlyRunningTrains(where: {operator: {shortCode: {equals: "vr"}}}) {
trainNumber
departureDate
trainLocations(where: {speed: {greaterThan: 30}}, orderBy: {timestamp: DESCENDING}, take: 1) {
speed
timestamp
location
}
}
}
All currently running trains sorted by their operator and train number:
{
currentlyRunningTrains(orderBy: [{operator:{shortCode:ASCENDING}},{trainNumber:ASCENDING}]) {
operator {
shortCode
}
trainNumber
}
}
All trains that go through Ylöjärvi:
{
trainsByDepartureDate(departureDate: "2020-10-06",
where: {timeTableRows:{contains:{station:{shortCode:{equals:"YLÖ"}}}}}
) {
trainNumber
departureDate
timeTableRows {
station {
name
uicCode
}
}
}
}