Files
project-inter-server/schema.graphql
2024-12-21 16:44:53 -08:00

64 lines
980 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!
system: System!
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!
system: System!
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!
system: System!
etas: [ETA!]!
eta(forStopId: ID): ETA
}