mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
add notification support in schema
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -9,7 +9,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/server": "^4.11.2",
|
"@apollo/server": "^4.11.2",
|
||||||
"@types/jsonwebtoken": "^9.0.8",
|
|
||||||
"graphql": "^16.10.0",
|
"graphql": "^16.10.0",
|
||||||
"jsonwebtoken": "^9.0.2"
|
"jsonwebtoken": "^9.0.2"
|
||||||
},
|
},
|
||||||
@@ -18,6 +17,7 @@
|
|||||||
"@graphql-codegen/typescript": "4.1.2",
|
"@graphql-codegen/typescript": "4.1.2",
|
||||||
"@graphql-codegen/typescript-resolvers": "4.4.1",
|
"@graphql-codegen/typescript-resolvers": "4.4.1",
|
||||||
"@jest/globals": "^29.7.0",
|
"@jest/globals": "^29.7.0",
|
||||||
|
"@types/jsonwebtoken": "^9.0.8",
|
||||||
"@types/node": "^22.10.2",
|
"@types/node": "^22.10.2",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"ts-jest": "^29.2.5",
|
"ts-jest": "^29.2.5",
|
||||||
@@ -3571,6 +3571,7 @@
|
|||||||
"version": "9.0.8",
|
"version": "9.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.8.tgz",
|
||||||
"integrity": "sha512-7fx54m60nLFUVYlxAB1xpe9CBWX2vSrk50Y6ogRJ1v5xxtba7qXTg5BgYDN5dq+yuQQ9HaVlHJyAAt1/mxryFg==",
|
"integrity": "sha512-7fx54m60nLFUVYlxAB1xpe9CBWX2vSrk50Y6ogRJ1v5xxtba7qXTg5BgYDN5dq+yuQQ9HaVlHJyAAt1/mxryFg==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/ms": "*",
|
"@types/ms": "*",
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
@@ -3589,7 +3590,8 @@
|
|||||||
"node_modules/@types/ms": {
|
"node_modules/@types/ms": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
|
||||||
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="
|
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.10.2",
|
"version": "22.10.2",
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
type Query {
|
# Base types
|
||||||
systems: [System!]!
|
|
||||||
system(id: ID): System
|
|
||||||
}
|
|
||||||
|
|
||||||
type System {
|
type System {
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
@@ -62,3 +58,34 @@ type Shuttle {
|
|||||||
etas: [ETA!]
|
etas: [ETA!]
|
||||||
eta(forStopId: ID): 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