diff options
| author | Factiven <[email protected]> | 2023-04-11 23:23:29 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-04-11 23:23:29 +0700 |
| commit | 1fcdd9f7d859b925bf92265f441655d5522e351c (patch) | |
| tree | 86391522f6fcc70d105f7e796a9f91d132ee4a29 /queries | |
| parent | Initial commit (diff) | |
| download | moopa-1fcdd9f7d859b925bf92265f441655d5522e351c.tar.xz moopa-1fcdd9f7d859b925bf92265f441655d5522e351c.zip | |
initial commit
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/GET_ADVANCE_SEARCH.js | 0 | ||||
| -rw-r--r-- | queries/GET_CURRENT_USER.js | 15 | ||||
| -rw-r--r-- | queries/GET_MEDIA.js | 26 | ||||
| -rw-r--r-- | queries/index.js | 4 |
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 }; |