-
Notifications
You must be signed in to change notification settings - Fork 3
/
schema.api.graphql
94 lines (77 loc) · 1.79 KB
/
schema.api.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
input WorkingDayConfigInput {
mon: Boolean
tue: Boolean
wed: Boolean
thu: Boolean
fri: Boolean
sat: Boolean
sun: Boolean
startHour: Int
endHour: Int
}
type WorkingDayConfig {
mon: Boolean
tue: Boolean
wed: Boolean
thu: Boolean
fri: Boolean
sat: Boolean
sun: Boolean
startHour: Int
endHour: Int
}
type User{
id: String
email: String
hasLink: Boolean
hasSchedule: Boolean
link: String
schedule: WorkingDayConfig
timezone: String
createdOn: AWSDateTime
updatedOn: AWSDateTime
}
type UserEvent{
id: ID!
eventName: String
shortName: String
duration: Int
}
type UserSession{
duration: Int
sessionTime: AWSDateTime
contactName: String
contactEmail: String
userTimezone: String
message: String
}
type UserSessionConnection{
nextToken: String
sessions: [UserSession]!
}
type UserEventConnection{
nextToken: String
events: [UserEvent]!
}
type Mutation{
setUserLink(link: String!): Boolean
@aws_auth(cognito_groups: ["User"])
setWorkingDays(schedule: WorkingDayConfigInput!): User
@aws_auth(cognito_groups: ["User"])
addEvent(shortName: String!, eventName: String!, duration: Int!): UserEvent
@aws_auth(cognito_groups: ["User"])
addSession(contactName: String, contactEmail: String, duration: Int, sessionTime: AWSDateTime, userTimezone: String, message: String): UserSession
@aws_auth(cognito_groups: ["User"])
}
type Query {
myProfile: User
@aws_auth(cognito_groups: ["User"])
myEvents: UserEventConnection!
@aws_auth(cognito_groups: ["User"])
mySessions(startDate: AWSDate, endDate: AWSDate): UserSessionConnection!
@aws_auth(cognito_groups: ["User"])
}
schema {
query: Query
mutation: Mutation
}