All in GraphQL #34

Merged
timw4mail merged 87 commits from develop into master 2020-12-01 10:07:49 -05:00
5 changed files with 2070 additions and 2059 deletions
Showing only changes of commit 913f9082ef - Show all commits

View File

@ -4,8 +4,8 @@
mutation (
$userId: ID!
$id: ID!,
$type: media_type!,
$status: LibraryEntryStatus!,
$type: MediaTypeEnum!,
$status: LibraryEntryStatusEnum!,
) {
libraryEntry {
create(input: {

View File

@ -6,7 +6,7 @@ mutation(
$ratingTwenty: Int,
$reconsumeCount: Int!,
$reconsuming: Boolean,
$status: LibraryEntryStatus!,
$status: LibraryEntryStatusEnum!,
) {
libraryEntry{
update(input: {

View File

@ -1,7 +1,7 @@
query (
$slug: String!,
$type: media_type!,
$status: [LibraryEntryStatus!],
$type: MediaTypeEnum!,
$status: [LibraryEntryStatusEnum!],
$after: String
) {
findProfileBySlug(slug: $slug) {

View File

@ -1,4 +1,4 @@
query ($slug: String!, $type: media_type!, $status: [LibraryEntryStatus!]) {
query ($slug: String!, $type: MediaTypeEnum!, $status: [LibraryEntryStatusEnum!]) {
findProfileBySlug(slug: $slug) {
library {
all(first: 1, mediaType: $type, status: $status) {

View File

@ -68,7 +68,7 @@ interface Episodic {
"A media in the Kitsu database"
interface Media {
"The recommended minimum age group for this media"
ageRating: AgeRating
ageRating: AgeRatingEnum
"An explanation of why this received the age rating it did"
ageRatingGuide: String
"The average rating of this media amongst all Kitsu users"
@ -153,7 +153,7 @@ interface Media {
last: Int
): MediaReactionConnection!
"The season this was released in"
season: ReleaseSeason
season: ReleaseSeasonEnum
"Whether the media is Safe-for-Work"
sfw: Boolean!
"The URL-friendly identifier of this media"
@ -172,7 +172,7 @@ interface Media {
"The day that this media first released"
startDate: Date
"The current releasing status of this media"
status: ReleaseStatus!
status: ReleaseStatusEnum!
"Description of when this media is expected to release"
tba: String
"The titles for this media in various locales"
@ -214,10 +214,10 @@ interface WithTimestamps {
}
"Objects which are Favoritable"
union FavoriteItem = Anime | Character | Manga | Person
union FavoriteItemUnion = Anime | Character | Manga | Person
"Objects which are Mappable"
union MappingItem = Anime | Category | Character | Episode | Manga | Person | Producer
union MappingItemUnion = Anime | Category | Character | Episode | Manga | Person | Producer
"A user account on Kitsu"
type Account implements WithTimestamps {
@ -238,13 +238,13 @@ type Account implements WithTimestamps {
"The profile for this account"
profile: Profile!
"Media rating system used for the account"
ratingSystem: RatingSystem!
ratingSystem: RatingSystemEnum!
"Whether Not Safe For Work content is accessible"
sfwFilter: Boolean
"Time zone of the account"
timeZone: String
"Preferred language for media titles"
titleLanguagePreference: TitleLanguagePreference
titleLanguagePreference: TitleLanguagePreferenceEnum
"Twitter account linked to the account"
twitterId: String
updatedAt: ISO8601DateTime!
@ -252,7 +252,7 @@ type Account implements WithTimestamps {
type Anime implements Episodic & Media & WithTimestamps {
"The recommended minimum age group for this media"
ageRating: AgeRating
ageRating: AgeRatingEnum
"An explanation of why this received the age rating it did"
ageRatingGuide: String
"The average rating of this media amongst all Kitsu users"
@ -354,7 +354,7 @@ type Anime implements Episodic & Media & WithTimestamps {
last: Int
): MediaReactionConnection!
"The season this was released in"
season: ReleaseSeason
season: ReleaseSeasonEnum
"Whether the media is Safe-for-Work"
sfw: Boolean!
"The URL-friendly identifier of this media"
@ -373,7 +373,7 @@ type Anime implements Episodic & Media & WithTimestamps {
"The day that this media first released"
startDate: Date
"The current releasing status of this media"
status: ReleaseStatus!
status: ReleaseStatusEnum!
"The stream links."
streamingLinks(
"Returns the elements in the list that come after the specified cursor."
@ -386,7 +386,7 @@ type Anime implements Episodic & Media & WithTimestamps {
last: Int
): StreamingLinkConnection!
"A secondary type for categorizing Anime."
subtype: AnimeSubtype!
subtype: AnimeSubtypeEnum!
"Description of when this media is expected to release"
tba: String
"The titles for this media in various locales"
@ -785,7 +785,7 @@ type Favorite implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The kitsu object that is mapped"
item: FavoriteItem!
item: FavoriteItemUnion!
updatedAt: ISO8601DateTime!
"The user who favorited this item"
user: Profile!
@ -858,8 +858,8 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!,
status: [LibraryEntryStatus!]
mediaType: MediaTypeEnum!,
status: [LibraryEntryStatusEnum!]
): LibraryEntryConnection!
"Library Entries for a specific Media filtered by the completed status"
completed(
@ -871,7 +871,7 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection!
"Library Entries for a specific Media filtered by the current status"
current(
@ -883,7 +883,7 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection!
"Library Entries for a specific Media filtered by the dropped status"
dropped(
@ -895,7 +895,7 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection!
"Library Entries for a specific Media filtered by the on_hold status"
onHold(
@ -907,7 +907,7 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection!
"Library Entries for a specific Media filtered by the planned status"
planned(
@ -919,7 +919,7 @@ type Library {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection!
}
@ -936,7 +936,7 @@ type LibraryEntry implements WithTimestamps {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaTypes: [media_type!] = [ANIME]
mediaTypes: [MediaTypeEnum!] = [ANIME]
): LibraryEventConnection
"When the user finished this media."
finishedAt: ISO8601DateTime
@ -967,7 +967,7 @@ type LibraryEntry implements WithTimestamps {
reconsuming: Boolean!
"When the user started this media."
startedAt: ISO8601DateTime
status: LibraryEntryStatus!
status: LibraryEntryStatusEnum!
updatedAt: ISO8601DateTime!
"The user who created this library entry."
user: Profile!
@ -1113,7 +1113,7 @@ type LibraryEvent implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"The type of library event."
kind: LibraryEventKind!
kind: LibraryEventKindEnum!
"The library entry related to this library event."
libraryEntry: LibraryEntry!
"The media related to this library event."
@ -1145,7 +1145,7 @@ type LibraryEventEdge {
type Manga implements Media & WithTimestamps {
"The recommended minimum age group for this media"
ageRating: AgeRating
ageRating: AgeRatingEnum
"An explanation of why this received the age rating it did"
ageRatingGuide: String
"The average rating of this media amongst all Kitsu users"
@ -1246,7 +1246,7 @@ type Manga implements Media & WithTimestamps {
last: Int
): MediaReactionConnection!
"The season this was released in"
season: ReleaseSeason
season: ReleaseSeasonEnum
"Whether the media is Safe-for-Work"
sfw: Boolean!
"The URL-friendly identifier of this media"
@ -1265,9 +1265,9 @@ type Manga implements Media & WithTimestamps {
"The day that this media first released"
startDate: Date
"The current releasing status of this media"
status: ReleaseStatus!
status: ReleaseStatusEnum!
"A secondary type for categorizing Manga."
subtype: MangaSubtype!
subtype: MangaSubtypeEnum!
"Description of when this media is expected to release"
tba: String
"The titles for this media in various locales"
@ -1333,10 +1333,10 @@ type Mapping implements WithTimestamps {
"The ID of the media from the external site."
externalId: ID!
"The name of the site which kitsu media is being linked from."
externalSite: MappingExternalSite!
externalSite: MappingExternalSiteEnum!
id: ID!
"The kitsu object that is mapped."
item: MappingItem!
item: MappingItemUnion!
updatedAt: ISO8601DateTime!
}
@ -1369,7 +1369,7 @@ type MediaCharacter implements WithTimestamps {
"The media"
media: Media!
"The role this character had in the media"
role: CharacterRole!
role: CharacterRoleEnum!
updatedAt: ISO8601DateTime!
"The voices of this character"
voices(
@ -1689,10 +1689,10 @@ type ProSubscription implements WithTimestamps {
"The account which is subscribed to Pro benefits"
account: Account!
"The billing service used for this subscription"
billingService: RecurringBillingService!
billingService: RecurringBillingServiceEnum!
createdAt: ISO8601DateTime!
"The tier of Pro the account is subscribed to"
tier: ProTier!
tier: ProTierEnum!
updatedAt: ISO8601DateTime!
}
@ -1773,7 +1773,7 @@ type Profile implements WithTimestamps {
before: String,
"Returns the first _n_ elements from the list."
first: Int,
kind: [LibraryEventKind!],
kind: [LibraryEventKindEnum!],
"Returns the last _n_ elements from the list."
last: Int
): LibraryEventConnection!
@ -1808,7 +1808,7 @@ type Profile implements WithTimestamps {
"The message this user has submitted to the Hall of Fame"
proMessage: String
"The PRO level the user currently has"
proTier: ProTier
proTier: ProTierEnum
"Links to the user on other (social media) sites."
siteLinks(
"Returns the elements in the list that come after the specified cursor."
@ -1887,8 +1887,19 @@ type Query {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
status: ReleaseStatus!
status: ReleaseStatusEnum!
): AnimeConnection
"All Categories in the Kitsu Database"
categories(
"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
): CategoryConnection
"Kitsu account details. You must supply an Authorization token in header."
currentAccount: Account
"Find a single Anime by ID"
@ -1942,7 +1953,7 @@ type Query {
"Returns the last _n_ elements from the list."
last: Int,
mediaId: ID!,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection
"List of Library Entries by MediaType"
libraryEntriesByMediaType(
@ -1954,7 +1965,7 @@ type Query {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
mediaType: MediaTypeEnum!
): LibraryEntryConnection
"List trending media within your network"
localTrending(
@ -1969,7 +1980,7 @@ type Query {
medium: String!
): MediaConnection!
"Find a specific Mapping Item by External ID and External Site."
lookupMapping(externalId: ID!, externalSite: MappingExternalSite!): MappingItem
lookupMapping(externalId: ID!, externalSite: MappingExternalSiteEnum!): MappingItemUnion
"All Manga in the Kitsu database"
manga(
"Returns the elements in the list that come after the specified cursor."
@ -1991,7 +2002,7 @@ type Query {
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
status: ReleaseStatus!
status: ReleaseStatusEnum!
): MangaConnection
"Patrons sorted by a Proprietary Magic Algorithm"
patrons(
@ -2289,7 +2300,7 @@ type Volume implements WithTimestamps {
updatedAt: ISO8601DateTime!
}
enum AgeRating {
enum AgeRatingEnum {
"Acceptable for all ages"
G
"Parental guidance suggested; should be safe for preteens and older"
@ -2300,7 +2311,7 @@ enum AgeRating {
R18
}
enum AnimeSubtype {
enum AnimeSubtypeEnum {
MOVIE
MUSIC
"Original Net Animation (Web Anime)."
@ -2312,7 +2323,7 @@ enum AnimeSubtype {
TV
}
enum CharacterRole {
enum CharacterRoleEnum {
"A background character who generally only appears in a few episodes"
BACKGROUND
"A character from a different franchise making a (usually brief) appearance"
@ -2323,7 +2334,7 @@ enum CharacterRole {
RECURRING
}
enum LibraryEntryStatus {
enum LibraryEntryStatusEnum {
"The user completed this media."
COMPLETED
"The user is currently reading or watching this media."
@ -2336,7 +2347,7 @@ enum LibraryEntryStatus {
PLANNED
}
enum LibraryEventKind {
enum LibraryEventKindEnum {
"Notes were added/updated."
ANNOTATED
"Progress or Time Spent was added/updated."
@ -2349,7 +2360,7 @@ enum LibraryEventKind {
UPDATED
}
enum MangaSubtype {
enum MangaSubtypeEnum {
"Self published work."
DOUJIN
MANGA
@ -2363,7 +2374,7 @@ enum MangaSubtype {
ONESHOT
}
enum MappingExternalSite {
enum MappingExternalSiteEnum {
ANIDB
ANILIST_ANIME
ANILIST_MANGA
@ -2384,7 +2395,13 @@ enum MappingExternalSite {
TRAKT
}
enum ProTier {
"これはアニメやマンガです"
enum MediaTypeEnum {
ANIME
MANGA
}
enum ProTierEnum {
"Aozora Pro (only hides ads)"
AO_PRO @deprecated(reason : "No longer for sale")
"Aozora Pro+ (only hides ads)"
@ -2395,7 +2412,7 @@ enum ProTier {
PRO
}
enum RatingSystem {
enum RatingSystemEnum {
"1-20 in increments of 1 displayed as 1-10 in 0.5 increments"
ADVANCED
"1-20 in increments of 2 displayed as 5 stars in 0.5 star increments"
@ -2404,7 +2421,7 @@ enum RatingSystem {
SIMPLE
}
enum RecurringBillingService {
enum RecurringBillingServiceEnum {
"Billed through Apple In-App Subscription"
APPLE
"Billed through Google Play Subscription"
@ -2415,7 +2432,7 @@ enum RecurringBillingService {
STRIPE
}
enum ReleaseSeason {
enum ReleaseSeasonEnum {
"Released during the Fall season"
FALL
"Released during the Spring season"
@ -2426,7 +2443,7 @@ enum ReleaseSeason {
WINTER
}
enum ReleaseStatus {
enum ReleaseStatusEnum {
"This media is currently releasing"
CURRENT
"This media is no longer releasing"
@ -2439,7 +2456,7 @@ enum ReleaseStatus {
UPCOMING
}
enum TitleLanguagePreference {
enum TitleLanguagePreferenceEnum {
"Prefer the most commonly-used title for media"
CANONICAL
"Prefer the localized title for media"
@ -2448,14 +2465,8 @@ enum TitleLanguagePreference {
ROMANIZED
}
"これはアニメやマンガです"
enum media_type {
ANIME
MANGA
}
input AnimeCreateInput {
ageRating: AgeRating
ageRating: AgeRatingEnum
ageRatingGuide: String
bannerImage: Upload
description: Map!
@ -2470,7 +2481,7 @@ input AnimeCreateInput {
}
input AnimeUpdateInput {
ageRating: AgeRating
ageRating: AgeRatingEnum
ageRatingGuide: String
bannerImage: Upload
description: Map
@ -2489,7 +2500,7 @@ input EpisodeCreateInput {
description: Map
length: Int
mediaId: ID!
mediaType: media_type!
mediaType: MediaTypeEnum!
number: Int!
releasedAt: Date
thumbnailImage: Upload
@ -2513,7 +2524,7 @@ input GenericDeleteInput {
input LibraryEntryCreateInput {
finishedAt: ISO8601DateTime
mediaId: ID!
mediaType: media_type!
mediaType: MediaTypeEnum!
notes: String
private: Boolean = false
progress: Int = 0
@ -2521,7 +2532,7 @@ input LibraryEntryCreateInput {
reconsumeCount: Int = 0
reconsuming: Boolean = false
startedAt: ISO8601DateTime
status: LibraryEntryStatus!
status: LibraryEntryStatusEnum!
userId: ID!
volumesOwned: Int = 0
}
@ -2536,7 +2547,7 @@ input LibraryEntryUpdateInput {
reconsumeCount: Int
reconsuming: Boolean
startedAt: ISO8601DateTime
status: LibraryEntryStatus
status: LibraryEntryStatusEnum
volumesOwned: Int
}
@ -2553,7 +2564,7 @@ input UpdateProgressByIdInput {
input UpdateProgressByMediaInput {
mediaId: ID!
mediaType: media_type!
mediaType: MediaTypeEnum!
progress: Int!
}
@ -2565,20 +2576,20 @@ input UpdateRatingByIdInput {
input UpdateRatingByMediaInput {
mediaId: ID!
mediaType: media_type!
mediaType: MediaTypeEnum!
"A number between 2 - 20"
rating: Int!
}
input UpdateStatusByIdInput {
id: ID!
status: LibraryEntryStatus!
status: LibraryEntryStatusEnum!
}
input UpdateStatusByMediaInput {
mediaId: ID!
mediaType: media_type!
status: LibraryEntryStatus!
mediaType: MediaTypeEnum!
status: LibraryEntryStatusEnum!
}