Update Kitsu GraphQL schema

This commit is contained in:
Timothy Warren 2023-03-16 22:20:17 -04:00
parent bedd504b64
commit 0e780f26b9

View File

@ -646,6 +646,8 @@ type Chapter implements Unit & WithTimestamps {
"A brief summary or description of the unit" "A brief summary or description of the unit"
description(locales: [String!]): Map! description(locales: [String!]): Map!
id: ID! id: ID!
"Number of pages in chapter."
length: Int
"The manga this chapter is in." "The manga this chapter is in."
manga: Manga! manga: Manga!
"The sequence number of this unit" "The sequence number of this unit"
@ -1924,6 +1926,12 @@ type PostConnection {
totalCount: Int! totalCount: Int!
} }
"Autogenerated return type of PostCreate"
type PostCreatePayload {
errors: [Error!]
post: Post
}
"An edge in a connection." "An edge in a connection."
type PostEdge { type PostEdge {
"A cursor for use in pagination." "A cursor for use in pagination."
@ -1939,6 +1947,11 @@ type PostLockPayload {
} }
type PostMutations { type PostMutations {
"Create a Post."
create(
"Create a Post"
input: PostCreateInput!
): PostCreatePayload
"Lock a Post." "Lock a Post."
lock( lock(
"Lock a Post." "Lock a Post."
@ -2188,6 +2201,19 @@ type ProfileEdge {
node: Profile node: Profile
} }
"An external site that can be linked to a user."
type ProfileLinkSite implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"Name of the external profile website."
name: String!
updatedAt: ISO8601DateTime!
"Regex pattern used to validate the profile link."
validateFind: String!
"Pattern to be replaced after validation."
validateReplace: String!
}
"The different types of user stats that we calculate." "The different types of user stats that we calculate."
type ProfileStats { type ProfileStats {
"The total amount of anime you have watched over your whole life." "The total amount of anime you have watched over your whole life."
@ -2257,6 +2283,8 @@ type Query {
findMangaById(id: ID!): Manga findMangaById(id: ID!): Manga
"Find a single Manga by Slug" "Find a single Manga by Slug"
findMangaBySlug(slug: String!): Manga findMangaBySlug(slug: String!): Manga
"Find a single Media by ID and Type"
findMediaByIdAndType(id: ID!, mediaType: MediaTypeEnum!): Media
"Find a single Person by ID" "Find a single Person by ID"
findPersonById(id: ID!): Person findPersonById(id: ID!): Person
"Find a single Person by Slug" "Find a single Person by Slug"
@ -2645,6 +2673,8 @@ type SiteLink implements WithTimestamps {
author: Profile! author: Profile!
createdAt: ISO8601DateTime! createdAt: ISO8601DateTime!
id: ID! id: ID!
"The actual linked website."
site: ProfileLinkSite!
updatedAt: ISO8601DateTime! updatedAt: ISO8601DateTime!
"A fully qualified URL of the user profile on an external site." "A fully qualified URL of the user profile on an external site."
url: String! url: String!
@ -3457,6 +3487,16 @@ input MediaReactionVoteSortOption {
on: MediaReactionVoteSortEnum! on: MediaReactionVoteSortEnum!
} }
input PostCreateInput {
content: String!
isNsfw: Boolean = false
isSpoiler: Boolean = false
mediaId: ID
mediaType: MediaTypeEnum
spoiledUnitId: ID
spoiledUnitType: String
}
input PostLikeSortOption { input PostLikeSortOption {
direction: SortDirection! direction: SortDirection!
on: PostLikeSortEnum! on: PostLikeSortEnum!