implemented identity, updated session, added 'workings' list

added paginated querying, added 'common'
This commit is contained in:
lnn0q 2025-05-17 00:29:55 +03:00
parent 027deba422
commit 6ada519e06
36 changed files with 1422 additions and 279 deletions

View file

@ -3,6 +3,9 @@ scalar Void
type Query {
booksMany: [Book!]!
bookOne(id: ID!): Book!
identity: Identity!
userOne(id: ID!): User!
workingMany(input: WorkingManyInput!): WorkingManyOutput!
}
type Mutation {
@ -23,11 +26,89 @@ input LoginInput {
}
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!
}