-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
111 lines (94 loc) · 1.92 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
scalar Date
enum BookKind {
REGULAR
AUDIO
MIXED
}
type User {
id: ID!
email: String!
name: String!
hash: String!
salt: String!
shareBooks: Boolean
shareMovies: Boolean
}
type UserStats {
id: ID!
name: String!
shareBooks: Boolean
shareMovies: Boolean
books: Int!
movies: Int!
total: Int!
}
input RegisterData {
name: String!
email: String!
password: String!
}
input SettingsData {
password: String
shareBooks: Boolean
shareMovies: Boolean
}
type Book {
id: ID!
userId: ID!
title: String!
author: String!
mode: BookKind!
completed: Date!
}
type BookInfo {
description: String
thumbnail: String
}
input BookContent {
title: String!
author: String!
mode: BookKind!
completed: Date!
}
type Movie {
id: ID!
userId: ID!
title: String!
year: String!
notes: String
completed: Date!
imdbId: String
}
type MovieInfo {
id: ID!
found: Boolean
plot: String
poster: String
}
input MovieContent {
title: String!
year: String!
notes: String
completed: Date!
imdbId: String
}
type Query {
ping: String
people: [UserStats]
login(name: String, password: String): String
user(id: ID!): User
books(userId: ID!): [Book]
bookInfo(author: String!, title: String!): BookInfo
movies(userId: ID!): [Movie]
movieInfo(id: ID!): MovieInfo
}
type Mutation {
register(captchaToken: String!, registerData: RegisterData!): String
updateUser(id: ID!, settings: SettingsData!): User
createBook(userId: ID!, bookContent: BookContent!): Book
updateBook(id: ID!, userId: ID!, bookContent: BookContent!): Book
deleteBook(id: ID!, userId: ID!): Book
createMovie(userId: ID!, movieContent: MovieContent!): Movie
updateMovie(id: ID!, userId: ID!, movieContent: MovieContent!): Movie
deleteMovie(id: ID!, userId: ID!): Movie
}