-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschema.graphqls
2034 lines (1890 loc) · 65.5 KB
/
schema.graphqls
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Scalar types
"""Counts of entities by filename"""
scalar Counts
"""String key/value pairs"""
scalar Tags
"""GeoJSON style geometry"""
scalar Geometry
"""Date with time, in UTC"""
scalar Time
"""Date"""
scalar Date
"""Geographic point (longitude,latitude)"""
scalar Point
"""Geographic points comprising a line"""
scalar LineString
"""Geographic polygon"""
scalar Polygon
"""Local time since midnight, in HH:MM:SS. May also be input as integer seconds."""
scalar Seconds
"""Map with arbitrary keys and values"""
scalar Map
"""Any value"""
scalar Any
"""File upload"""
scalar Upload
"""Entity key"""
scalar Key
"""Boolean (true, false, null)"""
scalar Bool
"""Array of strings"""
scalar Strings
"""A color"""
scalar Color
"""A Language"""
scalar Language
"""URL"""
scalar Url
"""Email"""
scalar Email
"""Timezone"""
scalar Timezone
# Force resolver
directive @goField(forceResolver: Boolean, name: String) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
# Root query
type Query {
"Feeds"
feeds(limit: Int, after: Int, ids: [Int!], where: FeedFilter): [Feed!]!
"Operators"
operators(limit: Int, after: Int, ids: [Int!], where: OperatorFilter): [Operator!]!
"Feed versions"
feed_versions(limit: Int, after: Int, ids: [Int!], where: FeedVersionFilter): [FeedVersion!]!
"Currently imported agencies. If no feed version is specified, defaults to active feed versions."
agencies(limit: Int, after: Int, ids: [Int!], where: AgencyFilter): [Agency!]!
"Currently imported routes. If no feed version is specified, defaults to active feed versions."
routes(limit: Int, after: Int, ids: [Int!], where: RouteFilter): [Route!]!
"Currently imported stops. If no feed version is specified, defaults to active feed versions."
stops(limit: Int, after: Int, ids: [Int!], where: StopFilter): [Stop!]!
"Currently imported trips. If no feed version is specified, defaults to active feed versions."
trips(limit: Int, after: Int, ids: [Int!], where: TripFilter): [Trip!]!
"Operator counts by administrative place"
places(limit: Int,after: Int, level: PlaceAggregationLevel, where: PlaceFilter): [Place!]
"Directions requests API"
directions(where: DirectionRequest!): Directions!
"Current GBFS floating bike data"
bikes(limit: Int, where: GbfsBikeRequest): [GbfsFreeBikeStatus!]
"Current GBFS dock data"
docks(limit: Int, where: GbfsDockRequest): [GbfsStationInformation!]
"Current user metadata"
me: Me!
}
# Root mutation
type Mutation {
"Validate GTFS"
validate_gtfs(file: Upload, url: String, realtime_urls: [String!]): ValidationReport
"Update a feed version"
feed_version_update(set: FeedVersionSetInput!): FeedVersion
"Fetch a feed version"
feed_version_fetch(file: Upload, url: String, feed_onestop_id: String!): FeedVersionFetchResult
"Import a feed version"
feed_version_import(id: Int!): FeedVersionImportResult!
"Unimport a feed version"
feed_version_unimport(id: Int!): FeedVersionUnimportResult!
"Delete a feed version"
feed_version_delete(id: Int!): FeedVersionDeleteResult!
"Create a stop"
stop_create(set: StopSetInput!): Stop!
"Update a stop"
stop_update(set: StopSetInput!): Stop!
"Delete a stop"
stop_delete(id: Int!): EntityDeleteResult!
# levels
"Create a level"
level_create(set: LevelSetInput!): Level!
"Update a level"
level_update(set: LevelSetInput!): Level!
"Delete a level"
level_delete(id: Int!): EntityDeleteResult!
# pathways
"Create a pathway"
pathway_create(set: PathwaySetInput!): Pathway!
"Update a pathway"
pathway_update(set: PathwaySetInput!): Pathway!
"Delete a pathway"
pathway_delete(id: Int!): EntityDeleteResult!
}
"""Result of entity delete operation"""
type EntityDeleteResult {
"ID of deleted entity"
id: Int!
}
"""Current user metadata"""
type Me {
"Internal identifier"
id: String!
"User name"
name: String
"User email"
email: String
"User associated roles"
roles: [String!]
"User associated external data, e.g. metering service identifiers"
external_data: Map!
}
"""Feeds contain details on how to access transit information, including URLs to data sources in various formats (GTFS, GTFS-RT, GBFS, etc), license information, related feeds, details on how to make authorized requests, and current and archived feed versions.
Feed versions are archived (as `.zip` files) and imported into the database for querying agencies, stops, routes, trips, etc."""
type Feed {
"Internal integer ID"
id: Int!
"OnestopID for this feed"
onestop_id: String!
"A common name for this feed. Optional. Alternatively use `associated_operators[].name`"
name: String
"Source DMFR file for this feed"
file: String!
"Type of feed"
spec: FeedSpecTypes
"Language(s) included in this feed"
languages: [String!]
"Source DMFR tags for this feed"
tags: Tags
"Authorization metadata for fetching data from this feed"
authorization: FeedAuthorization
"URLs associated with this feed"
urls: FeedUrls
"Feed license metadata"
license: FeedLicense
"Search rank: internal"
search_rank: String # only for search results
"Operators associated with this feed"
associated_operators: [Operator!]
"Current feed state"
feed_state: FeedState
"Fetch attempts for this feed"
feed_fetches(limit: Int, where: FeedFetchFilter): [FeedFetch!]
"Versions of this feed that have been fetched, archived, and imported"
feed_versions(limit: Int, where: FeedVersionFilter): [FeedVersion!]!
}
"""Details on the current state of this feed, such as active version, last fetch time, etc."""
type FeedState {
"Internal integer ID"
id: Int!
"The active feed version for this feed"
feed_version: FeedVersion
}
"""Record of a feed fetch operation"""
type FeedFetch {
"Internal integer ID"
id: Int!
"URL type, e.g. static_current, realtime_alerts..."
url_type: String
"URL fetched"
url: String
"Was the request successful?"
success: Boolean
"Fetched at"
fetched_at: Time
"Exception log if the fetch did not succeed"
fetch_error: String
"Server response size, in bytes"
response_size: Int
"Server response code (if HTTP)"
response_code: Int
"SHA1 sum of the server response"
response_sha1: String
}
"""Details on how to construct an HTTP request to access a protected resource"""
type FeedAuthorization {
"Method for inserting authorization secret into request"
type: String!
"When `type=query_param`, this specifies the name of the query parameter. When `type=header`, this specifies the name of the header"
param_name: String!
"Website to visit to sign up for an account"
info_url: String!
}
"""License information for this feed, curated by Interline and contributors to the Transitland Atlas feed registry. Note that this does not constitute legal advice. Users are advised to review and confirm any terms and conditions attached to a source feed."""
type FeedLicense {
"SPDX identifier for a common license. See https://spdx.org/licenses/"
spdx_identifier: String!
"URL for a custom license"
url: String!
"Are feed consumers allowed to use the feed contents without including attribution text in their app or map?"
use_without_attribution: String!
"Are feed consumers allowed to create and share derived products from the feed?"
create_derived_product: String!
"Are feed consumers allowed to redistribute the feed in its entirety?"
redistribution_allowed: String!
"Are feed consumers allowed to use the feed for commercial purposes?"
commercial_use_allowed: String!
"Are feed consumers allowed to keep their modifications of this feed private?"
share_alike_optional: String!
"Feed consumers must include this particular text when using this feed"
attribution_text: String!
"Feed consumers must follow these instructions for how to provide attribution"
attribution_instructions: String!
}
"""URL(s) from which Transitland sources a feed"""
type FeedUrls {
"URL for the static feed that represents today's service"
static_current: String!
"URLs for static feeds that represent past service that is no longer in effect "
static_historic: [String!]!
"URLs for static feeds that represent service planned for upcoming dates. Typically used to represent calendar/service changes that will take effect few weeks or months in the future"
static_planned: [String!]!
"URL for GTFS-RT VehiclePosition messages"
realtime_vehicle_positions: String!
"URL for GTFS-RT TripUpdate messages"
realtime_trip_updates: String!
"URL for GTFS-RT Alert messages"
realtime_alerts: String!
"URL for GBFS feed `gbfs.json` auto-discovery file"
gbfs_auto_discovery: String!
"URL for MDS feed provider endpoint"
mds_provider: String!
}
"""Feed versions represent a specific static GTFS file that was published at a particular point in time, and are generally accessed and referenced using the [SHA1 checksum](https://en.wikipedia.org/wiki/SHA-1) of the GTFS archive."""
type FeedVersion {
"Internal integer ID"
id: Int!
"SHA1 hash of the zip file [example:ab5bdc8b6cedd06792d42186a9b542504c5eef9a]"
sha1: String!
"Time when the file was fetched from the url [example:2021-07-09T05:11:00Z]"
fetched_at: Time!
"URL used to fetch the file"
url: String!
"The earliest date with scheduled service [example:2020-01-01]"
earliest_calendar_date: Date!
"The latest date with scheduled service [example:2020-12-31]"
latest_calendar_date: Date!
"Record created by user"
created_by: String
"Record updated by user"
updated_by: String
"An optional name for this feed version"
name: String
"An optional description for this feed version"
description: String
"Reference to file storage location"
file: String
"Convex hull around all active stops in the feed version"
geometry: Polygon
"Feed associated with this feed version"
feed: Feed!
"Current database import status of this feed version"
feed_version_gtfs_import: FeedVersionGtfsImport
"Metadata for each text file present in the main directory of the zip archive"
files(limit: Int): [FeedVersionFileInfo!]!
"Service levels (in seconds per day) for this feed version"
service_levels(limit: Int, where: FeedVersionServiceLevelFilter): [FeedVersionServiceLevel!]!
"Summary details on service dates for this feed version"
service_window: FeedVersionServiceWindow
"Agencies associated with this feed version, if imported"
agencies(limit: Int, where: AgencyFilter): [Agency!]!
"Routes associated with this feed version, if imported"
routes(limit: Int, where: RouteFilter): [Route!]!
"Stops associated with this feed version, if imported"
stops(limit: Int, where: StopFilter): [Stop!]!
"Trips associated with this feed version, if imported"
trips(limit: Int, where: TripFilter): [Trip!]!
"Feed infos associated with this feed version, if imported"
feed_infos(limit: Int): [FeedInfo!]!
"Validation reports associated with this feed version"
validation_reports(limit: Int, where: ValidationReportFilter): [ValidationReport!]
"Normalized route segment data associated with this feed version, if available"
segments(limit: Int): [Segment!]
}
"""Metadata for each file contained within a GTFS archive"""
type FeedVersionFileInfo {
"Internal integer ID"
id: Int!
"Name of the file"
name: String!
"Number of rows in the file"
rows: Int!
"SHA1 hash of the file"
sha1: String!
"Normalized header row of the file, if CSV-like"
header: String!
"Is the file CSV-like?"
csv_like: Boolean!
"File size, in bytes"
size: Int!
"Counts of values for each column"
values_count: Counts!
"Counts of number of unique values for each column"
values_unique: Counts!
}
"""Current database import status for a feed version"""
type FeedVersionGtfsImport {
"Internal integer ID"
id: Int!
"Is the import currently in-progress"
in_progress: Boolean!
"Did the import complete successfully"
success: Boolean!
"Has the schedule (stop times, trips) been archived"
schedule_removed: Boolean!
"Exception log if any errors occurred during import"
exception_log: String!
"Counts of entities skipped due to errors"
skip_entity_error_count: Any
"Counts of successfully imported entities by file name"
entity_count: Any
"Counts of warnings by file name"
warning_count: Any
"Counts of entities skipped due to reference errors"
skip_entity_reference_count: Any
"Counts of entities skipped due to import filters"
skip_entity_filter_count: Any
"Counts of entities skipped due to marker filters"
skip_entity_marked_count: Any
"Number of stop times with arrival/departure times set by interpolation during import process"
interpolated_stop_time_count: Int
"Created at"
created_at: Time
"Updated at"
updated_at: Time
}
"""Summary details on service dates in a feed version"""
type FeedVersionServiceWindow {
"Internal integer ID"
id: Int!
"Feed start date from feed_info.txt, if available"
feed_start_date: Date
"Feed end date from feed_info.txt, if available"
feed_end_date: Date
"Calculated earliest calendar date in service schedule"
earliest_calendar_date: Date
"Calculated latest calendar date in service schedule"
latest_calendar_date: Date
"Week with most typical service patterns inside the service window"
fallback_week: Date
"Default timezone for this feed version"
default_timezone: String
}
"""Number of seconds of service scheduled for each day in a feed version"""
type FeedVersionServiceLevel {
"Internal integer ID"
id: Int!
"Start date of this week"
start_date: Date!
"End date of this week"
end_date: Date!
"Number of seconds of service scheduled on the Monday of this week"
monday: Int!
"Number of seconds of service scheduled on the Tuesday of this week"
tuesday: Int!
"Number of seconds of service scheduled on the Wednesday of this week"
wednesday: Int!
"Number of seconds of service scheduled on the Thursday of this week"
thursday: Int!
"Number of seconds of service scheduled on the Friday of this week"
friday: Int!
"Number of seconds of service scheduled on the Saturday of this week"
saturday: Int!
"Number of seconds of service scheduled on the Sunday of this week"
sunday: Int!
}
# Operator
"""
An agency represents a single GTFS `agencies.txt` entity that was imported from a single feed version. The metadata, routes, etc., for an agency include only the data for that specific agency in that specific feed version.
Operators are a higher-level abstraction over agencies, with each operator defined by an entry in the [Transitland Atlas](/documentation/atlas). Operators provide a method for enriching the basic GTFS agency data, as well as grouping agencies that span across multiple source feeds. Operators are matched with GTFS agencies using `associated_feeds`, a simple list of Feed OnestopIDs and GTFS `agency_id`s. For instance, the [Atlas operator record](https://github.com/transitland/transitland-atlas/blob/master/operators/o-dr5r-nyct.json) for the [New York City MTA](/operators/o-dr5r-nyct) has `associated_feeds` values for 8 different GTFS feeds. A query for this operator OnestopID thus represents the union of data from all 8 feeds, and includes routes for the subway, bus service for all 5 boroughs, commuter rail agencies, etc., operated by the MTA. This record also includes additional metadata about the MTA, such as the United States National Transit Database ID, Wikidata IDs, and alternate names for the agency. Operator records are created and maintained through pull requests to the Atlas json files and synchronized with the Transitland database on each commit.
"""
type Operator {
"Internal integer ID"
id: Int!
"Was this operator generated automatically from GTFS data"
generated: Boolean!
"Source DMFR file for this operator"
file: String
"OnestopID for this operator"
onestop_id: String
"Operator name"
name: String
"Operator short name, if available"
short_name: String
"Operator website, if available"
website: String
"Source DMFR tag data"
tags: Tags
"Search rank: internal"
search_rank: String
"Currently imported and active agencies associated with this operator"
agencies: [Agency!]
"Feeds associated with this operator"
feeds(limit: Int, where: FeedFilter): [Feed!]
}
# GTFS Entities
"""Record from a static GTFS [agency.txt](https://gtfs.org/reference/static/#agencytxt)"""
type Agency {
"Internal integer ID"
id: Int!
"OnestopID for this agency (or its associated operator)"
onestop_id: String!
"GTFS agency.agency_email"
agency_email: Email
"GTFS agency.agency_fare_url"
agency_fare_url: Url
"GTFS agency.agency_id"
agency_id: String!
"GTFS agency.agency_lang"
agency_lang: Language
"GTFS agency.agency_name"
agency_name: String!
"GTFS agency.agency_phone"
agency_phone: String
"GTFS agency.agency_timezone"
agency_timezone: Timezone!
"GTFS agency.agency_url"
agency_url: Url!
"Feed version SHA1 associated with this entity"
feed_version_sha1: String
"Feed OnestopID associated with this entity"
feed_onestop_id: String
"Source feed version for this entity"
feed_version: FeedVersion!
"Geometry for this agency, generated as the convex hull of all stops"
geometry: Polygon
"Search rank: internal"
search_rank: String
"Operator associated with this agency"
operator: Operator
"Places associated with this agency through a matching process"
places(limit: Int, where: AgencyPlaceFilter): [AgencyPlace!]
"Routes associated with this agency"
routes(limit: Int, where: RouteFilter): [Route!]!
"Census geographies associated with this agency"
census_geographies(limit: Int, where: CensusGeographyFilter): [CensusGeography!]
"GTFS-RT alerts for this agency"
alerts(active: Boolean, limit: Int): [Alert!]
}
"""Record from a static GTFS [routes.txt](https://gtfs.org/reference/static/#routestxt)"""
type Route {
"Internal integer ID"
id: Int!
"OnestopID for this route"
onestop_id: String
"GTFS routes.route_id"
route_id: String!
"GTFS routes.route_short_name"
route_short_name: String
"GTFS routes.route_long_name"
route_long_name: String
"GTFS routes.route_type"
route_type: Int!
"GTFS routes.route_color"
route_color: Color
"GTFS routes.route_text_color"
route_text_color: Color
"GTFS routes.route_sort_order"
route_sort_order: Int
"GTFS routes.route_url"
route_url: Url
"GTFS routes.route_desc"
route_desc: String
"GTFS routes.continuous_pickup"
continuous_pickup: Int
"GTFS routes.continuous_drop_off"
continuous_drop_off: Int
"Representative geometry for this route"
geometry: Geometry @goField(forceResolver: true)
"Agency associated with this route"
agency: Agency!
"Feed version SHA1 associated with this entity"
feed_version_sha1: String
"Feed OnestopID associated with this entity"
feed_onestop_id: String
"Source feed version for this entity"
feed_version: FeedVersion!
"Search rank: internal"
search_rank: String
"Extended route attributes, based on MTC GTFS+ extension"
route_attribute: RouteAttribute
"Trips associated with this route"
trips(limit: Int, where: TripFilter): [Trip!]!
"Stops associated with this route"
stops(limit: Int, where: StopFilter): [Stop!]!
"Stops associated with this route"
route_stops(limit: Int): [RouteStop!]!
"Calculated headways for this route"
headways(limit: Int): [RouteHeadway!]!
"Representative geometries for this route"
geometries(limit: Int): [RouteGeometry!]!
"Census geographies associated with this route"
census_geographies(limit: Int, where: CensusGeographyFilter): [CensusGeography!]
"Calculated spatial buffer geometry around this route"
route_stop_buffer(radius: Float): RouteStopBuffer!
"Stop patterns for this route"
patterns: [RouteStopPattern!]
"GTFS-RT alerts for this route"
alerts(active: Boolean, limit: Int): [Alert!]
"Normalized route segment data for this route, if available"
segments(limit: Int, where: SegmentFilter): [Segment!]
"Normalized route segment patterns for this route, if available"
segment_patterns(limit: Int, where: SegmentPatternFilter): [SegmentPattern!]
}
"""Record from a static GTFS [stops.txt](https://gtfs.org/reference/static/#stopstxt)"""
type Stop {
"Internal integer ID"
id: Int!
"OnestopID for this stop, if available [example:s-dr5ruvgnyk-madisonav~e69st]"
onestop_id: String!
"GTFS stops.location_type; this is optional in GTFS spec [enum:0,1,2,3,4]"
location_type: Int!
"GTFS stops.stop_code"
stop_code: String
"GTFS stops.stop_desc [example:NW Corner of Broadway and 14th]"
stop_desc: String
"GTFS stops.stop_id [example:400029]"
stop_id: String!
"GTFS stops.stop_name [example:MADISON AV/E 68 ST]"
stop_name: String
"GTFS stops.stop_timezone; if overriding agency/route timezone [example:America/Los_Angeles]"
stop_timezone: Timezone
"GTFS stops.stop_url [example:https://www.bart.gov/stations/ftvl]"
stop_url: Url
"GTFS stops.wheelchair_boarding [enum:0,1,2]"
wheelchair_boarding: Int
"GTFS stops.zone_id"
zone_id: String
"GTFS stops.platform_code"
platform_code: String
"GTFS stops.tts_stop_name"
tts_stop_name: String
"Stop geometry"
geometry: Point!
"Feed version SHA1 identifier"
feed_version_sha1: String!
"Feed OnestopID"
feed_onestop_id: String!
"Feed version"
feed_version: FeedVersion!
"Stop level"
level: Level
"Stop parent station"
parent: Stop
"Stop external reference"
external_reference: StopExternalReference
"Stop observations"
observations(limit: Int, where: StopObservationFilter): [StopObservation!]
"Stop children"
children(limit: Int): [Stop!]
"Associated routes"
route_stops(limit: Int): [RouteStop!]!
"Dependent levels"
child_levels(limit: Int): [Level!]!
"Pathways from this stop"
pathways_from_stop(limit: Int): [Pathway!]!
"Pathways to this stop"
pathways_to_stop(limit: Int): [Pathway!]!
"Stop times for this stop"
stop_times(limit: Int, where: StopTimeFilter): [StopTime!]!
"Departures from this stop for a given date and time"
departures(limit: Int, where: StopTimeFilter): [StopTime!]!
"Arrivals from this stop for a given date and time"
arrivals(limit: Int, where: StopTimeFilter): [StopTime!]!
"Search Rank: Internal"
search_rank: String
"State/Province associated with this stop"
place: StopPlace
"Census geographies associated with this stop"
census_geographies(limit: Int, where: CensusGeographyFilter): [CensusGeography!]
"Directions from this stop"
directions(to:WaypointInput, from: WaypointInput, mode: StepMode, depart_at: Time): Directions!
"Stops within a specified radius of this stop"
nearby_stops(limit: Int, radius: Float): [Stop!]
"GTFS-RT Alerts for this stop"
alerts(active: Boolean, limit: Int): [Alert!]
}
"""Record from a static GTFS [pathways.txt](https://gtfs.org/reference/static/#pathwaysstxt). Pathways are a graph representation of a subway or train station, with nodes (entrances, platforms, etc) and edges (the pathways). See https://gtfs.org/reference/static/#pathwaystxt"""
type Pathway {
"Internal integer ID"
id: Int!
"GTFS pathways.pathway_id"
pathway_id: String!
"GTFS pathways.pathway_mode"
pathway_mode: Int!
"GTFS pathways.is_bidirectional"
is_bidirectional: Int!
"GTFS pathways.length"
length: Float
"GTFS pathways.traversal_time"
traversal_time: Int
"GTFS pathways.stair_count"
stair_count: Int
"GTFS pathways.max_slope"
max_slope: Float
"GTFS pathways.min_width"
min_width: Float
"GTFS pathways.signposted_ss"
signposted_as: String
"GTFS pathways.reverse_signposted_as"
reverse_signposted_as: String
"Pathway begins at this stop"
from_stop: Stop!
"Pathway ends at this stop"
to_stop: Stop!
}
"""Record from a static GTFS [levels.txt](https://gtfs.org/reference/static/#levelstxt). Levels describes different levels of a station; used in conjunction with pathways."""
type Level {
"Internal integer ID"
id: Int!
"GTFS levels.level_id"
level_id: String!
"GTFS levels.level_index"
level_index: Float!
"GTFS levels.level_name"
level_name: String
"An optional geometry describing the footprint of this level"
geometry: Polygon!
"Stops associated with this level"
stops: [Stop!]
}
"""Record from a static GTFS [trips.txt](https://gtfs.org/schedule/reference/#tripstxt) file optionally enriched with by GTFS Realtime [TripUpdate](https://gtfs.org/reference/realtime/v2/#message-tripupdate) and [Alert](https://gtfs.org/reference/realtime/v2/#message-alert) messages."""
type Trip {
"Internal integer ID"
id: Int!
"GTFS trips.trip_id"
trip_id: String!
"GTFS trips.trip_headsign"
trip_headsign: String
"GTFS trips.trip_short_name"
trip_short_name: String
"GTFS trips.direction_id"
direction_id: Int
"GTFS trips.block_id"
block_id: String
"GTFS trips.wheelchair_accessible"
wheelchair_accessible: Int
"GTFS trips.bikes_allowed"
bikes_allowed: Int
"Calculated stop pattern ID; an integer scoped to the feed version"
stop_pattern_id: Int!
"Calendar for this trip"
calendar: Calendar!
"Route for this trip"
route: Route!
"Shape for this trip"
shape: Shape
"Feed version for this entity"
feed_version: FeedVersion!
"Stop times for this trip"
stop_times(limit: Int, where: TripStopTimeFilter): [StopTime]!
"Frequencies for this trip"
frequencies(limit: Int): [Frequency!]!
"GTFS-RT alerts for this trip"
alerts(active: Boolean, limit: Int): [Alert!]
"""A status flag for real-time information about this trip.
If no real-time information is available, the value will be STATIC and the estimated arrival/departure times will be empty. A trip with real-time information available will be SCHEDULED; a canceled trip will be CANCELED, and an added trip that is not present in the static GTFS will be ADDED.
"""
schedule_relationship: ScheduleRelationship
"GTFS-RT TripUpdate timestamp"
timestamp: Time
}
"""Record from a static GTFS [calendars.txt](https://gtfs.org/schedule/reference/#calendarstxt) file, plus associated [calendar_dates.txt](https://gtfs.org/schedule/reference/#calendar_datestxt)."""
type Calendar {
"Internal integer ID"
id: Int!
"GTFS calendar.service_id"
service_id: String!
"GTFS calendar.start_date"
start_date: Date!
"GTFS calendar.end_date"
end_date: Date!
"GTFS calendar.monday"
monday: Int!
"GTFS calendar.tuesday"
tuesday: Int!
"GTFS calendar.wednesday"
wednesday: Int!
"GTFS calendar.thursday"
thursday: Int!
"GTFS calendar.friday"
friday: Int!
"GTFS calendar.saturday"
saturday: Int!
"GTFS calendar.sunday"
sunday: Int!
"Added dates, derived from GTFS calendar_dates"
added_dates(limit: Int): [Date!]!
"Removed dates, derived from GTFS calendar_dates"
removed_dates(limit: Int): [Date!]!
}
"""Record from a static GTFS [shapes.txt](https://gtfs.org/schedule/reference/#shapestxt) file."""
type Shape {
"Internal integer ID"
id: Int!
"GTFS shapes.shape_id"
shape_id: String!
"Geometry for this shape"
geometry: LineString!
"Was this geometry automatically generated from stop locations?"
generated: Boolean!
}
"""Record from a static GTFS [frequencies.txt](https://gtfs.org/schedule/reference/#frequenciestxt) file."""
type Frequency {
"Internal integer ID"
id: Int!
"GTFS frequencies.start_time"
start_time: Seconds!
"GTFS frequencies.end_time"
end_time: Seconds!
"GTFS frequencies.headway_secs"
headway_secs: Int!
"GTFS frequencies.exact_times"
exact_times: Int
}
"""Record from a static GTFS [stop_times.txt](https://gtfs.org/schedule/reference/#stop_timestxt) file."""
type StopTime {
"GTFS stop_times.arrival_time"
arrival_time: Seconds
"GTFS stop_times.departure_time"
departure_time: Seconds
"GTFS stop_times.stop_sequence"
stop_sequence: Int!
"GTFS stop_times.stop_headsign"
stop_headsign: String
"GTFS stop_times.pickup_type"
pickup_type: Int
"GTFS stop_times.drop_off_type"
drop_off_type: Int
"GTFS stop_times.timepoint"
timepoint: Int
"GTFS stop_times.continuous_drop_off"
continuous_drop_off: Int
"GTFS stop_times.continuous_pickup"
continuous_pickup: Int
"GTFS stop_times.shape_dist_traveled"
shape_dist_traveled: Float
"Set if this arrival/departure time was interpolated during import"
interpolated: Int
"Stop associated with this stop time"
stop: Stop!
"Trip associated with this stop time"
trip: Trip!
"Detailed arrival information, including GTFS-RT updates and estimates"
arrival: StopTimeEvent!
"Detailed departure information, including GTFS-RT updates and estimates"
departure: StopTimeEvent!
"If part of an arrival/departure query, the GTFS service date for this scheduled stop time"
service_date: Date
"If part of an arrival/departure query, the calendar date for this scheduled stop time"
date: Date
"""A status flag for real-time information about this trip.
If no real-time information is available, the value will be STATIC and the estimated arrival/departure times will be empty. A trip with real-time information available will be SCHEDULED; a canceled trip will be CANCELED, and an added trip that is not present in the static GTFS will be ADDED.
"""
schedule_relationship: ScheduleRelationship
}
"""Record from a static GTFS [feed_info.txt](https://gtfs.org/schedule/reference/#feed_infotxt) file."""
type FeedInfo {
"Internal integer ID"
id: Int!
"GTFS feed_info.feed_publisher_name"
feed_publisher_name: String!
"GTFS feed_info.feed_publisher_url"
feed_publisher_url: Url!
"GTFS feed_info.feed_lang"
feed_lang: Language!
"GTFS feed_info.default_lang"
default_lang: Language
"GTFS feed_info.feed_version"
feed_version: String
"GTFS feed_info.feed_start_date"
feed_start_date: Date
"GTFS feed_info.feed_end_date"
feed_end_date: Date
"GTFS feed_info.feed_contact_email"
feed_contact_email: Email
"GTFS feed_info.feed_contact_url"
feed_contact_url: Url
}
# Archived observed stop-times
"""Measurements of observed arrival times based on GTFS-RT data"""
type StopObservation {
"GTFS-RT TripUpdate schedule relationship"
schedule_relationship: String
"GTFS-RT TripUpdate trip start date"
trip_start_date: Date
"GTFS-RT TripUpdate trip start time"
trip_start_time: Seconds
"GTFS static origin stop id"
from_stop_id: String
"GTFS static destination stop id"
to_stop_id: String
"Agency ID for route"
agency_id: String
"Route ID for trip"
route_id: String
"Trip ID"
trip_id: String
"Stop sequence for origin stop"
stop_sequence: Int
"Source data used to calculate this stop observation. Can be trip update or vehicle positions."
source: String
"GTFS static scheduled arrival time"
scheduled_arrival_time: Seconds
"GTFS static scheduled departure time"
scheduled_departure_time: Seconds
"GTFS-RT calculated arrival time"
observed_arrival_time: Seconds
"GTFS-RT calculated departure time"
observed_departure_time: Seconds
}
# GTFS Support Entities
"""Additional metadata for a stop to reference an externally defined stop"""
type StopExternalReference {
"Internal integer ID"
id: Int!
"Target stop's feed OnestopID"
target_feed_onestop_id: String
"Target stop's stop_id"
target_stop_id: String
"Is this reference active"
inactive: Boolean
"Resolved target stop, if matched and available"
target_active_stop: Stop
}
"""Place associated with a stop"""
type StopPlace {
"Best-matched state or province name"
adm1_name: String
"Best-matched state or province ISO code"
adm1_iso: String
"Best-matched country name"
adm0_name: String
"Best-mached country ISO code"
adm0_iso: String
}
"""Place associated with an agency"""
type AgencyPlace {
"Best-matched city name"
city_name: String
"Best-matched state or province name"
adm1_name: String
"Best-matched state or province ISO code"
adm1_iso: String
"Best-matched country name"
adm0_name: String
"Best-mached country ISO code"
adm0_iso: String
"Relative weight of this place association"
rank: Float
}
"""Place name and associated operators"""
type Place {
"Country name"
adm0_name: String
"State or province name"
adm1_name: String
"City name"
city_name: String
"Number of associated operators"
count: Int!
"Operators associated with this place"
operators: [Operator!]
}
"""RelativeDate specifies a calendar date relative to the current local time"""
enum RelativeDate {
"The current date"
TODAY
"Next Monday, or today if it is currently Monday"
MONDAY
"Next Tuesday, or today if it is currently Tuesday"
TUESDAY
"Next Wednesday, or today if it is currently Wednesday"
WEDNESDAY
"Next Thursday, or today if it is currently Thursday"
THURSDAY
"Next Friday, or today if it is currently Friday"
FRIDAY
"Next Saturday, or today if it is currently Saturday"
SATURDAY
"Next Sunday, or today if it is currently Sunday"
SUNDAY
"Next Monday, not inclusive of today"
NEXT_MONDAY
"Next Tuesday, not inclusive of today"
NEXT_TUESDAY
"Next Wednesday, not inclusive of today"
NEXT_WEDNESDAY
"Next Thursday, not inclusive of today"
NEXT_THURSDAY
"Next Friday, not inclusive of today"
NEXT_FRIDAY
"Next Saturday, not inclusive of today"
NEXT_SATURDAY
"Next Sunday, not inclusive of today"
NEXT_SUNDAY
}
"""PlaceAggregationLevel controls the level of aggregation in a places query"""
enum PlaceAggregationLevel {
"Aggregate places based on country"
ADM0
"Aggregate places based on country and state/province"
ADM0_ADM1
"Aggregate places based on country, state/province, and city"
ADM0_ADM1_CITY
"Aggregate places based on country and city"
ADM0_CITY
"Aggregate places based on state/province and city"
ADM1_CITY
"Aggregate places based on city"
CITY
}
"""RouteStops describe associations between stops, routes, and agencies."""
type RouteStop {
"Internal integer ID"
id: Int!
"Internal integer ID for this associated stop"
stop_id: Int!
"Internal integer ID for this associated route"
route_id: Int!
"Internal integer ID for this associated agency"
agency_id: Int!