-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.query
53 lines (46 loc) · 817 Bytes
/
schema.query
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
model User {
created_at string
updated_at string
name string
email string
password string
role Role
books Book @ref[]
friend User @ref
favouriteBook Book @ref
}
model Book {
title string
author User @ref
publisher Publisher @ref
tags BookTag @ref[]
metaArrayOfStrings any
}
model BookTag {
name string
books Book @ref[]
}
model Publisher {
name string
books Book @ref[]
}
action user {
getUsers users_return
getUser user_return
viewer User
viewers User[]
logout boolean
login(username string, password string) User
update(email string) User
}
interface users_return {
users User[]
}
interface user_return {
user User
}
enum Role {
USER,
ADMIN,
SUPERUSER,
}