-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
65 lines (60 loc) · 1.47 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
# import * as test from "./generated/prisma.graphql"
type Query {
me: User
person(id: ID!): Person
people(
where: PersonWhereInput,
orderBy: PersonOrderByInput,
skip: Int,
after: String,
before: String,
first: Int,
last: Int
): [Person]
role(id: ID!): Role
roles: [Role]
}
type Mutation {
createPerson(
firstName: String!
lastName: String!
gender: Gender!
birthdate: DateTime!
address: String!
phoneNumber: String
email: String
roleId: ID!
picLarge: String
picMedium: String
picThumbnail: String
): Person
updatePerson(id: ID!, firstName: String!, lastName: String!, gender: Gender!, birthdate:DateTime!,
address: String!, phoneNumber: String, email: String, roleId: ID!): Person
deletePerson(id: ID!): Person
createRole(name: String!, description: String, ratePerHour: Int!): Role
updateRole(id: ID!, name: String, description: String, ratePerHour: Int): Role
deleteRole(id: ID!): Role
signup(email: String!, password: String!): AuthPayload!
login(email: String!, password: String!): AuthPayload!
createDayOfWork(
personId: ID!
date: DateTime!
startTime: DateTime!
endTime: DateTime!
amount: Int!
): DayOfWork
setDayOfWorkPaid(id: ID!): DayOfWork
}
type Subscription {
rolesChanges: RoleSubscriptionPayload
peopleChanges: PersonSubscriptionPayload
}
type AuthPayload {
token: String!
user: User!
}
type User {
id: ID!
email: String!
name: String!
}