-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
376 lines (345 loc) · 7.12 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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
type Business {
id: ID!
userId: ID!
user: User
employees(first: Int, after: String): EmployeeConnection
name: String!
cif: String
date: String
address: String
phone: String
email: String
web: String
image: String
}
type BusinessConnection {
items: [Business]
nextToken: String
}
input CreateBusinessInput {
id: ID!
userId: ID!
name: String!
cif: String
date: String
address: String
phone: String
email: String
web: String
image: String
}
input CreateEmployeeInput {
id: ID!
businessId: ID!
name: String!
nif: String
address: String
date: String
phone: String
email: String
description: String
image: String
fullSalary: Float
halfSalary: Float
}
input CreateEventInfoInput {
id: ID!
eventId: ID!
eventType: EventType!
allDay: Boolean!
start: String!
end: String!
salary: String!
title: String!
money: Float
works: [String]
}
input CreateEventsInput {
id: ID!
employeeId: ID!
yearId: Int!
pay: [EventDataInput]!
debt: [EventDataInput]!
}
input CreateUserInput {
id: ID!
email: String!
}
input DeleteBusinessInput {
id: ID!
userId: ID!
}
input DeleteEmployeeInput {
id: ID!
businessId: ID!
}
input DeleteEventInfoInput {
id: ID!
eventId: ID!
}
input DeleteEventsInput {
id: ID!
employeeId: ID!
}
input DeleteUserInput {
id: ID!
}
type Employee {
id: ID!
businessId: ID!
name: String!
nif: String
address: String
date: String
phone: String
email: String
description: String
image: String
fullSalary: Float
halfSalary: Float
events: [Events]
}
type EmployeeConnection {
items: [Employee]
nextToken: String
}
type EventData {
allDay: Boolean!
start: String!
end: String!
salary: String!
title: String!
money: Float
works: [String]
}
input EventDataInput {
allDay: Boolean!
start: String!
end: String!
salary: String!
title: String!
money: Float
works: [String]
}
type EventInfo {
id: ID!
eventId: ID!
eventType: EventType!
allDay: Boolean!
start: String!
end: String!
salary: String!
title: String!
money: Float
works: [String]
}
type EventInfoConnection {
items: [EventInfo]
nextToken: String
}
enum EventType {
PAY
DEBT
}
type Events {
id: ID!
employeeId: ID!
yearId: Int!
pay: [EventData]!
debt: [EventData]!
}
type EventsConnection {
items: [Events]
nextToken: String
}
type Mutation {
createUser(input: CreateUserInput!): User
updateUser(input: UpdateUserInput!): User
deleteUser(input: DeleteUserInput!): User
createBusiness(input: CreateBusinessInput!): Business
updateBusiness(input: UpdateBusinessInput!): Business
deleteBusiness(input: DeleteBusinessInput!): Business
createEmployee(input: CreateEmployeeInput!): Employee
updateEmployee(input: UpdateEmployeeInput!): Employee
deleteEmployee(input: DeleteEmployeeInput!): Employee
createEvents(input: CreateEventsInput!): Events
updateEvents(input: UpdateEventsInput!): Events
deleteEvents(input: DeleteEventsInput!): Events
createEventInfo(input: CreateEventInfoInput!): EventInfo
updateEventInfo(input: UpdateEventInfoInput!): EventInfo
deleteEventInfo(input: DeleteEventInfoInput!): EventInfo
}
type Query {
getAllUsers: [User]
getUser(id: ID!): User
listUsers(first: Int, after: String): UserConnection
getBusiness(id: ID!, userId: ID!): Business
listBusinesses(first: Int, after: String): BusinessConnection
queryBusinessesByUserIdIndex(
userId: ID!
first: Int
after: String
): BusinessConnection
getEmployee(id: ID!, businessId: ID!): Employee
listEmployees(first: Int, after: String): EmployeeConnection
queryEmployeesByBusinessIdIndex(
businessId: ID!
first: Int
after: String
): EmployeeConnection
getEvents(id: ID!, employeeId: ID!): Events
getEventsByEmployeeIdIndexByYear(
employeeId: ID!
yearId: Int!
): EventsConnection
listEvents(first: Int, after: String): EventsConnection
queryEventsByEmployeeIdIndex(
employeeId: ID!
first: Int
after: String
): EventsConnection
getEventInfo(id: ID!, eventId: ID!): EventInfo
listEventInfos(first: Int, after: String): EventInfoConnection
queryEventInfosByEventIdIndex(
eventId: ID!
first: Int
after: String
): EventInfoConnection
}
type Subscription {
onCreateUser(id: ID, email: String): User
@aws_subscribe(mutations: ["createUser"])
onUpdateUser(id: ID, email: String): User
@aws_subscribe(mutations: ["updateUser"])
onDeleteUser(id: ID, email: String): User
@aws_subscribe(mutations: ["deleteUser"])
onCreateBusiness(
id: ID
userId: ID
name: String
cif: String
date: String
): Business @aws_subscribe(mutations: ["createBusiness"])
onUpdateBusiness(
id: ID
userId: ID
name: String
cif: String
date: String
): Business @aws_subscribe(mutations: ["updateBusiness"])
onDeleteBusiness(
id: ID
userId: ID
name: String
cif: String
date: String
): Business @aws_subscribe(mutations: ["deleteBusiness"])
onCreateEmployee(
id: ID
businessId: ID
name: String
nif: String
address: String
): Employee @aws_subscribe(mutations: ["createEmployee"])
onUpdateEmployee(
id: ID
businessId: ID
name: String
nif: String
address: String
): Employee @aws_subscribe(mutations: ["updateEmployee"])
onDeleteEmployee(
id: ID
businessId: ID
name: String
nif: String
address: String
): Employee @aws_subscribe(mutations: ["deleteEmployee"])
onCreateEvents(id: ID, employeeId: ID): Events
@aws_subscribe(mutations: ["createEvents"])
onUpdateEvents(id: ID, employeeId: ID): Events
@aws_subscribe(mutations: ["updateEvents"])
onDeleteEvents(id: ID, employeeId: ID): Events
@aws_subscribe(mutations: ["deleteEvents"])
onCreateEventInfo(
id: ID
eventId: ID
allDay: Boolean
start: String
end: String
): EventInfo @aws_subscribe(mutations: ["createEventInfo"])
onUpdateEventInfo(
id: ID
eventId: ID
allDay: Boolean
start: String
end: String
): EventInfo @aws_subscribe(mutations: ["updateEventInfo"])
onDeleteEventInfo(
id: ID
eventId: ID
allDay: Boolean
start: String
end: String
): EventInfo @aws_subscribe(mutations: ["deleteEventInfo"])
}
input UpdateBusinessInput {
id: ID!
userId: ID!
name: String
cif: String
date: String
address: String
phone: String
email: String
web: String
image: String
}
input UpdateEmployeeInput {
id: ID!
businessId: ID!
name: String
nif: String
address: String
date: String
phone: String
email: String
description: String
image: String
fullSalary: Float
halfSalary: Float
}
input UpdateEventInfoInput {
id: ID!
eventId: ID!
allDay: Boolean
start: String
end: String
salary: String
title: String
money: Float
works: [String]
}
input UpdateEventsInput {
id: ID!
employeeId: ID!
yearId: Int!
pay: [EventDataInput]!
debt: [EventDataInput]!
}
input UpdateUserInput {
id: ID!
email: String
}
type User {
id: ID!
email: String!
business(first: Int, after: String): BusinessConnection
}
type UserConnection {
items: [User]
nextToken: String
}
type schema {
query: Query
}