114 lines
1.6 KiB
GraphQL
114 lines
1.6 KiB
GraphQL
scalar Void
|
|
|
|
type Query {
|
|
booksMany: [Book!]!
|
|
bookOne(id: ID!): Book!
|
|
identity: Identity!
|
|
userOne(id: ID!): User!
|
|
workingMany(input: WorkingManyInput!): WorkingManyOutput!
|
|
}
|
|
|
|
type Mutation {
|
|
signUp(input: SignUpInput!): Void
|
|
login(input: LoginInput!): Session!
|
|
logout: Void
|
|
}
|
|
|
|
input SignUpInput {
|
|
email: String!
|
|
username: String!
|
|
password: String!
|
|
}
|
|
|
|
input LoginInput {
|
|
email: String!
|
|
password: String!
|
|
}
|
|
|
|
type Session {
|
|
userId: ID!
|
|
accessToken: String!
|
|
}
|
|
|
|
type Identity {
|
|
id: ID!
|
|
email: String!
|
|
isDarkTheme: Boolean!
|
|
user: User!
|
|
}
|
|
|
|
type User {
|
|
id: ID!
|
|
username: String!
|
|
createdAt: String!
|
|
updatedAt: String!
|
|
}
|
|
|
|
type Book {
|
|
id: ID!
|
|
title: String!
|
|
author: String!
|
|
}
|
|
|
|
input Working
|
|
|
|
input PaginationFilterInput {
|
|
terms: String
|
|
offset: Int
|
|
size: Int
|
|
}
|
|
|
|
input WorkingManyInput {
|
|
filter: PaginationFilterInput!
|
|
}
|
|
|
|
enum WorkingProgressStatus {
|
|
inProgress
|
|
frozen
|
|
finished
|
|
}
|
|
|
|
type WorkingManyOutput {
|
|
items: [Working!]!
|
|
total: Int!
|
|
}
|
|
|
|
type Working {
|
|
id: ID!
|
|
title: String!
|
|
description: String!
|
|
author: User!
|
|
createdAt: String!
|
|
updatedAt: String!
|
|
progressStatus: WorkingProgressStatus!
|
|
wordsTotal: Int!
|
|
ratingTotal: Int!
|
|
chapters: ChapterManyOutput!
|
|
reviews: ReviewManyOutput!
|
|
}
|
|
|
|
type ChapterManyOutput {
|
|
items: [Chapter!]!
|
|
total: Int!
|
|
}
|
|
|
|
type Chapter {
|
|
id: ID!
|
|
title: String!
|
|
createdAt: String!
|
|
updatedAt: String!
|
|
foreword: String!
|
|
footnote: String!
|
|
}
|
|
|
|
type ReviewManyOutput {
|
|
items: [Review!]!
|
|
total: Int!
|
|
}
|
|
|
|
type Review {
|
|
id: ID!
|
|
author: User!
|
|
text: String!
|
|
ratingTotal: Int!
|
|
}
|