add notification support in schema

This commit is contained in:
2025-02-04 10:27:06 -08:00
parent 82a70ea04e
commit d730937b29
2 changed files with 36 additions and 7 deletions

View File

@@ -1,8 +1,4 @@
type Query {
systems: [System!]!
system(id: ID): System
}
# Base types
type System {
id: ID!
name: String!
@@ -62,3 +58,34 @@ type Shuttle {
etas: [ETA!]
eta(forStopId: ID): ETA
}
# Queries
type Query {
systems: [System!]!
system(id: ID): System
}
# Mutations
type Mutation {
scheduleNotification(input: NotificationInput): NotificationResponse
cancelNotification(input: NotificationInput): NotificationResponse
cancelAllNotifications(deviceId: ID!): NotificationResponse
}
input NotificationInput {
deviceId: ID!
shuttleId: ID!
stopId: ID!
}
type NotificationResponse {
success: Boolean!
message: String!
data: Notification
}
type Notification {
deviceId: ID!
shuttleId: ID!
stopId: ID!
}