added mappers, updated models
This commit is contained in:
parent
6ada519e06
commit
a8375b99c2
11 changed files with 306 additions and 120 deletions
|
|
@ -1,8 +1,6 @@
|
|||
scalar Void
|
||||
|
||||
type Query {
|
||||
booksMany: [Book!]!
|
||||
bookOne(id: ID!): Book!
|
||||
identity: Identity!
|
||||
userOne(id: ID!): User!
|
||||
workingMany(input: WorkingManyInput!): WorkingManyOutput!
|
||||
|
|
@ -44,14 +42,6 @@ type User {
|
|||
updatedAt: String!
|
||||
}
|
||||
|
||||
type Book {
|
||||
id: ID!
|
||||
title: String!
|
||||
author: String!
|
||||
}
|
||||
|
||||
input Working
|
||||
|
||||
input PaginationFilterInput {
|
||||
terms: String
|
||||
offset: Int
|
||||
|
|
@ -60,12 +50,18 @@ input PaginationFilterInput {
|
|||
|
||||
input WorkingManyInput {
|
||||
filter: PaginationFilterInput!
|
||||
type: WorkingType!
|
||||
}
|
||||
|
||||
enum WorkingType {
|
||||
book
|
||||
notepad
|
||||
}
|
||||
|
||||
enum WorkingProgressStatus {
|
||||
inProgress
|
||||
frozen
|
||||
finished
|
||||
complete
|
||||
}
|
||||
|
||||
type WorkingManyOutput {
|
||||
|
|
@ -80,35 +76,58 @@ type Working {
|
|||
author: User!
|
||||
createdAt: String!
|
||||
updatedAt: String!
|
||||
type: WorkingType!
|
||||
book: Book
|
||||
notepad: Notepad
|
||||
progressStatus: WorkingProgressStatus!
|
||||
wordsTotal: Int!
|
||||
ratingTotal: Int!
|
||||
chapters: ChapterManyOutput!
|
||||
reviews: ReviewManyOutput!
|
||||
reviewsTotal: Int!
|
||||
}
|
||||
|
||||
type ChapterManyOutput {
|
||||
items: [Chapter!]!
|
||||
total: Int!
|
||||
type Book {
|
||||
id: ID!
|
||||
workingId: ID!
|
||||
createdAt: String!
|
||||
updatedAt: String!
|
||||
wordsTotal: Int!
|
||||
chaptersTotal: Int!
|
||||
}
|
||||
|
||||
type Chapter {
|
||||
type BookChapter {
|
||||
id: ID!
|
||||
title: String!
|
||||
createdAt: String!
|
||||
updatedAt: String!
|
||||
foreword: String!
|
||||
footnote: String!
|
||||
reviewsTotal: Int!
|
||||
}
|
||||
|
||||
type ReviewManyOutput {
|
||||
items: [Review!]!
|
||||
input BookChapterManyInput {
|
||||
filter: PaginationFilterInput!
|
||||
}
|
||||
|
||||
type BookChapterManyOutput {
|
||||
items: [BookChapter!]!
|
||||
total: Int!
|
||||
}
|
||||
|
||||
type Notepad {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
type Review {
|
||||
id: ID!
|
||||
author: User!
|
||||
text: String!
|
||||
ratingTotal: Int!
|
||||
}
|
||||
|
||||
input ReviewManyInput {
|
||||
filter: PaginationFilterInput!
|
||||
}
|
||||
|
||||
type ReviewManyOutput {
|
||||
items: [Review!]!
|
||||
total: Int!
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue