aboutsummaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-05-25 22:56:21 +0700
committerGitHub <[email protected]>2023-05-25 22:56:21 +0700
commit8dcb5cb96819547e574d4ca619c54c6f902b8860 (patch)
tree492e9147c106d7ddb7706c7ba2127f6d04ac49ce /queries
parentUpdate videoPlayer.js (diff)
downloadmoopa-8dcb5cb96819547e574d4ca619c54c6f902b8860.tar.xz
moopa-8dcb5cb96819547e574d4ca619c54c6f902b8860.zip
Update v3.6.1
> Added Thumbnail to info page > Temporarily removed Manga from website until the page is finished
Diffstat (limited to 'queries')
-rw-r--r--queries/GET_MEDIA_INFO.js67
-rw-r--r--queries/GET_MEDIA_USER.js52
-rw-r--r--queries/index.js4
3 files changed, 122 insertions, 1 deletions
diff --git a/queries/GET_MEDIA_INFO.js b/queries/GET_MEDIA_INFO.js
new file mode 100644
index 0000000..2664831
--- /dev/null
+++ b/queries/GET_MEDIA_INFO.js
@@ -0,0 +1,67 @@
+export const GET_MEDIA_INFO = `
+query ($id: Int) {
+ Media(id: $id) {
+ id
+ type
+ title {
+ romaji
+ english
+ native
+ }
+ coverImage {
+ extraLarge
+ large
+ color
+ }
+ bannerImage
+ description
+ episodes
+ nextAiringEpisode {
+ episode
+ airingAt
+ }
+ averageScore
+ popularity
+ status
+ startDate {
+ year
+ }
+ duration
+ genres
+ relations {
+ edges {
+ relationType
+ node {
+ id
+ type
+ status
+ title {
+ romaji
+ english
+ userPreferred
+ }
+ coverImage {
+ extraLarge
+ large
+ color
+ }
+ }
+ }
+ }
+ recommendations {
+ nodes {
+ mediaRecommendation {
+ id
+ title {
+ romaji
+ }
+ coverImage {
+ extraLarge
+ large
+ }
+ }
+ }
+ }
+ }
+}
+`;
diff --git a/queries/GET_MEDIA_USER.js b/queries/GET_MEDIA_USER.js
new file mode 100644
index 0000000..c422f56
--- /dev/null
+++ b/queries/GET_MEDIA_USER.js
@@ -0,0 +1,52 @@
+export const GET_MEDIA_USER = `
+query ($username: String, $status: MediaListStatus) {
+ MediaListCollection(userName: $username, type: ANIME, status: $status, sort: SCORE_DESC) {
+ user {
+ id
+ name
+ about (asHtml: true)
+ createdAt
+ avatar {
+ large
+ }
+ statistics {
+ anime {
+ count
+ episodesWatched
+ meanScore
+ minutesWatched
+ }
+ }
+ bannerImage
+ mediaListOptions {
+ animeList {
+ sectionOrder
+ }
+ }
+ }
+ lists {
+ status
+ name
+ entries {
+ id
+ mediaId
+ status
+ progress
+ score
+ media {
+ id
+ status
+ title {
+ english
+ romaji
+ }
+ episodes
+ coverImage {
+ large
+ }
+ }
+ }
+ }
+ }
+ }
+`;
diff --git a/queries/index.js b/queries/index.js
index c93e39f..4cd8580 100644
--- a/queries/index.js
+++ b/queries/index.js
@@ -1,3 +1,5 @@
import GET_CURRENT_USER from "./GET_CURRENT_USER";
+import { GET_MEDIA_USER } from "./GET_MEDIA_USER";
+import { GET_MEDIA_INFO } from "./GET_MEDIA_INFO";
-export { GET_CURRENT_USER };
+export { GET_CURRENT_USER, GET_MEDIA_USER, GET_MEDIA_INFO };