mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
add notification support in schema
This commit is contained in:
@@ -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!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user