Update Kitsu GraphQL Mutations
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good

This commit is contained in:
Timothy Warren 2020-08-17 10:24:17 -04:00
parent e7e70a1541
commit f3b7e58ee1
5 changed files with 58 additions and 48 deletions

View File

@ -7,13 +7,15 @@ mutation (
$mediaType: media_type!, $mediaType: media_type!,
$status: MediaListStatus, $status: MediaListStatus,
) { ) {
createLibraryEntry (input: { libraryEntry {
userId: $userId create(input: {
mediaId: $id userId: $userId
mediaType: $mediaType mediaId: $id
status: $status mediaType: $mediaType
}) { status: $status
mediaId }) {
status mediaId
status
}
} }
} }

View File

@ -7,21 +7,23 @@ mutation (
$type: media_type!, $type: media_type!,
$status: LibraryEntryStatus!, $status: LibraryEntryStatus!,
) { ) {
createLibraryEntry (input: { libraryEntry {
userId: $userId create(input: {
mediaId: $id userId: $userId
mediaType: $type mediaId: $id
status: $status mediaType: $type
}) { status: $status
libraryEntry { }) {
id libraryEntry {
media {
type
}
user {
id id
media {
type
}
user {
id
}
status
} }
status
} }
} }
} }

View File

@ -1,7 +1,9 @@
mutation ($id: ID!) { mutation ($id: ID!) {
deleteLibraryEntry(input: {id: $id}) { libraryEntry{
libraryEntry { delete(input: {id: $id}) {
id libraryEntry {
id
}
} }
} }
} }

View File

@ -1,9 +1,11 @@
mutation($id: ID!, $progress: Int) { mutation($id: ID!, $progress: Int) {
updateLibraryEntry(input: { id: $id, progress: $progress }) { libraryEntry{
libraryEntry { update(input: { id: $id, progress: $progress }) {
id libraryEntry {
progress id
status progress
status
}
} }
} }
} }

View File

@ -8,25 +8,27 @@ mutation(
$reconsuming: Boolean, $reconsuming: Boolean,
$status: LibraryEntryStatus!, $status: LibraryEntryStatus!,
) { ) {
updateLibraryEntry(input: { libraryEntry{
id: $id, update(input: {
notes: $notes id: $id,
private: $private notes: $notes
progress: $progress private: $private
rating: $ratingTwenty progress: $progress
reconsumeCount: $reconsumeCount rating: $ratingTwenty
reconsuming: $reconsuming reconsumeCount: $reconsumeCount
status: $status reconsuming: $reconsuming
}) { status: $status
libraryEntry { }) {
id libraryEntry {
notes id
private notes
progress private
rating progress
reconsumeCount rating
reconsuming reconsumeCount
status reconsuming
status
}
} }
} }
} }