-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
207 lines (189 loc) · 5.02 KB
/
schema.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# This schema is used for wokshop
"""Custom scalar type for emails"""
scalar Email
"""Custom scalar type for date times"""
scalar Datetime
"""This scalar type is used for Url's"""
scalar Url
# In the future we could add new currencies if required
"""Type of currency"""
enum Currency{
"Euro"
Euro
"Dollar"
Dollar
}
"""Type of meetings"""
enum MeetingType {
"Decission making meeting"
decissionMaking
"Brainstorming meeting"
brainstorming
"Planning meeting"
planning
"One to one meeting"
oneToOne
}
"""It contains details for a meeting"""
type Meeting {
"Unique identifier for each room"
id:ID!
"Subject of meeting"
subject:String!
"Type of meeting"
type:MeetingType
"True if meeting has been cancelled"
cancelled:Boolean!
"Room where meeting will take place"
room:Room
"Web conference link for online assistants"
conferenceLink:Url
"When the meeting will take place"
when:Datetime!
"Organizer of the meeting"
organizer:Employee
"List of invitations"
invitations:[MeetingInvitation!]
}
"""It contains details for meeting rooms"""
type Room {
"Unique identifier for each room"
id:ID!
"Max number of people per room"
capacity:Int #Usefull information for choice the mos suitable room
}
"""Invitation for people"""
type MeetingInvitation {
"Invited person to the meeting"
person:Person!
"True if person confirmed assistance"
accepted:Boolean
}
"""Interface with common fields for any person"""
interface Person {
"Firstname of the person"
firstname:String
"Lastname of the person"
lastname:String
"Email of the person"
email:Email!
}
"""It contains fields for employee and the inheritared from Interface Person"""
type Employee implements Person{
"Unique identifier for each employee"
identifier:ID!
"Firstname of the employee"
firstname:String
"Lastname of the employee"
lastname:String
"Email of the employee"
email:Email!
"Salary of employee that can be asked in Euro or Dollar"
salary(currency:Currency=Euro):Float # By default is Euro
}
"""It contains fields for external workers and the inheritared from Interface Person"""
type ExternalWorker implements Person {
"Firstname of the external worker"
firstname:String
"Lastname of the external worker"
lastname:String
"Email of the external worker"
email:Email!
"Name of company of the external worker"
company:String
}
"""Query operations are described here"""
type Query {
listMeetings:[Meeting]
listItems:[Item!]
getMeeting(meetingId:ID):Meeting!
listEmployeesWithSalaryUpper(salary:Float,currency:Currency=Euro):[Employee!]
}
"""Union used to list both Rooms and Meetings in same query"""
union Item = Room | Meeting
"""Mutation oeprations are defined here"""
type Mutation {
"""add a new employee operation"""
addEmployee(employee:EmployeeRequest!):Employee!
"""add a new room operation"""
addRoom(room:RoomRequest):Room!
"""add a new meeting operation"""
addMeeting(meeting:MeetingRequest!):Meeting!
"""send invitation for a meeting"""
sendInvitation(invitation:InvitationRequest!):Meeting!
"""reply invitation for a meeting"""
replyInvitation(invitation:InvitationConfirmationRequest):MeetingInvitation!
"""Delete an existing meeting"""
deleteMeeting(meetingId:ID!):[Meeting!]
}
"""Subscription operations"""
type Subscription {
"""check if a new invitations is responsed"""
checkMeetingInvitations(meetingId:ID!):Meeting!
}
"""Input type used to create a new employee"""
input EmployeeRequest {
"Unique identifier for each employee"
identifier:ID!
"Firstname of the employee"
firstname:String
"Lastname of the employee"
lastname:String
"Email of the employee"
email:Email!
"Salary of employee that can be asked in Euro or Dollar"
salary:Float
}
"""Input type used to create a new room"""
input RoomRequest {
"Unique identifier for each room"
id:ID!
"Max number of people per room"
capacity:Int
}
"""Input type used to create a new meeting"""
input MeetingRequest {
id:ID!
"Subject of meeting"
subject:String!
"Type of meeting"
type:MeetingType
"Room identifier"
roomId:ID
"Web conference link for online assistants"
conferenceLink:Url
"When the meeting will take place"
when:Datetime!
"Organizer of the meeting"
organizerId:ID!
}
input ExternalWorkerRequest {
"Firstname of the external worker"
firstname:String
"Lastname of the external worker"
lastname:String
"Email of the external worker"
email:Email!
"Name of company of the external worker"
company:String
}
"""Input type used to send an invitation"""
input InvitationRequest {
"Identifier for the meeting"
meetingId:ID!
"External worker details"
externalWorker:ExternalWorkerRequest
"Employee identifier"
employeeId:ID
}
"""Input type used to confirm an invitation for a meeting"""
input InvitationConfirmationRequest {
"Identifier for the meeting"
meetingId:ID!
"External worker details"
externalWorker:ExternalWorkerRequest
"Employee identifier"
employeeId:ID
"True if person accept invitation or false in other case"
accepted:Boolean!
}