|
|
|
@@ -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 |
|