mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
61 lines
917 B
GraphQL
61 lines
917 B
GraphQL
type Query {
|
|
systems: [System!]!
|
|
system(id: ID): System
|
|
}
|
|
|
|
type System {
|
|
id: ID!
|
|
name: String!
|
|
routes: [Route!]
|
|
route(id: ID): Route
|
|
stops: [Stop!]
|
|
stop(id: ID): Stop
|
|
shuttles: [Shuttle!]
|
|
shuttle(id: ID): Shuttle
|
|
}
|
|
|
|
type Route {
|
|
name: String!
|
|
id: ID!
|
|
orderedStops: [OrderedStop!]
|
|
nextOrderedStop(forStopId: ID): OrderedStop
|
|
shuttles: [Shuttle!]
|
|
polylineCoordinates: [Coordinates!]!
|
|
color: String!
|
|
}
|
|
|
|
type OrderedStop {
|
|
nextStop: OrderedStop
|
|
previousStop: OrderedStop
|
|
route: Route!
|
|
stop: Stop!
|
|
}
|
|
|
|
type Stop {
|
|
id: ID!
|
|
name: String!
|
|
coordinates: Coordinates!
|
|
etas: [ETA!]
|
|
orderedStops: [OrderedStop!]
|
|
}
|
|
|
|
type Coordinates {
|
|
latitude: Float!
|
|
longitude: Float!
|
|
}
|
|
|
|
type ETA {
|
|
stop: Stop!
|
|
shuttle: Shuttle!
|
|
secondsRemaining: Float!
|
|
}
|
|
|
|
type Shuttle {
|
|
name: String!
|
|
id: ID!,
|
|
coordinates: Coordinates!
|
|
route: Route
|
|
etas: [ETA!]
|
|
eta(forStopId: ID): ETA
|
|
}
|