Update some GraphQL queries

This commit is contained in:
Timothy Warren 2020-08-24 13:09:43 -04:00
parent 7d6af5ad00
commit 40a340c67c
10 changed files with 320 additions and 101 deletions

View File

@ -77,7 +77,7 @@ final class Model
])
->getFullRequest();
$response = $this->getResponseFromRequest($request);
$response = $this->requestBuilder->getResponseFromRequest($request);
return Json::decode(wait($response->getBody()->buffer()));
}

View File

@ -218,7 +218,7 @@ final class RequestBuilder extends APIRequestBuilder {
* @return Response
* @throws Throwable
*/
private function getResponseFromRequest(Request $request): Response
public function getResponseFromRequest(Request $request): Response
{
$logger = $this->container->getLogger('anilist-request');

View File

@ -138,7 +138,7 @@ final class Kitsu {
/**
* Reorganize streaming links
*
* @param array $included
* @param array $nodes
* @return array
*/
public static function parseStreamingLinks(array $nodes): array

View File

@ -72,6 +72,20 @@ trait AnimeTrait {
return $this->animeTransformer->transform($baseData);
}
/**
* Get information about a particular anime
*
* @param string $animeId
* @return Anime
*/
public function getAnimeById(string $animeId): Anime
{
$baseData = $this->requestBuilder->runQuery('AnimeDetailsById', [
'id' => $animeId,
]);
return $this->animeTransformer->transform($baseData);
}
/**
* Retrieve the data for the anime watch history page
*
@ -100,21 +114,6 @@ trait AnimeTrait {
return $list;
}
/**
* Get information about a particular anime
*
* @param string $animeId
* @return Anime
*/
public function getAnimeById(string $animeId): Anime
{
$baseData = $this->requestBuilder->runQuery('AnimeDetailsById', [
'id' => $animeId,
]);
// $baseData = $this->getRawMediaDataById('anime', $animeId);
return $this->animeTransformer->transform($baseData);
}
/**
* Get the anime list for the configured user
*

View File

@ -59,6 +59,12 @@ query ($slug: String!) {
season
sfw
slug
mappings {
nodes {
externalId
externalSite
}
}
staff {
nodes {
person {

View File

@ -59,6 +59,12 @@ query ($id: ID!) {
season
sfw
slug
mappings {
nodes {
externalId
externalSite
}
}
staff {
nodes {
person {

View File

@ -54,6 +54,12 @@ query ($slug: String!) {
description
startDate
endDate
mappings {
nodes {
externalId
externalSite
}
}
posterImage {
original {
height

View File

@ -54,6 +54,12 @@ query ($id: ID!) {
description
startDate
endDate
mappings {
nodes {
externalId
externalSite
}
}
posterImage {
original {
height

View File

@ -17,11 +17,18 @@ query ($slug: String!) {
height
}
}
birthday
id
name
proMessage
proTier
slug
siteLinks {
nodes {
id
url
}
}
stats {
animeAmountConsumed {
completed
@ -31,11 +38,6 @@ query ($slug: String!) {
time
units
}
animeCategoryBreakdown {
categories
recalculatedAt
total
}
mangaAmountConsumed {
completed
id
@ -43,15 +45,11 @@ query ($slug: String!) {
recalculatedAt
units
}
mangaCategoryBreakdown {
categories
recalculatedAt
total
}
}
url
waifu {
id
slug
image {
original {
name
@ -65,16 +63,7 @@ query ($slug: String!) {
alternatives
localized
}
primaryMedia {
slug
titles {
canonical
alternatives
localized
}
}
slug
}
# waifuOrHusbando
waifuOrHusbando
}
}

View File

@ -195,13 +195,35 @@ interface Streamable {
subs: [String!]!
}
"Media units such as episodes or chapters"
interface Unit {
"A brief summary or description of the unit"
description(locales: [String!]): Map!
id: ID!
"The sequence number of this unit"
number: Int!
"A thumbnail image for the unit"
thumbnail: Image
"The titles for this unit in various locales"
titles: TitlesList!
}
interface WithTimestamps {
createdAt: ISO8601DateTime!
updatedAt: ISO8601DateTime!
}
"Objects which are Favoritable"
union FavoriteItem = Anime | Character | Manga | Person
"Objects which are Mappable"
union MappingItem = Anime | Category | Character | Episode | Manga | Person | Producer
"A user account on Kitsu"
type Account {
type Account implements WithTimestamps {
"The country this user resides in"
country: String
createdAt: ISO8601DateTime!
"The email addresses associated with this account"
email: [String!]!
"Facebook account linked to the account"
@ -225,9 +247,10 @@ type Account {
titleLanguagePreference: TitleLanguagePreference
"Twitter account linked to the account"
twitterId: String
updatedAt: ISO8601DateTime!
}
type Anime implements Episodic & Media {
type Anime implements Episodic & Media & WithTimestamps {
"The recommended minimum age group for this media"
ageRating: AgeRating
"An explanation of why this received the age rating it did"
@ -258,6 +281,7 @@ type Anime implements Episodic & Media {
"Returns the last _n_ elements from the list."
last: Int
): MediaCharacterConnection!
createdAt: ISO8601DateTime!
"A brief (mostly spoiler free) summary or description of the media."
description(locales: [String!]): Map!
"the day that this media made its final release"
@ -371,15 +395,17 @@ type Anime implements Episodic & Media {
totalLength: Int
"Anime or Manga."
type: String!
updatedAt: ISO8601DateTime!
"The number of users with this in their library"
userCount: Int
"Video id for a trailer on YouTube"
youtubeTrailerVideoId: String
}
type AnimeAmountConsumed implements AmountConsumed {
type AnimeAmountConsumed implements AmountConsumed & WithTimestamps {
"Total media completed atleast once."
completed: Int!
createdAt: ISO8601DateTime!
id: ID!
"Total amount of media."
media: Int!
@ -391,11 +417,13 @@ type AnimeAmountConsumed implements AmountConsumed {
time: Int!
"Total progress of library including reconsuming."
units: Int!
updatedAt: ISO8601DateTime!
}
type AnimeCategoryBreakdown implements CategoryBreakdown {
type AnimeCategoryBreakdown implements CategoryBreakdown & WithTimestamps {
"A Map of category_id -> count for all categories present on the library entries"
categories: Map!
createdAt: ISO8601DateTime!
id: ID!
"The profile related to the user for this stat."
profile: Profile!
@ -403,6 +431,7 @@ type AnimeCategoryBreakdown implements CategoryBreakdown {
recalculatedAt: ISO8601Date!
"The total amount of library entries."
total: Int!
updatedAt: ISO8601DateTime!
}
"The connection type for Anime."
@ -439,12 +468,13 @@ type AnimeEdge {
node: Anime
}
type AnimeMutation {
type AnimeMutation implements WithTimestamps {
"Create an Anime."
create(
"Create an Anime."
input: AnimeCreateInput!
): AnimeCreatePayload
createdAt: ISO8601DateTime!
"Delete an Anime."
delete(
"Delete an Anime."
@ -455,6 +485,7 @@ type AnimeMutation {
"Update an Anime."
input: AnimeUpdateInput!
): AnimeUpdatePayload
updatedAt: ISO8601DateTime!
}
"Autogenerated return type of AnimeUpdate"
@ -465,7 +496,7 @@ type AnimeUpdatePayload {
}
"Information about a specific Category"
type Category {
type Category implements WithTimestamps {
"The child categories."
children(
"Returns the elements in the list that come after the specified cursor."
@ -477,6 +508,7 @@ type Category {
"Returns the last _n_ elements from the list."
last: Int
): CategoryConnection
createdAt: ISO8601DateTime!
"A brief summary or description of the catgory."
description(locales: [String!]): Map!
id: ID!
@ -488,6 +520,7 @@ type Category {
slug: String!
"The name of the category."
title(locales: [String!]): Map!
updatedAt: ISO8601DateTime!
}
"The connection type for Category."
@ -510,23 +543,25 @@ type CategoryEdge {
node: Category
}
"A single chapter part of a volume."
type Chapter {
"A single chapter of a manga"
type Chapter implements Unit & WithTimestamps {
createdAt: ISO8601DateTime!
"A brief summary or description of the unit"
description(locales: [String!]): Map!
id: ID!
"The manga this chapter is in."
manga: Manga!
"The number of pages in this chapter."
"The sequence number of this unit"
number: Int!
"The date when this chapter was released."
published: ISO8601Date
"A thumbnail image for the chapter."
"When this chapter was released"
releasedAt: ISO8601Date
"A thumbnail image for the unit"
thumbnail: Image
"The titles for this chapter in various locales"
"The titles for this unit in various locales"
titles: TitlesList!
updatedAt: ISO8601DateTime!
"The volume this chapter is in."
volume: Volume
"The volume number this chapter is in."
volumeNumber: Int
}
"The connection type for Chapter."
@ -550,7 +585,8 @@ type ChapterEdge {
}
"Information about a Character in the Kitsu database"
type Character {
type Character implements WithTimestamps {
createdAt: ISO8601DateTime!
"A brief summary or description of the character."
description(locales: [String!]): Map!
id: ID!
@ -573,10 +609,12 @@ type Character {
primaryMedia: Media
"The URL-friendly identifier of this character"
slug: String!
updatedAt: ISO8601DateTime!
}
"Information about a VA (Person) voicing a Character in a Media"
type CharacterVoice {
type CharacterVoice implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The company who hired this voice actor to play this role"
licensor: Producer
@ -586,6 +624,7 @@ type CharacterVoice {
mediaCharacter: MediaCharacter!
"The person who voice acted this role"
person: Person!
updatedAt: ISO8601DateTime!
}
"The connection type for CharacterVoice."
@ -609,13 +648,14 @@ type CharacterVoiceEdge {
}
"A comment on a post"
type Comment {
type Comment implements WithTimestamps {
"The user who created this comment for the parent post."
author: Profile!
"Unmodified content."
content: String!
"Html formatted content."
contentFormatted: String!
createdAt: ISO8601DateTime!
id: ID!
"Users who liked this comment."
likes(
@ -643,6 +683,7 @@ type Comment {
"Returns the last _n_ elements from the list."
last: Int
): CommentConnection!
updatedAt: ISO8601DateTime!
}
"The connection type for Comment."
@ -666,20 +707,24 @@ type CommentEdge {
}
"An Episode of a Media"
type Episode {
"The time when the episode aired"
airedAt: ISO8601DateTime
"A brief summary or description of the episode."
type Episode implements Unit & WithTimestamps {
"The anime this episode is in"
anime: Anime!
createdAt: ISO8601DateTime!
"A brief summary or description of the unit"
description(locales: [String!]): Map!
id: ID!
"The length of the Episode in seconds"
"The length of the episode in seconds"
length: Int
"The sequence number of this episode in the season"
"The sequence number of this unit"
number: Int!
"A thumbnail image for the episode"
"When this episode aired"
releasedAt: ISO8601DateTime
"A thumbnail image for the unit"
thumbnail: Image
"The titles for this episode in various locales"
"The titles for this unit in various locales"
titles: TitlesList!
updatedAt: ISO8601DateTime!
}
"The connection type for Episode."
@ -702,33 +747,72 @@ type EpisodeEdge {
node: Episode
}
type Generic implements Base {
"Favorite media, characters, and people for a user"
type Favorite implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The kitsu object that is mapped"
item: FavoriteItem!
updatedAt: ISO8601DateTime!
"The user who favorited this item"
user: Profile!
}
"The connection type for Favorite."
type FavoriteConnection {
"A list of edges."
edges: [FavoriteEdge]
"A list of nodes."
nodes: [Favorite]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type FavoriteEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Favorite
}
type Generic implements Base & WithTimestamps {
"The error code."
code: String
createdAt: ISO8601DateTime!
"A description of the error"
message: String!
"Which input value this error came from"
path: [String!]
updatedAt: ISO8601DateTime!
}
type GenericDelete {
type GenericDelete implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
updatedAt: ISO8601DateTime!
}
type Image {
type Image implements WithTimestamps {
"A blurhash-encoded version of this image"
blurhash: String
createdAt: ISO8601DateTime!
"The original image"
original: ImageView!
updatedAt: ISO8601DateTime!
"The various generated views of this image"
views(names: [String!]): [ImageView!]!
}
type ImageView {
type ImageView implements WithTimestamps {
createdAt: ISO8601DateTime!
"The height of the image"
height: Int
"The name of this view of the image"
name: String!
updatedAt: ISO8601DateTime!
"The URL of this view of the image"
url: String!
"The width of the image"
@ -736,7 +820,7 @@ type ImageView {
}
"The user library filterable by media_type and status"
type Library {
type Library implements WithTimestamps {
"All Library Entries for a specific Media"
all(
"Returns the elements in the list that come after the specified cursor."
@ -747,7 +831,8 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: media_type!,
status: [LibraryEntryStatus!]
): LibraryEntryConnection!
"Library Entries for a specific Media filtered by the completed status"
completed(
@ -761,6 +846,7 @@ type Library {
last: Int,
mediaType: media_type!
): LibraryEntryConnection!
createdAt: ISO8601DateTime!
"Library Entries for a specific Media filtered by the current status"
current(
"Returns the elements in the list that come after the specified cursor."
@ -809,10 +895,12 @@ type Library {
last: Int,
mediaType: media_type!
): LibraryEntryConnection!
updatedAt: ISO8601DateTime!
}
"Information about a specific media entry for a user"
type LibraryEntry {
type LibraryEntry implements WithTimestamps {
createdAt: ISO8601DateTime!
"History of user actions for this library entry."
events(
"Returns the elements in the list that come after the specified cursor."
@ -828,8 +916,12 @@ type LibraryEntry {
"When the user finished this media."
finishedAt: ISO8601DateTime
id: ID!
"The last unit consumed"
lastUnit: Unit
"The media related to this library entry."
media: Media!
"The next unit to be consumed"
nextUnit: Unit
"Notes left by the profile related to this library entry."
notes: String
"If the media related to the library entry is Not-Safe-for-Work."
@ -851,6 +943,7 @@ type LibraryEntry {
"When the user started this media."
startedAt: ISO8601DateTime
status: LibraryEntryStatus!
updatedAt: ISO8601DateTime!
"The user who created this library entry."
user: Profile!
"Volumes that the profile owns (physically or digital)."
@ -891,22 +984,34 @@ type LibraryEntryEdge {
node: LibraryEntry
}
type LibraryEntryMutation {
"Create a Library Entry."
type LibraryEntryMutation implements WithTimestamps {
"Create a library entry"
create(
"Create a Library Entry"
input: LibraryEntryCreateInput!
): LibraryEntryCreatePayload
"Delete a Library Entry."
createdAt: ISO8601DateTime!
"Delete a library entry"
delete(
"Delete Library Entry"
input: GenericDeleteInput!
): LibraryEntryDeletePayload
"Update a Library Entry."
"Update a library entry"
update(
"Update Library Entry"
input: LibraryEntryUpdateInput!
): LibraryEntryUpdatePayload
"Update a library entry status by id"
updateStatusById(
"Update a library entry status by id"
input: UpdateStatusByIdInput!
): LibraryEntryUpdateStatusByIdPayload
"Update a library entry status by media"
updateStatusByMedia(
"Update a library entry status by media"
input: UpdateStatusByMediaInput!
): LibraryEntryUpdateStatusByMediaPayload
updatedAt: ISO8601DateTime!
}
"Autogenerated return type of LibraryEntryUpdate"
@ -916,10 +1021,25 @@ type LibraryEntryUpdatePayload {
libraryEntry: LibraryEntry
}
"Autogenerated return type of LibraryEntryUpdateStatusById"
type LibraryEntryUpdateStatusByIdPayload {
"Graphql Errors"
errors: [Generic!]
libraryEntry: LibraryEntry
}
"Autogenerated return type of LibraryEntryUpdateStatusByMedia"
type LibraryEntryUpdateStatusByMediaPayload {
"Graphql Errors"
errors: [Generic!]
libraryEntry: LibraryEntry
}
"History of user actions for a library entry."
type LibraryEvent {
type LibraryEvent implements WithTimestamps {
"The data that was changed for this library event."
changedData: Map!
createdAt: ISO8601DateTime!
id: ID!
"The type of library event."
kind: LibraryEventKind!
@ -927,6 +1047,7 @@ type LibraryEvent {
libraryEntry: LibraryEntry!
"The media related to this library event."
media: Media!
updatedAt: ISO8601DateTime!
"The user who created this library event"
user: Profile!
}
@ -951,7 +1072,7 @@ type LibraryEventEdge {
node: LibraryEvent
}
type Manga implements Media {
type Manga implements Media & WithTimestamps {
"The recommended minimum age group for this media"
ageRating: AgeRating
"An explanation of why this received the age rating it did"
@ -997,6 +1118,7 @@ type Manga implements Media {
"Returns the last _n_ elements from the list."
last: Int
): MediaCharacterConnection!
createdAt: ISO8601DateTime!
"A brief (mostly spoiler free) summary or description of the media."
description(locales: [String!]): Map!
"the day that this media made its final release"
@ -1081,15 +1203,17 @@ type Manga implements Media {
titles: TitlesList!
"Anime or Manga."
type: String!
updatedAt: ISO8601DateTime!
"The number of users with this in their library"
userCount: Int
"The number of volumes in this manga."
volumeCount: Int
}
type MangaAmountConsumed implements AmountConsumed {
type MangaAmountConsumed implements AmountConsumed & WithTimestamps {
"Total media completed atleast once."
completed: Int!
createdAt: ISO8601DateTime!
id: ID!
"Total amount of media."
media: Int!
@ -1099,11 +1223,13 @@ type MangaAmountConsumed implements AmountConsumed {
recalculatedAt: ISO8601Date!
"Total progress of library including reconsuming."
units: Int!
updatedAt: ISO8601DateTime!
}
type MangaCategoryBreakdown implements CategoryBreakdown {
type MangaCategoryBreakdown implements CategoryBreakdown & WithTimestamps {
"A Map of category_id -> count for all categories present on the library entries"
categories: Map!
createdAt: ISO8601DateTime!
id: ID!
"The profile related to the user for this stat."
profile: Profile!
@ -1111,6 +1237,7 @@ type MangaCategoryBreakdown implements CategoryBreakdown {
recalculatedAt: ISO8601Date!
"The total amount of library entries."
total: Int!
updatedAt: ISO8601DateTime!
}
"The connection type for Manga."
@ -1134,7 +1261,8 @@ type MangaEdge {
}
"Media Mappings from External Sites (MAL, Anilist, etc..) to Kitsu."
type Mapping {
type Mapping implements WithTimestamps {
createdAt: ISO8601DateTime!
"The ID of the media from the external site."
externalId: ID!
"The name of the site which kitsu media is being linked from."
@ -1142,6 +1270,7 @@ type Mapping {
id: ID!
"The kitsu object that is mapped."
item: MappingItem!
updatedAt: ISO8601DateTime!
}
"The connection type for Mapping."
@ -1165,14 +1294,16 @@ type MappingEdge {
}
"Information about a Character starring in a Media"
type MediaCharacter {
type MediaCharacter implements WithTimestamps {
"The character"
character: Character!
createdAt: ISO8601DateTime!
id: ID!
"The media"
media: Media!
"The role this character had in the media"
role: CharacterRole!
updatedAt: ISO8601DateTime!
"The voices of this character"
voices(
"Returns the elements in the list that come after the specified cursor."
@ -1226,7 +1357,8 @@ type MediaEdge {
}
"The role a company played in the creation or localization of a media"
type MediaProduction {
type MediaProduction implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The media"
media: Media!
@ -1234,6 +1366,7 @@ type MediaProduction {
person: Producer!
"The role this company played"
role: String!
updatedAt: ISO8601DateTime!
}
"The connection type for MediaProduction."
@ -1257,9 +1390,10 @@ type MediaProductionEdge {
}
"A simple review that is 140 characters long expressing how you felt about a media"
type MediaReaction {
type MediaReaction implements WithTimestamps {
"The author who wrote this reaction."
author: Profile!
createdAt: ISO8601DateTime!
id: ID!
"The library entry related to this reaction."
libraryEntry: LibraryEntry!
@ -1280,6 +1414,7 @@ type MediaReaction {
progress: Int!
"The reaction text related to a media."
reaction: String!
updatedAt: ISO8601DateTime!
}
"The connection type for MediaReaction."
@ -1303,7 +1438,8 @@ type MediaReactionEdge {
}
"Information about a person working on an anime"
type MediaStaff {
type MediaStaff implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The media"
media: Media!
@ -1311,6 +1447,7 @@ type MediaStaff {
person: Person!
"The role this person had in the creation of this media"
role: String!
updatedAt: ISO8601DateTime!
}
"The connection type for MediaStaff."
@ -1333,10 +1470,12 @@ type MediaStaffEdge {
node: MediaStaff
}
type Mutation {
type Mutation implements WithTimestamps {
anime: AnimeMutation
createdAt: ISO8601DateTime!
libraryEntry: LibraryEntryMutation
pro: ProMutation!
updatedAt: ISO8601DateTime!
}
"Information about pagination in a connection."
@ -1356,9 +1495,10 @@ type PageInfo {
A Voice Actor, Director, Animator, or other person who works in the creation and\
localization of media
"""
type Person {
type Person implements WithTimestamps {
"The day when this person was born"
birthday: Date
createdAt: ISO8601DateTime!
"A brief biography or description of the person."
description(locales: [String!]): Map!
id: ID!
@ -1370,6 +1510,7 @@ type Person {
names: TitlesList!
"The URL-friendly identifier of this person."
slug: String!
updatedAt: ISO8601DateTime!
"The voice-acting roles this person has had."
voices(
"Returns the elements in the list that come after the specified cursor."
@ -1384,7 +1525,7 @@ type Person {
}
"A post that is visible to your followers and globally in the news-feed."
type Post {
type Post implements WithTimestamps {
"The user who created this post."
author: Profile!
"All comments related to this post."
@ -1402,6 +1543,7 @@ type Post {
content: String!
"Html formatted content."
contentFormatted: String!
createdAt: ISO8601DateTime!
"Users that are watching this post"
follows(
"Returns the elements in the list that come after the specified cursor."
@ -1431,6 +1573,7 @@ type Post {
): ProfileConnection!
"The media tagged in this post."
media: Media
updatedAt: ISO8601DateTime!
}
"The connection type for Post."
@ -1453,7 +1596,8 @@ type PostEdge {
node: Post
}
type ProMutation {
type ProMutation implements WithTimestamps {
createdAt: ISO8601DateTime!
"Set the user's discord tag"
setDiscord(
"Your discord tag (Name#1234)"
@ -1466,27 +1610,32 @@ type ProMutation {
): SetMessagePayload
"End the user's pro subscription"
unsubscribe: UnsubscribePayload
updatedAt: ISO8601DateTime!
}
"A subscription to Kitsu PRO"
type ProSubscription {
type ProSubscription implements WithTimestamps {
"The account which is subscribed to Pro benefits"
account: Account!
"The billing service used for this subscription"
billingService: RecurringBillingService!
createdAt: ISO8601DateTime!
"The tier of Pro the account is subscribed to"
tier: ProTier!
updatedAt: ISO8601DateTime!
}
"A company involved in the creation or localization of media"
type Producer {
type Producer implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The name of this production company"
name: String!
updatedAt: ISO8601DateTime!
}
"A user profile on Kitsu"
type Profile {
type Profile implements WithTimestamps {
"A short biographical blurb about this profile"
about: String
"An avatar image to easily identify this profile"
@ -1506,6 +1655,18 @@ type Profile {
"Returns the last _n_ elements from the list."
last: Int
): CommentConnection!
createdAt: ISO8601DateTime!
"Favorite media, characters, and people"
favorites(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): FavoriteConnection!
"People that follow the user"
followers(
"Returns the elements in the list that come after the specified cursor."
@ -1533,6 +1694,18 @@ type Profile {
id: ID!
"The user library of their media"
library: Library!
"A list of library events for this user"
libraryEvents(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
kind: [LibraryEventKind!],
"Returns the last _n_ elements from the list."
last: Int
): LibraryEventConnection!
"The user's general location"
location: String
"Media reactions written by this user."
@ -1584,6 +1757,7 @@ type Profile {
slug: String
"The different stats we calculate for this user."
stats: ProfileStats!
updatedAt: ISO8601DateTime!
"A fully qualified URL to the profile"
url: String
"The character this profile has declared as their waifu or husbando"
@ -1613,15 +1787,17 @@ type ProfileEdge {
}
"The different types of user stats that we calculate."
type ProfileStats {
type ProfileStats implements WithTimestamps {
"The total amount of anime you have watched over your whole life."
animeAmountConsumed: AnimeAmountConsumed!
"The breakdown of the different categories related to the anime you have completed"
animeCategoryBreakdown: AnimeCategoryBreakdown!
createdAt: ISO8601DateTime!
"The total amount of manga you ahve read over your whole life."
mangaAmountConsumed: MangaAmountConsumed!
"The breakdown of the different categories related to the manga you have completed"
mangaCategoryBreakdown: MangaCategoryBreakdown!
updatedAt: ISO8601DateTime!
}
type Query {
@ -1664,6 +1840,8 @@ type Query {
findCharacterBySlug(slug: String!): Character
"Find a single Library Entry by ID"
findLibraryEntryById(id: ID!): LibraryEntry
"Find a single Library Event by ID"
findLibraryEventById(id: ID!): LibraryEvent
"Find a single Manga by ID"
findMangaById(id: ID!): Manga
"Find a single Manga by Slug"
@ -1766,7 +1944,8 @@ type Query {
}
"A quote from a media"
type Quote {
type Quote implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The lines of the quote"
lines(
@ -1781,6 +1960,7 @@ type Quote {
): QuoteLineConnection!
"The media this quote is excerpted from"
media: Media!
updatedAt: ISO8601DateTime!
}
"The connection type for Quote."
@ -1804,14 +1984,16 @@ type QuoteEdge {
}
"A line in a quote"
type QuoteLine {
type QuoteLine implements WithTimestamps {
"The character who said this line"
character: Character!
"The line that was spoken"
content: String!
createdAt: ISO8601DateTime!
id: ID!
"The quote this line is in"
quote: Quote!
updatedAt: ISO8601DateTime!
}
"The connection type for QuoteLine."
@ -1835,11 +2017,13 @@ type QuoteLineEdge {
}
"Information about a user session"
type Session {
type Session implements WithTimestamps {
"The account associated with this session"
account: Account
createdAt: ISO8601DateTime!
"The profile associated with this session"
profile: Profile
updatedAt: ISO8601DateTime!
}
"Autogenerated return type of SetDiscord"
@ -1857,10 +2041,12 @@ type SetMessagePayload {
}
"A link to a user's profile on an external site."
type SiteLink {
type SiteLink implements WithTimestamps {
"The user profile the site is linked to."
author: Profile!
createdAt: ISO8601DateTime!
id: ID!
updatedAt: ISO8601DateTime!
"A fully qualified URL of the user profile on an external site."
url: String!
}
@ -1886,7 +2072,8 @@ type SiteLinkEdge {
}
"The streaming company."
type Streamer {
type Streamer implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The name of the site that is streaming this media."
siteName: String!
@ -1901,6 +2088,7 @@ type Streamer {
"Returns the last _n_ elements from the list."
last: Int
): StreamingLinkConnection!
updatedAt: ISO8601DateTime!
"Videos of the media being streamed."
videos(
"Returns the elements in the list that come after the specified cursor."
@ -1915,7 +2103,8 @@ type Streamer {
}
"The stream link."
type StreamingLink implements Streamable {
type StreamingLink implements Streamable & WithTimestamps {
createdAt: ISO8601DateTime!
"Spoken language is replaced by language of choice."
dubs: [String!]!
id: ID!
@ -1927,6 +2116,7 @@ type StreamingLink implements Streamable {
streamer: Streamer!
"Languages this is translated to. Usually placed at bottom of media."
subs: [String!]!
updatedAt: ISO8601DateTime!
"Fully qualified URL for the streaming link."
url: String!
}
@ -1951,15 +2141,17 @@ type StreamingLinkEdge {
node: StreamingLink
}
type TitlesList {
type TitlesList implements WithTimestamps {
"A list of additional, alternative, abbreviated, or unofficial titles"
alternatives: [String!]
"The official or de facto international title"
canonical: String
"The locale code that identifies which title is used as the canonical title"
canonicalLocale: String
createdAt: ISO8601DateTime!
"The list of localized titles keyed by locale"
localized(locales: [String!]): Map!
updatedAt: ISO8601DateTime!
}
"Autogenerated return type of Unsubscribe"
@ -1970,7 +2162,8 @@ type UnsubscribePayload {
}
"The media video."
type Video implements Streamable {
type Video implements Streamable & WithTimestamps {
createdAt: ISO8601DateTime!
"Spoken language is replaced by language of choice."
dubs: [String!]!
"The episode of this video"
@ -1982,6 +2175,7 @@ type Video implements Streamable {
streamer: Streamer!
"Languages this is translated to. Usually placed at bottom of media."
subs: [String!]!
updatedAt: ISO8601DateTime!
"The url of the video."
url: String!
}
@ -2007,7 +2201,7 @@ type VideoEdge {
}
"A manga volume which can contain multiple chapters."
type Volume {
type Volume implements WithTimestamps {
"The chapters in this volume."
chapters(
"Returns the elements in the list that come after the specified cursor."
@ -2019,6 +2213,7 @@ type Volume {
"Returns the last _n_ elements from the list."
last: Int
): ChapterConnection
createdAt: ISO8601DateTime!
id: ID!
"The isbn number of this volume."
isbn: [String!]!
@ -2030,6 +2225,7 @@ type Volume {
published: ISO8601Date
"The titles for this chapter in various locales"
titles: TitlesList!
updatedAt: ISO8601DateTime!
}
enum AgeRating {
@ -2268,6 +2464,17 @@ input TitlesListInput {
localized: Map
}
input UpdateStatusByIdInput {
id: ID!
status: LibraryEntryStatus!
}
input UpdateStatusByMediaInput {
mediaId: ID!
mediaType: media_type!
status: LibraryEntryStatus!
}
"A date, expressed as an ISO8601 string"
scalar Date