aboutsummaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-04-11 23:23:29 +0700
committerFactiven <[email protected]>2023-04-11 23:23:29 +0700
commit1fcdd9f7d859b925bf92265f441655d5522e351c (patch)
tree86391522f6fcc70d105f7e796a9f91d132ee4a29 /queries
parentInitial commit (diff)
downloadmoopa-1fcdd9f7d859b925bf92265f441655d5522e351c.tar.xz
moopa-1fcdd9f7d859b925bf92265f441655d5522e351c.zip
initial commit
Diffstat (limited to 'queries')
-rw-r--r--queries/GET_ADVANCE_SEARCH.js0
-rw-r--r--queries/GET_CURRENT_USER.js15
-rw-r--r--queries/GET_MEDIA.js26
-rw-r--r--queries/index.js4
4 files changed, 45 insertions, 0 deletions
diff --git a/queries/GET_ADVANCE_SEARCH.js b/queries/GET_ADVANCE_SEARCH.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/queries/GET_ADVANCE_SEARCH.js
diff --git a/queries/GET_CURRENT_USER.js b/queries/GET_CURRENT_USER.js
new file mode 100644
index 0000000..50dc1a4
--- /dev/null
+++ b/queries/GET_CURRENT_USER.js
@@ -0,0 +1,15 @@
+import { gql } from "@apollo/client";
+
+export default gql`
+ query {
+ Viewer {
+ id
+ name
+ avatar {
+ large
+ medium
+ }
+ bannerImage
+ }
+ }
+`;
diff --git a/queries/GET_MEDIA.js b/queries/GET_MEDIA.js
new file mode 100644
index 0000000..8c42a00
--- /dev/null
+++ b/queries/GET_MEDIA.js
@@ -0,0 +1,26 @@
+import { gql } from "@apollo/client";
+
+export default gql`
+ query ($page: Int, $userId: Int, $type: MediaType, $status: MediaListStatus) {
+ Page(page: $page, perPage: 100) {
+ pageInfo {
+ hasNextPage
+ }
+ mediaList(type: $type, userId: $userId) {
+ status
+ score(format: POINT_100)
+ media {
+ siteUrl
+ id
+ coverImage {
+ large
+ extraLarge
+ }
+ title {
+ userPreferred
+ }
+ }
+ }
+ }
+ }
+`;
diff --git a/queries/index.js b/queries/index.js
new file mode 100644
index 0000000..79cb903
--- /dev/null
+++ b/queries/index.js
@@ -0,0 +1,4 @@
+import GET_CURRENT_USER from "./GET_CURRENT_USER";
+import GET_MEDIA from "./GET_MEDIA";
+
+export { GET_CURRENT_USER, GET_MEDIA };