-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreading.gql
54 lines (48 loc) · 971 Bytes
/
reading.gql
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
type Books @colletion(name: "books") {
title: String!
subTitle: String
releaseDate: String
coverArt: String
rating: Int
authors: [Author!]
comments: String
featured: Boolean
tags: [Tag]
isbn: String
pageCount: Int
user: String
}
type Tags @collection(name: "tags") {
tagName: String!
}
type Author @embedded {
name: String!
}
type Tag @embedded {
name: String!
}
input AddAuthorToBook {
name: String
}
input AddTagToBook {
name: String
}
input AddBookInput {
title: String!
subTitle: String
releaseDate: String
coverArt: String
rating: Int
authors: [AddAuthorToBook]!
comments: String
featured: Boolean
isbn: String
pageCount: Int
tags: [AddTagToBook]
user: String
}
type Query {
allBooks: [Books!]! @index(name: "all_books")
allTags: [Tags!]! @index(name: "all_tags")
booksByUser(user: String!): [Books] @index(name: "books_by_user")
}