mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Feat: Shift from Stable to Preview (WIP)
This commit is contained in:
@@ -3,7 +3,7 @@ export const FETCH_CHAPTERS = `
|
||||
fetchChapters(input: { mangaId: $mangaId }) {
|
||||
chapters {
|
||||
id name chapterNumber sourceOrder isRead isDownloaded isBookmarked
|
||||
pageCount mangaId uploadDate realUrl lastPageRead scanlator
|
||||
pageCount mangaId uploadDate realUrl lastPageRead lastReadAt scanlator
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,3 +46,19 @@ export const DELETE_DOWNLOADED_CHAPTERS = `
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SET_CHAPTER_META = `
|
||||
mutation SetChapterMeta($chapterId: Int!, $key: String!, $value: String!) {
|
||||
setChapterMeta(input: { meta: { chapterId: $chapterId, key: $key, value: $value } }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_CHAPTER_META = `
|
||||
mutation DeleteChapterMeta($chapterId: Int!, $key: String!) {
|
||||
deleteChapterMeta(input: { chapterId: $chapterId, key: $key }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -17,6 +17,14 @@ export const UPDATE_EXTENSION = `
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_EXTENSIONS = `
|
||||
mutation UpdateExtensions($ids: [String!]!, $install: Boolean, $uninstall: Boolean, $update: Boolean) {
|
||||
updateExtensions(input: { ids: $ids, patch: { install: $install, uninstall: $uninstall, update: $update } }) {
|
||||
extensions { apkName pkgName name isInstalled hasUpdate }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSTALL_EXTERNAL_EXTENSION = `
|
||||
mutation InstallExternalExtension($url: String!) {
|
||||
installExternalExtension(input: { extensionUrl: $url }) {
|
||||
@@ -25,6 +33,82 @@ export const INSTALL_EXTERNAL_EXTENSION = `
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_SOURCE_PREFERENCE = `
|
||||
mutation UpdateSourcePreference($source: LongString!, $change: SourcePreferenceChangeInput!) {
|
||||
updateSourcePreference(input: { source: $source, change: $change }) {
|
||||
source { id displayName }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SET_SOURCE_META = `
|
||||
mutation SetSourceMeta($sourceId: LongString!, $key: String!, $value: String!) {
|
||||
setSourceMeta(input: { meta: { sourceId: $sourceId, key: $key, value: $value } }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_SOURCE_META = `
|
||||
mutation DeleteSourceMeta($sourceId: LongString!, $key: String!) {
|
||||
deleteSourceMeta(input: { sourceId: $sourceId, key: $key }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SET_CATEGORY_META = `
|
||||
mutation SetCategoryMeta($categoryId: Int!, $key: String!, $value: String!) {
|
||||
setCategoryMeta(input: { meta: { categoryId: $categoryId, key: $key, value: $value } }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_CATEGORY_META = `
|
||||
mutation DeleteCategoryMeta($categoryId: Int!, $key: String!) {
|
||||
deleteCategoryMeta(input: { categoryId: $categoryId, key: $key }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SET_GLOBAL_META = `
|
||||
mutation SetGlobalMeta($key: String!, $value: String!) {
|
||||
setGlobalMeta(input: { meta: { key: $key, value: $value } }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_GLOBAL_META = `
|
||||
mutation DeleteGlobalMeta($key: String!) {
|
||||
deleteGlobalMeta(input: { key: $key }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CLEAR_CACHED_IMAGES = `
|
||||
mutation ClearCachedImages($cachedPages: Boolean, $cachedThumbnails: Boolean, $downloadedThumbnails: Boolean) {
|
||||
clearCachedImages(input: {
|
||||
cachedPages: $cachedPages
|
||||
cachedThumbnails: $cachedThumbnails
|
||||
downloadedThumbnails: $downloadedThumbnails
|
||||
}) {
|
||||
cachedPages cachedThumbnails downloadedThumbnails
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const RESET_SETTINGS = `
|
||||
mutation ResetSettings {
|
||||
resetSettings(input: {}) {
|
||||
settings { extensionRepos }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SET_EXTENSION_REPOS = `
|
||||
mutation SetExtensionRepos($repos: [String!]!) {
|
||||
setSettings(input: { settings: { extensionRepos: $repos } }) {
|
||||
@@ -86,4 +170,4 @@ export const SET_FLARESOLVERR = `
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
`;
|
||||
@@ -2,4 +2,4 @@ export * from "./manga";
|
||||
export * from "./chapters";
|
||||
export * from "./downloads";
|
||||
export * from "./extensions";
|
||||
export * from "./tracking";
|
||||
export * from "./tracking";
|
||||
@@ -33,6 +33,14 @@ export const UPDATE_MANGA_CATEGORIES = `
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_MANGAS_CATEGORIES = `
|
||||
mutation UpdateMangasCategories($ids: [Int!]!, $addTo: [Int!]!, $removeFrom: [Int!]!) {
|
||||
updateMangasCategories(input: { ids: $ids, patch: { addToCategories: $addTo, removeFromCategories: $removeFrom } }) {
|
||||
mangas { id }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CREATE_CATEGORY = `
|
||||
mutation CreateCategory($name: String!) {
|
||||
createCategory(input: { name: $name }) {
|
||||
@@ -49,6 +57,14 @@ export const UPDATE_CATEGORY = `
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CATEGORIES = `
|
||||
mutation UpdateCategories($ids: [Int!]!, $patch: UpdateCategoryPatchInput!) {
|
||||
updateCategories(input: { ids: $ids, patch: $patch }) {
|
||||
categories { id name order default includeInUpdate includeInDownload }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_CATEGORY = `
|
||||
mutation DeleteCategory($id: Int!) {
|
||||
deleteCategory(input: { categoryId: $id }) {
|
||||
@@ -65,6 +81,16 @@ export const UPDATE_CATEGORY_ORDER = `
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CATEGORY_MANGA = `
|
||||
mutation UpdateCategoryManga($categoryId: Int!) {
|
||||
updateCategoryManga(input: { categoryId: $categoryId }) {
|
||||
updateStatus {
|
||||
jobsInfo { isRunning finishedJobs totalJobs }
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_LIBRARY = `
|
||||
mutation UpdateLibrary {
|
||||
updateLibrary(input: {}) {
|
||||
@@ -75,6 +101,26 @@ export const UPDATE_LIBRARY = `
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_LIBRARY_MANGA = `
|
||||
mutation UpdateLibraryManga($mangaId: Int!) {
|
||||
updateLibraryManga(input: { mangaId: $mangaId }) {
|
||||
updateStatus {
|
||||
jobsInfo { isRunning finishedJobs totalJobs }
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_STOP = `
|
||||
mutation UpdateStop {
|
||||
updateStop(input: {}) {
|
||||
updateStatus {
|
||||
jobsInfo { isRunning finishedJobs totalJobs }
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CREATE_BACKUP = `
|
||||
mutation CreateBackup {
|
||||
createBackup(input: {}) { url }
|
||||
@@ -89,3 +135,19 @@ export const RESTORE_BACKUP = `
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SET_MANGA_META = `
|
||||
mutation SetMangaMeta($mangaId: Int!, $key: String!, $value: String!) {
|
||||
setMangaMeta(input: { meta: { mangaId: $mangaId, key: $key, value: $value } }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_MANGA_META = `
|
||||
mutation DeleteMangaMeta($mangaId: Int!, $key: String!) {
|
||||
deleteMangaMeta(input: { mangaId: $mangaId, key: $key }) {
|
||||
meta { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
+101
-421
@@ -2,449 +2,129 @@
|
||||
|
||||
## Manga (`mutations/manga.ts`)
|
||||
|
||||
### `FETCH_MANGA`
|
||||
Fetches and refreshes manga metadata from its source.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Manga ID |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_MANGA`
|
||||
Updates a single manga's library membership.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Manga ID |
|
||||
| `inLibrary` | `Boolean` | Add/remove from library |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_MANGAS`
|
||||
Bulk-updates library membership for multiple manga.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `ids` | `[Int!]!` | Manga IDs |
|
||||
| `inLibrary` | `Boolean` | Add/remove from library |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_MANGA_CATEGORIES`
|
||||
Adds or removes a manga from categories.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `mangaId` | `Int!` | Manga ID |
|
||||
| `addTo` | `[Int!]!` | Category IDs to add to |
|
||||
| `removeFrom` | `[Int!]!` | Category IDs to remove from |
|
||||
|
||||
---
|
||||
|
||||
### `CREATE_CATEGORY`
|
||||
Creates a new manga category.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `name` | `String!` | Category name |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_CATEGORY`
|
||||
Updates a category's name.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Category ID |
|
||||
| `name` | `String` | New name |
|
||||
|
||||
---
|
||||
|
||||
### `DELETE_CATEGORY`
|
||||
Deletes a category by ID.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Category ID |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_CATEGORY_ORDER`
|
||||
Moves a category to a new position.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Category ID |
|
||||
| `position` | `Int!` | New position index |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_LIBRARY`
|
||||
Triggers a library-wide metadata refresh and returns job status.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `CREATE_BACKUP`
|
||||
Creates a backup and returns its download URL.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `RESTORE_BACKUP`
|
||||
Restores a backup from an uploaded file and returns restore job status.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `backup` | `Upload!` | Backup file |
|
||||
| Mutation | Variables | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `FETCH_MANGA` | `id: Int!` | Fetch and refresh manga metadata from its source |
|
||||
| `UPDATE_MANGA` | `id: Int!`, `inLibrary: Boolean` | Update a single manga's library membership |
|
||||
| `UPDATE_MANGAS` | `ids: [Int!]!`, `inLibrary: Boolean` | Bulk-update library membership for multiple manga |
|
||||
| `UPDATE_MANGA_CATEGORIES` | `mangaId: Int!`, `addTo: [Int!]!`, `removeFrom: [Int!]!` | Add or remove a single manga from categories |
|
||||
| `UPDATE_MANGAS_CATEGORIES` | `ids: [Int!]!`, `addTo: [Int!]!`, `removeFrom: [Int!]!` | Bulk add/remove multiple manga from categories |
|
||||
| `CREATE_CATEGORY` | `name: String!` | Create a new category |
|
||||
| `UPDATE_CATEGORY` | `id: Int!`, `name: String` | Update a category's name |
|
||||
| `UPDATE_CATEGORIES` | `ids: [Int!]!`, `patch: UpdateCategoryPatchInput!` | Bulk-update multiple categories |
|
||||
| `DELETE_CATEGORY` | `id: Int!` | Delete a category |
|
||||
| `UPDATE_CATEGORY_ORDER` | `id: Int!`, `position: Int!` | Move a category to a new position |
|
||||
| `UPDATE_CATEGORY_MANGA` | `categoryId: Int!` | Trigger a metadata update for all manga in a category |
|
||||
| `UPDATE_LIBRARY` | — | Trigger a full library metadata refresh |
|
||||
| `UPDATE_LIBRARY_MANGA` | `mangaId: Int!` | Trigger a metadata update for a single manga |
|
||||
| `UPDATE_STOP` | — | Stop the currently running library update job |
|
||||
| `CREATE_BACKUP` | — | Create a backup and return its download URL |
|
||||
| `RESTORE_BACKUP` | `backup: Upload!` | Restore a backup file and return the restore job status |
|
||||
| `SET_MANGA_META` | `mangaId: Int!`, `key: String!`, `value: String!` | Set a key/value meta entry on a manga |
|
||||
| `DELETE_MANGA_META` | `mangaId: Int!`, `key: String!` | Delete a key/value meta entry from a manga |
|
||||
|
||||
---
|
||||
|
||||
## Chapters (`mutations/chapters.ts`)
|
||||
|
||||
### `FETCH_CHAPTERS`
|
||||
Fetches/refreshes the chapter list for a manga from its source.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `mangaId` | `Int!` | Manga ID |
|
||||
|
||||
---
|
||||
|
||||
### `FETCH_CHAPTER_PAGES`
|
||||
Fetches the page URLs for a specific chapter.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `chapterId` | `Int!` | Chapter ID |
|
||||
|
||||
---
|
||||
|
||||
### `MARK_CHAPTER_READ`
|
||||
Marks a single chapter as read or unread.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Chapter ID |
|
||||
| `isRead` | `Boolean!` | Read state |
|
||||
|
||||
---
|
||||
|
||||
### `MARK_CHAPTERS_READ`
|
||||
Bulk-marks multiple chapters as read or unread.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `ids` | `[Int!]!` | Chapter IDs |
|
||||
| `isRead` | `Boolean!` | Read state |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_CHAPTERS_PROGRESS`
|
||||
Bulk-updates read state, bookmark state, and last page read for multiple chapters.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `ids` | `[Int!]!` | Chapter IDs |
|
||||
| `isRead` | `Boolean` | Read state |
|
||||
| `isBookmarked` | `Boolean` | Bookmark state |
|
||||
| `lastPageRead` | `Int` | Last page index read |
|
||||
|
||||
---
|
||||
|
||||
### `DELETE_DOWNLOADED_CHAPTERS`
|
||||
Deletes downloaded chapter files for the given chapter IDs.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `ids` | `[Int!]!` | Chapter IDs |
|
||||
| Mutation | Variables | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `FETCH_CHAPTERS` | `mangaId: Int!` | Fetch/refresh the chapter list for a manga from its source |
|
||||
| `FETCH_CHAPTER_PAGES` | `chapterId: Int!` | Fetch the page URLs for a specific chapter |
|
||||
| `MARK_CHAPTER_READ` | `id: Int!`, `isRead: Boolean!` | Mark a single chapter read or unread |
|
||||
| `MARK_CHAPTERS_READ` | `ids: [Int!]!`, `isRead: Boolean!` | Bulk mark chapters read or unread |
|
||||
| `UPDATE_CHAPTERS_PROGRESS` | `ids: [Int!]!`, `isRead: Boolean`, `isBookmarked: Boolean`, `lastPageRead: Int` | Bulk update read state, bookmark state, and last page read |
|
||||
| `DELETE_DOWNLOADED_CHAPTERS` | `ids: [Int!]!` | Delete downloaded chapter files |
|
||||
| `SET_CHAPTER_META` | `chapterId: Int!`, `key: String!`, `value: String!` | Set a key/value meta entry on a chapter |
|
||||
| `DELETE_CHAPTER_META` | `chapterId: Int!`, `key: String!` | Delete a key/value meta entry from a chapter |
|
||||
|
||||
---
|
||||
|
||||
## Downloads (`mutations/downloads.ts`)
|
||||
|
||||
### `ENQUEUE_DOWNLOAD`
|
||||
Adds a single chapter to the download queue.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `chapterId` | `Int!` | Chapter ID |
|
||||
|
||||
---
|
||||
|
||||
### `ENQUEUE_CHAPTERS_DOWNLOAD`
|
||||
Adds multiple chapters to the download queue.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `chapterIds` | `[Int!]!` | Chapter IDs |
|
||||
|
||||
---
|
||||
|
||||
### `DEQUEUE_DOWNLOAD`
|
||||
Removes a chapter from the download queue.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `chapterId` | `Int!` | Chapter ID |
|
||||
|
||||
---
|
||||
|
||||
### `START_DOWNLOADER`
|
||||
Starts the downloader and returns the current queue state.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `STOP_DOWNLOADER`
|
||||
Stops the downloader and returns the current queue state.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `CLEAR_DOWNLOADER`
|
||||
Clears all items from the download queue.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `FETCH_SOURCE_MANGA`
|
||||
Fetches manga from a source (browse/search), with pagination and optional filters.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `source` | `LongString!` | Source ID |
|
||||
| `type` | `FetchSourceMangaType!` | Browse type (e.g. popular, latest, search) |
|
||||
| `page` | `Int!` | Page number |
|
||||
| `query` | `String` | Search query |
|
||||
| `filters` | `[FilterChangeInput!]` | Source-specific filters |
|
||||
|
||||
---
|
||||
|
||||
### `SET_DOWNLOADS_PATH`
|
||||
Sets the downloads directory path in settings.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `path` | `String!` | Filesystem path |
|
||||
|
||||
---
|
||||
|
||||
### `SET_LOCAL_SOURCE_PATH`
|
||||
Sets the local source directory path in settings.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `path` | `String!` | Filesystem path |
|
||||
| Mutation | Variables | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `ENQUEUE_DOWNLOAD` | `chapterId: Int!` | Add a single chapter to the download queue |
|
||||
| `ENQUEUE_CHAPTERS_DOWNLOAD` | `chapterIds: [Int!]!` | Add multiple chapters to the download queue |
|
||||
| `DEQUEUE_DOWNLOAD` | `chapterId: Int!` | Remove a single chapter from the download queue |
|
||||
| `DEQUEUE_CHAPTERS_DOWNLOAD` | `chapterIds: [Int!]!` | Remove multiple chapters from the download queue |
|
||||
| `REORDER_DOWNLOAD` | `chapterId: Int!`, `to: Int!` | Move a queued chapter to a new position |
|
||||
| `START_DOWNLOADER` | — | Start the downloader |
|
||||
| `STOP_DOWNLOADER` | — | Stop the downloader |
|
||||
| `CLEAR_DOWNLOADER` | — | Clear all items from the download queue |
|
||||
| `FETCH_SOURCE_MANGA` | `source: LongString!`, `type: FetchSourceMangaType!`, `page: Int!`, `query: String`, `filters: [FilterChangeInput!]` | Fetch manga from a source (browse/search) with pagination |
|
||||
| `SET_DOWNLOADS_PATH` | `path: String!` | Set the downloads directory path |
|
||||
| `SET_LOCAL_SOURCE_PATH` | `path: String!` | Set the local source directory path |
|
||||
|
||||
---
|
||||
|
||||
## Extensions (`mutations/extensions.ts`)
|
||||
|
||||
### `FETCH_EXTENSIONS`
|
||||
Fetches the latest extension list from configured repos.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_EXTENSION`
|
||||
Installs, uninstalls, or updates an extension.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `String!` | Extension package name |
|
||||
| `install` | `Boolean` | Install the extension |
|
||||
| `uninstall` | `Boolean` | Uninstall the extension |
|
||||
| `update` | `Boolean` | Update the extension |
|
||||
|
||||
---
|
||||
|
||||
### `INSTALL_EXTERNAL_EXTENSION`
|
||||
Installs an extension from an external APK URL.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `url` | `String!` | APK download URL |
|
||||
|
||||
---
|
||||
|
||||
### `SET_EXTENSION_REPOS`
|
||||
Sets the list of extension repository URLs.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `repos` | `[String!]!` | Repository URLs |
|
||||
|
||||
---
|
||||
|
||||
### `SET_SERVER_AUTH`
|
||||
Configures server authentication mode and credentials.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `authMode` | `AuthMode!` | Auth mode |
|
||||
| `authUsername` | `String!` | Username |
|
||||
| `authPassword` | `String!` | Password |
|
||||
|
||||
---
|
||||
|
||||
### `SET_SOCKS_PROXY`
|
||||
Configures SOCKS proxy settings.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `socksProxyEnabled` | `Boolean!` | Enable/disable proxy |
|
||||
| `socksProxyHost` | `String!` | Proxy host |
|
||||
| `socksProxyPort` | `String!` | Proxy port |
|
||||
| `socksProxyVersion` | `Int!` | SOCKS version (4 or 5) |
|
||||
| `socksProxyUsername` | `String!` | Proxy username |
|
||||
| `socksProxyPassword` | `String!` | Proxy password |
|
||||
|
||||
---
|
||||
|
||||
### `SET_FLARESOLVERR`
|
||||
Configures FlareSolverr integration settings.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `flareSolverrEnabled` | `Boolean!` | Enable/disable FlareSolverr |
|
||||
| `flareSolverrUrl` | `String!` | FlareSolverr URL |
|
||||
| `flareSolverrTimeout` | `Int!` | Request timeout (ms) |
|
||||
| `flareSolverrSessionName` | `String!` | Session name |
|
||||
| `flareSolverrSessionTtl` | `Int!` | Session TTL (seconds) |
|
||||
| `flareSolverrAsResponseFallback` | `Boolean!` | Use as fallback only |
|
||||
| Mutation | Variables | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `FETCH_EXTENSIONS` | — | Fetch the latest extension list from configured repos |
|
||||
| `UPDATE_EXTENSION` | `id: String!`, `install: Boolean`, `uninstall: Boolean`, `update: Boolean` | Install, uninstall, or update a single extension |
|
||||
| `UPDATE_EXTENSIONS` | `ids: [String!]!`, `install: Boolean`, `uninstall: Boolean`, `update: Boolean` | Bulk install, uninstall, or update multiple extensions |
|
||||
| `INSTALL_EXTERNAL_EXTENSION` | `url: String!` | Install an extension from an external APK URL |
|
||||
| `UPDATE_SOURCE_PREFERENCE` | `source: LongString!`, `change: SourcePreferenceChangeInput!` | Update a source-specific preference value |
|
||||
| `SET_SOURCE_META` | `sourceId: LongString!`, `key: String!`, `value: String!` | Set a key/value meta entry on a source |
|
||||
| `DELETE_SOURCE_META` | `sourceId: LongString!`, `key: String!` | Delete a key/value meta entry from a source |
|
||||
| `SET_CATEGORY_META` | `categoryId: Int!`, `key: String!`, `value: String!` | Set a key/value meta entry on a category |
|
||||
| `DELETE_CATEGORY_META` | `categoryId: Int!`, `key: String!` | Delete a key/value meta entry from a category |
|
||||
| `SET_GLOBAL_META` | `key: String!`, `value: String!` | Set a global key/value meta entry |
|
||||
| `DELETE_GLOBAL_META` | `key: String!` | Delete a global key/value meta entry |
|
||||
| `CLEAR_CACHED_IMAGES` | `cachedPages: Boolean`, `cachedThumbnails: Boolean`, `downloadedThumbnails: Boolean` | Selectively clear cached page images, cached thumbnails, or downloaded thumbnails |
|
||||
| `RESET_SETTINGS` | — | Reset all server settings to defaults |
|
||||
| `UPDATE_WEBUI` | — | Trigger a WebUI update and return live status |
|
||||
| `RESET_WEBUI_UPDATE_STATUS` | — | Reset the WebUI update status back to idle |
|
||||
| `SET_EXTENSION_REPOS` | `repos: [String!]!` | Set the list of extension repository URLs |
|
||||
| `SET_SERVER_AUTH` | `authMode: AuthMode!`, `authUsername: String!`, `authPassword: String!` | Configure server auth mode and credentials |
|
||||
| `SET_SOCKS_PROXY` | `socksProxyEnabled: Boolean!`, `socksProxyHost: String!`, `socksProxyPort: String!`, `socksProxyVersion: Int!`, `socksProxyUsername: String!`, `socksProxyPassword: String!` | Configure SOCKS proxy settings |
|
||||
| `SET_FLARESOLVERR` | `flareSolverrEnabled: Boolean!`, `flareSolverrUrl: String!`, `flareSolverrTimeout: Int!`, `flareSolverrSessionName: String!`, `flareSolverrSessionTtl: Int!`, `flareSolverrAsResponseFallback: Boolean!` | Configure FlareSolverr integration |
|
||||
|
||||
---
|
||||
|
||||
## Tracking (`mutations/tracking.ts`)
|
||||
|
||||
### `BIND_TRACK`
|
||||
Binds a manga to a remote tracker entry.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `mangaId` | `Int!` | Manga ID |
|
||||
| `trackerId` | `Int!` | Tracker ID |
|
||||
| `remoteId` | `LongString!` | Remote entry ID on the tracker |
|
||||
| Mutation | Variables | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `BIND_TRACK` | `mangaId: Int!`, `trackerId: Int!`, `remoteId: LongString!` | Bind a manga to a remote tracker entry |
|
||||
| `UPDATE_TRACK` | `recordId: Int!`, `status: Int`, `lastChapterRead: Float`, `scoreString: String`, `startDate: LongString`, `finishDate: LongString`, `private: Boolean` | Update tracking progress, status, score, and dates |
|
||||
| `UNBIND_TRACK` | `recordId: Int!` | Unbind a manga from a tracker record |
|
||||
| `FETCH_TRACK` | `recordId: Int!` | Refresh a track record from the remote tracker |
|
||||
| `TRACK_PROGRESS` | `mangaId: Int!` | Sync current reading progress to all bound trackers for a manga |
|
||||
| `LOGIN_TRACKER_OAUTH` | `trackerId: Int!`, `callbackUrl: String!` | Initiate OAuth login for a tracker |
|
||||
| `LOGIN_TRACKER_CREDENTIALS` | `trackerId: Int!`, `username: String!`, `password: String!` | Log into a tracker with username and password |
|
||||
| `LOGOUT_TRACKER` | `trackerId: Int!` | Log out of a tracker |
|
||||
| `CONNECT_KOSYNC` | `username: String!`, `password: String!`, `serverAddress: String!` | Connect a KOReader sync account |
|
||||
| `LOGOUT_KOSYNC` | — | Disconnect the KOReader sync account |
|
||||
| `PULL_KOSYNC_PROGRESS` | `chapterId: Int!` | Pull reading progress from KOReader sync for a chapter |
|
||||
| `PUSH_KOSYNC_PROGRESS` | `chapterId: Int!` | Push reading progress to KOReader sync for a chapter |
|
||||
| `LOGIN_USER` | `username: String!`, `password: String!` | Authenticate and return access + refresh tokens |
|
||||
| `REFRESH_TOKEN` | — | Refresh the current access token |
|
||||
|
||||
---
|
||||
|
||||
### `UPDATE_TRACK`
|
||||
Updates tracking progress, status, score, and dates for a track record.
|
||||
## New in Preview
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `recordId` | `Int!` | Track record ID |
|
||||
| `status` | `Int` | Reading status |
|
||||
| `lastChapterRead` | `Float` | Last chapter read |
|
||||
| `scoreString` | `String` | Score in tracker's format |
|
||||
| `startDate` | `LongString` | Start date |
|
||||
| `finishDate` | `LongString` | Finish date |
|
||||
| `private` | `Boolean` | Mark as private |
|
||||
Mutations now available and not yet wired to any feature in Moku:
|
||||
|
||||
---
|
||||
|
||||
### `UNBIND_TRACK`
|
||||
Unbinds a manga from a tracker record.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `recordId` | `Int!` | Track record ID |
|
||||
|
||||
---
|
||||
|
||||
### `FETCH_TRACK`
|
||||
Refreshes a track record from the remote tracker.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `recordId` | `Int!` | Track record ID |
|
||||
|
||||
---
|
||||
|
||||
### `LOGIN_TRACKER_OAUTH`
|
||||
Initiates OAuth login for a tracker using a callback URL.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `trackerId` | `Int!` | Tracker ID |
|
||||
| `callbackUrl` | `String!` | OAuth callback URL |
|
||||
|
||||
---
|
||||
|
||||
### `LOGIN_TRACKER_CREDENTIALS`
|
||||
Logs into a tracker using username and password.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `trackerId` | `Int!` | Tracker ID |
|
||||
| `username` | `String!` | Username |
|
||||
| `password` | `String!` | Password |
|
||||
|
||||
---
|
||||
|
||||
### `LOGOUT_TRACKER`
|
||||
Logs out of a tracker.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `trackerId` | `Int!` | Tracker ID |
|
||||
|
||||
---
|
||||
|
||||
### `LOGIN_USER`
|
||||
Authenticates a user and returns access and refresh tokens.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `username` | `String!` | Username |
|
||||
| `password` | `String!` | Password |
|
||||
|
||||
---
|
||||
|
||||
### `REFRESH_TOKEN`
|
||||
Refreshes the current access token.
|
||||
|
||||
**Variables:** none
|
||||
| Mutation | Potential Feature |
|
||||
|----------|-------------------|
|
||||
| `UPDATE_MANGAS_CATEGORIES` | Bulk category editor — move/assign multiple manga at once |
|
||||
| `UPDATE_CATEGORIES` | Bulk category settings — toggle update/download flags for multiple categories at once |
|
||||
| `UPDATE_CATEGORY_MANGA` | Per-category refresh button — update only one category's manga |
|
||||
| `UPDATE_LIBRARY_MANGA` | Single manga refresh — trigger from series detail without a full library update |
|
||||
| `UPDATE_STOP` | Cancel button for library update jobs |
|
||||
| `UPDATE_EXTENSIONS` | Bulk extension updater — "update all" button in extensions page |
|
||||
| `UPDATE_SOURCE_PREFERENCE` | Source settings page — persist source-specific preferences |
|
||||
| `SET_SOURCE_META` / `DELETE_SOURCE_META` | Per-source client state — store browse position, last filter, etc. |
|
||||
| `SET_CATEGORY_META` / `DELETE_CATEGORY_META` | Per-category client state — store sort/filter preferences per category |
|
||||
| `SET_CHAPTER_META` / `DELETE_CHAPTER_META` | Per-chapter client state — annotations, custom notes |
|
||||
| `SET_GLOBAL_META` / `DELETE_GLOBAL_META` | Server-synced app state — replace local persistence for settings that should roam |
|
||||
| `CLEAR_CACHED_IMAGES` | Storage settings — granular cache clearing (pages, thumbnails, downloaded) |
|
||||
| `RESET_SETTINGS` | Settings page — factory reset button |
|
||||
| `UPDATE_WEBUI` / `RESET_WEBUI_UPDATE_STATUS` | WebUI update flow in settings — trigger and monitor update progress |
|
||||
| `TRACK_PROGRESS` | One-tap sync — push current reading position to all trackers without opening tracking panel |
|
||||
| `CONNECT_KOSYNC` / `LOGOUT_KOSYNC` | KOReader sync settings section — connect/disconnect account |
|
||||
| `PULL_KOSYNC_PROGRESS` / `PUSH_KOSYNC_PROGRESS` | KOReader sync — manual pull/push per chapter, or auto-sync on chapter open/close |
|
||||
@@ -1,6 +1,6 @@
|
||||
const TRACK_RECORD_FRAGMENT = `
|
||||
id trackerId remoteId title status score displayScore
|
||||
lastChapterRead totalChapters remoteUrl startDate finishDate private
|
||||
lastChapterRead totalChapters remoteUrl startDate finishDate private libraryId
|
||||
`;
|
||||
|
||||
export const BIND_TRACK = `
|
||||
@@ -15,7 +15,7 @@ export const UPDATE_TRACK = `
|
||||
mutation UpdateTrack($recordId: Int!, $status: Int, $lastChapterRead: Float, $scoreString: String, $startDate: LongString, $finishDate: LongString, $private: Boolean) {
|
||||
updateTrack(input: { recordId: $recordId, status: $status, lastChapterRead: $lastChapterRead, scoreString: $scoreString, startDate: $startDate, finishDate: $finishDate, private: $private }) {
|
||||
trackRecord {
|
||||
id trackerId status score displayScore lastChapterRead totalChapters startDate finishDate private
|
||||
id trackerId status score displayScore lastChapterRead totalChapters startDate finishDate private libraryId
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,17 @@ export const FETCH_TRACK = `
|
||||
mutation FetchTrack($recordId: Int!) {
|
||||
fetchTrack(input: { recordId: $recordId }) {
|
||||
trackRecord {
|
||||
id trackerId status score displayScore lastChapterRead totalChapters startDate finishDate
|
||||
id trackerId status score displayScore lastChapterRead totalChapters startDate finishDate libraryId
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const TRACK_PROGRESS = `
|
||||
mutation TrackProgress($mangaId: Int!) {
|
||||
trackProgress(input: { mangaId: $mangaId }) {
|
||||
trackRecords {
|
||||
id trackerId lastChapterRead status
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +53,7 @@ export const LOGIN_TRACKER_OAUTH = `
|
||||
mutation LoginTrackerOAuth($trackerId: Int!, $callbackUrl: String!) {
|
||||
loginTrackerOAuth(input: { trackerId: $trackerId, callbackUrl: $callbackUrl }) {
|
||||
isLoggedIn
|
||||
tracker { id name isLoggedIn authUrl }
|
||||
tracker { id name isLoggedIn isTokenExpired authUrl }
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -52,7 +62,7 @@ export const LOGIN_TRACKER_CREDENTIALS = `
|
||||
mutation LoginTrackerCredentials($trackerId: Int!, $username: String!, $password: String!) {
|
||||
loginTrackerCredentials(input: { trackerId: $trackerId, username: $username, password: $password }) {
|
||||
isLoggedIn
|
||||
tracker { id name isLoggedIn authUrl }
|
||||
tracker { id name isLoggedIn isTokenExpired authUrl }
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -60,7 +70,39 @@ export const LOGIN_TRACKER_CREDENTIALS = `
|
||||
export const LOGOUT_TRACKER = `
|
||||
mutation LogoutTracker($trackerId: Int!) {
|
||||
logoutTracker(input: { trackerId: $trackerId }) {
|
||||
tracker { id name isLoggedIn authUrl }
|
||||
tracker { id name isLoggedIn isTokenExpired authUrl }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONNECT_KOSYNC = `
|
||||
mutation ConnectKoSync($username: String!, $password: String!, $serverAddress: String!) {
|
||||
connectKoSyncAccount(input: { username: $username, password: $password, serverAddress: $serverAddress }) {
|
||||
isConnected
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const LOGOUT_KOSYNC = `
|
||||
mutation LogoutKoSync {
|
||||
logoutKoSyncAccount(input: {}) {
|
||||
isConnected
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const PULL_KOSYNC_PROGRESS = `
|
||||
mutation PullKoSyncProgress($chapterId: Int!) {
|
||||
pullKoSyncProgress(input: { chapterId: $chapterId }) {
|
||||
chapter { id lastPageRead isRead }
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const PUSH_KOSYNC_PROGRESS = `
|
||||
mutation PushKoSyncProgress($chapterId: Int!) {
|
||||
pushKoSyncProgress(input: { chapterId: $chapterId }) {
|
||||
chapter { id lastPageRead isRead }
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -75,6 +117,6 @@ export const LOGIN_USER = `
|
||||
|
||||
export const REFRESH_TOKEN = `
|
||||
mutation RefreshToken {
|
||||
refreshToken { accessToken }
|
||||
refreshToken(input: {}) { accessToken }
|
||||
}
|
||||
`;
|
||||
`;
|
||||
@@ -15,7 +15,7 @@ export const GET_CHAPTERS = `
|
||||
chapters(condition: { mangaId: $mangaId }) {
|
||||
nodes {
|
||||
id name chapterNumber sourceOrder isRead isDownloaded isBookmarked
|
||||
pageCount mangaId uploadDate realUrl lastPageRead scanlator
|
||||
pageCount mangaId uploadDate realUrl lastPageRead lastReadAt scanlator
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ export const GET_DOWNLOAD_STATUS = `
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
`;
|
||||
@@ -20,7 +20,10 @@ export const GET_EXTENSIONS = `
|
||||
export const GET_SOURCES = `
|
||||
query GetSources {
|
||||
sources {
|
||||
nodes { id name lang displayName iconUrl isNsfw }
|
||||
nodes {
|
||||
id name lang displayName iconUrl isNsfw
|
||||
isConfigurable supportsLatest baseUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -3,3 +3,5 @@ export * from "./chapters";
|
||||
export * from "./downloads";
|
||||
export * from "./extensions";
|
||||
export * from "./tracking";
|
||||
export * from "./updater";
|
||||
export * from "./meta";
|
||||
@@ -2,10 +2,15 @@ export const GET_LIBRARY = `
|
||||
query GetLibrary {
|
||||
mangas(condition: { inLibrary: true }) {
|
||||
nodes {
|
||||
id title thumbnailUrl inLibrary downloadCount unreadCount
|
||||
id title thumbnailUrl inLibrary downloadCount unreadCount bookmarkCount
|
||||
description status author artist genre
|
||||
inLibraryAt lastFetchedAt chaptersLastFetchedAt thumbnailUrlLastFetched
|
||||
source { id name displayName }
|
||||
chapters { totalCount }
|
||||
latestFetchedChapter { id uploadDate }
|
||||
latestUploadedChapter { id uploadDate }
|
||||
lastReadChapter { id chapterNumber }
|
||||
firstUnreadChapter { id chapterNumber }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +28,11 @@ export const GET_MANGA = `
|
||||
query GetManga($id: Int!) {
|
||||
manga(id: $id) {
|
||||
id title description thumbnailUrl status author artist genre inLibrary realUrl
|
||||
inLibraryAt lastFetchedAt thumbnailUrlLastFetched updateStrategy
|
||||
source { id name displayName }
|
||||
lastReadChapter { id chapterNumber lastPageRead }
|
||||
firstUnreadChapter { id chapterNumber }
|
||||
highestNumberedChapter { id chapterNumber }
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -58,7 +67,9 @@ export const GET_DOWNLOADS_PATH = `
|
||||
export const LIBRARY_UPDATE_STATUS = `
|
||||
query LibraryUpdateStatus {
|
||||
libraryUpdateStatus {
|
||||
jobsInfo { isRunning finishedJobs totalJobs skippedMangasCount }
|
||||
jobsInfo {
|
||||
isRunning finishedJobs totalJobs skippedMangasCount skippedCategoriesCount
|
||||
}
|
||||
mangaUpdates {
|
||||
status
|
||||
manga { id title thumbnailUrl unreadCount }
|
||||
@@ -93,4 +104,4 @@ export const MANGAS_BY_GENRE = `
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
`;
|
||||
`;
|
||||
@@ -0,0 +1,15 @@
|
||||
export const GET_META = `
|
||||
query GetMeta($key: String!) {
|
||||
meta(key: $key) {
|
||||
key value
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_METAS = `
|
||||
query GetMetas {
|
||||
metas {
|
||||
nodes { key value }
|
||||
}
|
||||
}
|
||||
`;
|
||||
+77
-131
@@ -2,170 +2,116 @@
|
||||
|
||||
## Manga (`queries/manga.ts`)
|
||||
|
||||
### `GET_LIBRARY`
|
||||
Fetches all manga marked as in-library, including metadata, source info, chapter count, download count, and unread count.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_ALL_MANGA`
|
||||
Fetches all manga (library and non-library) with minimal fields.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_MANGA`
|
||||
Fetches a single manga by ID with full metadata and source info.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `Int!` | Manga ID |
|
||||
|
||||
---
|
||||
|
||||
### `GET_CATEGORIES`
|
||||
Fetches all categories with their order, settings, and the manga assigned to each.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_DOWNLOADED_CHAPTERS_PAGES`
|
||||
Fetches page counts for all downloaded chapters.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_DOWNLOADS_PATH`
|
||||
Fetches the configured downloads path and local source path from settings.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `LIBRARY_UPDATE_STATUS`
|
||||
Fetches the current library update job status, including progress and any manga with new chapters.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_RESTORE_STATUS`
|
||||
Fetches the status of a backup restore operation by its job ID.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `id` | `String!` | Restore job ID |
|
||||
|
||||
---
|
||||
|
||||
### `VALIDATE_BACKUP`
|
||||
Validates a backup file and returns any missing sources or trackers.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `backup` | `Upload!` | Backup file |
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_LIBRARY` | — | All in-library manga with metadata, source, chapter counts, download count, unread count, bookmark count, and read progress anchors (`lastReadChapter`, `firstUnreadChapter`) |
|
||||
| `GET_ALL_MANGA` | — | Minimal manga list — id, title, thumbnail, library flag, download count |
|
||||
| `GET_MANGA` | `id: Int!` | Full detail for a single manga — includes `updateStrategy`, `lastReadChapter`, `firstUnreadChapter`, `highestNumberedChapter` |
|
||||
| `GET_CATEGORIES` | — | All categories with order/settings and their assigned manga (minimal fields) |
|
||||
| `GET_DOWNLOADED_CHAPTERS_PAGES` | — | Page counts for all downloaded chapters — used for storage stats |
|
||||
| `GET_DOWNLOADS_PATH` | — | `downloadsPath` and `localSourcePath` from settings |
|
||||
| `LIBRARY_UPDATE_STATUS` | — | Current library update job — `jobsInfo` progress and `mangaUpdates` list with new chapters |
|
||||
| `GET_RESTORE_STATUS` | `id: String!` | Backup restore job status by job ID — `mangaProgress`, `state`, `totalManga` |
|
||||
| `VALIDATE_BACKUP` | `backup: Upload!` | Validate a backup file before restore — returns missing sources and trackers |
|
||||
| `MANGAS_BY_GENRE` | `filter: MangaFilterInput`, `first: Int`, `offset: Int` | Paginated manga filtered by genre, ordered by `IN_LIBRARY_AT DESC` |
|
||||
|
||||
---
|
||||
|
||||
## Chapters (`queries/chapters.ts`)
|
||||
|
||||
### `GET_CHAPTERS`
|
||||
Fetches all chapters for a given manga, including read/download/bookmark state and page info.
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `mangaId` | `Int!` | Manga ID |
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_RECENTLY_UPDATED` | — | Latest 300 chapters ordered by `FETCHED_AT DESC` with parent manga info |
|
||||
| `GET_CHAPTERS` | `mangaId: Int!` | All chapters for a manga — includes `lastReadAt`, `lastPageRead`, read/download/bookmark state, page count, scanlator |
|
||||
|
||||
---
|
||||
|
||||
## Downloads (`queries/downloads.ts`)
|
||||
|
||||
### `GET_DOWNLOAD_STATUS`
|
||||
Fetches the current downloader state and full queue with chapter and manga info.
|
||||
|
||||
**Variables:** none
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_DOWNLOAD_STATUS` | — | Downloader state (`DownloaderState` enum) and full queue with chapter and manga info |
|
||||
|
||||
---
|
||||
|
||||
## Extensions (`queries/extensions.ts`)
|
||||
|
||||
### `GET_EXTENSIONS`
|
||||
Fetches all extensions with install status, update availability, and metadata.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_SOURCES`
|
||||
Fetches all available sources with language and NSFW flags.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_SETTINGS`
|
||||
Fetches extension repository settings.
|
||||
|
||||
**Variables:** none
|
||||
|
||||
---
|
||||
|
||||
### `GET_SERVER_SECURITY`
|
||||
Fetches all server security settings including auth mode, SOCKS proxy config, and FlareSolverr config.
|
||||
|
||||
**Variables:** none
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_LOCAL_MANGA` | — | Manga from the local source (`sourceId: "0"`) |
|
||||
| `GET_EXTENSIONS` | — | All extensions — install status, update flag, obsolete flag, metadata |
|
||||
| `GET_SOURCES` | — | All sources — id, name, lang, display name, icon, NSFW flag, `isConfigurable`, `supportsLatest`, `baseUrl` |
|
||||
| `GET_SETTINGS` | — | `extensionRepos` from settings |
|
||||
| `GET_SERVER_SECURITY` | — | Full security config — auth mode, SOCKS proxy settings, FlareSolverr settings |
|
||||
|
||||
---
|
||||
|
||||
## Tracking (`queries/tracking.ts`)
|
||||
|
||||
### `GET_TRACKERS`
|
||||
Fetches all trackers with login status, supported scores, statuses, and auth info.
|
||||
|
||||
**Variables:** none
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_TRACKERS` | — | All trackers with login state, token expiry, capability flags (`supportsPrivateTracking`, `supportsReadingDates`, `supportsTrackDeletion`), scores, and statuses |
|
||||
| `GET_MANGA_TRACK_RECORDS` | `mangaId: Int!` | All track records for a specific manga — includes `libraryId`, score, dates, privacy flag |
|
||||
| `SEARCH_TRACKER` | `trackerId: Int!`, `query: String!` | Search a tracker by query string — returns id, title, cover, summary, publishing info |
|
||||
| `GET_ALL_TRACKER_RECORDS` | — | All trackers and their full record lists with associated manga — includes `isTokenExpired`, `libraryId` |
|
||||
| `GET_TRACKER_RECORDS` | `trackerId: Int!` | Records for a specific tracker with associated manga |
|
||||
|
||||
---
|
||||
|
||||
### `GET_MANGA_TRACK_RECORDS`
|
||||
Fetches all tracking records for a specific manga across all trackers.
|
||||
## Updater (`queries/updater.ts`)
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `mangaId` | `Int!` | Manga ID |
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_ABOUT_SERVER` | — | Server name, version, build type, build time, GitHub and Discord links |
|
||||
| `GET_ABOUT_WEBUI` | — | WebUI channel, tag, and last update timestamp |
|
||||
| `CHECK_FOR_SERVER_UPDATES` | — | Available server updates — channel, tag, download URL |
|
||||
| `CHECK_FOR_WEBUI_UPDATE` | — | Available WebUI updates — channel and tag |
|
||||
| `GET_WEBUI_UPDATE_STATUS` | — | Live WebUI update state (`UpdateState` enum), progress percent, and info block |
|
||||
|
||||
---
|
||||
|
||||
### `SEARCH_TRACKER`
|
||||
Searches a tracker for manga by query string.
|
||||
## Meta (`queries/meta.ts`)
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `trackerId` | `Int!` | Tracker ID |
|
||||
| `query` | `String!` | Search query |
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_META` | `key: String!` | Single server-side key/value meta entry |
|
||||
| `GET_METAS` | — | All global meta entries as a node list |
|
||||
|
||||
---
|
||||
|
||||
### `GET_ALL_TRACKER_RECORDS`
|
||||
Fetches all trackers and their full track records, including associated manga info.
|
||||
## KoSync (`queries/kosync.ts`)
|
||||
|
||||
**Variables:** none
|
||||
| Query | Variables | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `GET_KOSYNC_STATUS` | — | KOReader sync connection status |
|
||||
|
||||
---
|
||||
|
||||
### `GET_TRACKER_RECORDS`
|
||||
Fetches track records for a specific tracker.
|
||||
## New in Preview
|
||||
|
||||
**Variables:**
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| `trackerId` | `Int!` | Tracker ID |
|
||||
Queries and fields now available but not yet wired to any feature in Moku:
|
||||
|
||||
| Query / Field | Potential Feature |
|
||||
|---------------|-------------------|
|
||||
| `GET_ABOUT_SERVER` | About page — server version, build info, links to GitHub and Discord |
|
||||
| `GET_ABOUT_WEBUI` | About page — WebUI version and release channel |
|
||||
| `CHECK_FOR_SERVER_UPDATES` | Update available banner or settings badge |
|
||||
| `CHECK_FOR_WEBUI_UPDATE` | Update available banner or settings badge |
|
||||
| `GET_WEBUI_UPDATE_STATUS` | Update progress indicator in settings |
|
||||
| `GET_META` / `GET_METAS` | Server-side persistence — sync app state across clients without local storage |
|
||||
| `GET_KOSYNC_STATUS` | KOReader sync settings section — show connection state |
|
||||
| `trackRecords` (top-level) | Flat tracker record browser — filter by score, privacy, tracker |
|
||||
| `category` (single by id) | Direct category detail without fetching all categories |
|
||||
| `chapter` (single by id) | Direct chapter lookup without fetching full manga chapter list |
|
||||
| `source` (single by id) | Source detail page — preferences, filters, browse |
|
||||
| `tracker` (single by id) | Individual tracker detail — statuses, records |
|
||||
| `trackRecord` (single by id) | Direct track record lookup for deep linking |
|
||||
| `lastUpdateTimestamp` | Stale data detection — poll before refetching library |
|
||||
| `MangaType.hasDuplicateChapters` | Library health view — flag manga with duplicate chapter numbers |
|
||||
| `MangaType.age` / `chaptersAge` | Stale manga indicator — highlight series with no updates in N days |
|
||||
| `MangaType.initialized` | Loading skeleton gating — skip detail render until manga is fully fetched |
|
||||
| `SourceType.isConfigurable` | Source list — show gear icon only when source is configurable |
|
||||
| `SourceType.supportsLatest` | Source browse UI — conditionally show Latest tab |
|
||||
| `TrackerType.supportsTrackDeletion` | Tracking panel — show remove button only when tracker supports it |
|
||||
| `TrackerType.supportsReadingDates` | Tracking panel — show date fields only when tracker supports them |
|
||||
| `TrackerType.isTokenExpired` | Re-auth prompt — detect expired tokens before a request fails |
|
||||
@@ -2,7 +2,9 @@ export const GET_TRACKERS = `
|
||||
query GetTrackers {
|
||||
trackers {
|
||||
nodes {
|
||||
id name icon isLoggedIn authUrl supportsPrivateTracking scores
|
||||
id name icon isLoggedIn isTokenExpired authUrl
|
||||
supportsPrivateTracking supportsReadingDates supportsTrackDeletion
|
||||
scores
|
||||
statuses { value name }
|
||||
}
|
||||
}
|
||||
@@ -15,7 +17,7 @@ export const GET_MANGA_TRACK_RECORDS = `
|
||||
trackRecords {
|
||||
nodes {
|
||||
id trackerId remoteId title status score displayScore
|
||||
lastChapterRead totalChapters remoteUrl startDate finishDate private
|
||||
lastChapterRead totalChapters remoteUrl startDate finishDate private libraryId
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,12 +39,12 @@ export const GET_ALL_TRACKER_RECORDS = `
|
||||
query GetAllTrackerRecords {
|
||||
trackers {
|
||||
nodes {
|
||||
id name icon isLoggedIn scores
|
||||
id name icon isLoggedIn isTokenExpired scores
|
||||
statuses { value name }
|
||||
trackRecords {
|
||||
nodes {
|
||||
id trackerId title status displayScore lastChapterRead
|
||||
totalChapters remoteUrl private
|
||||
totalChapters remoteUrl private libraryId
|
||||
manga { id title thumbnailUrl inLibrary }
|
||||
}
|
||||
}
|
||||
@@ -66,4 +68,4 @@ export const GET_TRACKER_RECORDS = `
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
`;
|
||||
@@ -0,0 +1,23 @@
|
||||
export const GET_ABOUT_SERVER = `
|
||||
query GetAboutServer {
|
||||
aboutServer {
|
||||
name version buildType buildTime github discord
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_ABOUT_WEBUI = `
|
||||
query GetAboutWebUI {
|
||||
aboutWebUI {
|
||||
channel tag updateTimestamp
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CHECK_FOR_SERVER_UPDATES = `
|
||||
query CheckForServerUpdates {
|
||||
checkForServerUpdates {
|
||||
channel tag url
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user