added chapter view, fixes, added ratings, added chapter updates/deletions
This commit is contained in:
parent
029b7e9353
commit
4801cf3a13
34 changed files with 1345 additions and 191 deletions
|
|
@ -1,4 +1,5 @@
|
|||
scalar Void
|
||||
scalar JSON
|
||||
|
||||
type Query {
|
||||
identity: Identity!
|
||||
|
|
@ -15,6 +16,13 @@ type Mutation {
|
|||
login(input: LoginInput!): Session!
|
||||
logout: Void
|
||||
bookCreate(input: BookCreateInput!): Book!
|
||||
bookChapterCreate(input: BookChapterCreateInput!): BookChapter!
|
||||
bookChapterUpdate(input: BookChapterUpdateInput!): BookChapter!
|
||||
bookChapterDelete(id: ID!): Book!
|
||||
reviewCreate(input: ReviewCreateInput!): Review!
|
||||
reviewUpdate(input: ReviewUpdateInput!): Review!
|
||||
reviewDelete(id: ID!): Void
|
||||
ratingSet(input: RatingSetInput!): Void
|
||||
}
|
||||
|
||||
input SignUpInput {
|
||||
|
|
@ -43,6 +51,7 @@ type Identity {
|
|||
type User {
|
||||
id: ID!
|
||||
username: String!
|
||||
description: String
|
||||
createdAt: String!
|
||||
updatedAt: String!
|
||||
}
|
||||
|
|
@ -58,13 +67,6 @@ input BookCreateInput {
|
|||
description: String!
|
||||
}
|
||||
|
||||
input BookChapterCreateInput {
|
||||
title: String!
|
||||
content: String!
|
||||
foreword: String
|
||||
footnote: String
|
||||
}
|
||||
|
||||
input BookManyInput {
|
||||
filter: PaginationFilterInput!
|
||||
}
|
||||
|
|
@ -92,6 +94,7 @@ type Book {
|
|||
chaptersTotal: Int!
|
||||
ratingTotal: Int!
|
||||
reviewsTotal: Int!
|
||||
personalRating: RatingType!
|
||||
}
|
||||
|
||||
type BookChapter {
|
||||
|
|
@ -99,10 +102,31 @@ type BookChapter {
|
|||
title: String!
|
||||
createdAt: String!
|
||||
updatedAt: String!
|
||||
foreword: String!
|
||||
footnote: String!
|
||||
foreword: String
|
||||
footnote: String
|
||||
content: JSON!
|
||||
sequenceNumber: Int!
|
||||
reviewsTotal: Int!
|
||||
previousChapterId: String
|
||||
nextChapterId: String
|
||||
book: Book!
|
||||
personalRating: RatingType!
|
||||
}
|
||||
|
||||
input BookChapterCreateInput {
|
||||
bookId: ID!
|
||||
title: String!
|
||||
foreword: String
|
||||
footnote: String
|
||||
content: JSON!
|
||||
}
|
||||
|
||||
input BookChapterUpdateInput {
|
||||
id: ID!
|
||||
title: String!
|
||||
foreword: String
|
||||
footnote: String
|
||||
content: JSON!
|
||||
}
|
||||
|
||||
input BookChapterManyInput {
|
||||
|
|
@ -122,6 +146,17 @@ type Review {
|
|||
ratingTotal: Int!
|
||||
}
|
||||
|
||||
input ReviewCreateInput {
|
||||
bookId: ID
|
||||
chapterId: ID
|
||||
text: String!
|
||||
}
|
||||
|
||||
input ReviewUpdateInput {
|
||||
id: ID!
|
||||
text: String!
|
||||
}
|
||||
|
||||
input ReviewManyInput {
|
||||
bookId: String
|
||||
bookChapterId: String
|
||||
|
|
@ -132,3 +167,15 @@ type ReviewManyOutput {
|
|||
items: [Review!]!
|
||||
total: Int!
|
||||
}
|
||||
|
||||
input RatingSetInput {
|
||||
bookId: String
|
||||
bookChapterId: String
|
||||
ratingType: RatingType!
|
||||
}
|
||||
|
||||
enum RatingType {
|
||||
up
|
||||
down
|
||||
none
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue