mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Some TODOs with ideas
This commit is contained in:
@@ -15,6 +15,18 @@ import suwayomi.tachidesk.graphql.types.CategoryType
|
|||||||
import suwayomi.tachidesk.manga.model.table.CategoryTable
|
import suwayomi.tachidesk.manga.model.table.CategoryTable
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Queries
|
||||||
|
* - Sort?
|
||||||
|
* - Query by name
|
||||||
|
* - In ID list
|
||||||
|
* - Paged queries
|
||||||
|
*
|
||||||
|
* TODO Mutations
|
||||||
|
* - Name
|
||||||
|
* - Order
|
||||||
|
* - Default
|
||||||
|
*/
|
||||||
class CategoryQuery {
|
class CategoryQuery {
|
||||||
fun category(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<CategoryType> {
|
fun category(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<CategoryType> {
|
||||||
return dataFetchingEnvironment.getValueFromDataLoader<Int, CategoryType>("CategoryDataLoader", id)
|
return dataFetchingEnvironment.getValueFromDataLoader<Int, CategoryType>("CategoryDataLoader", id)
|
||||||
|
|||||||
@@ -16,6 +16,21 @@ import suwayomi.tachidesk.graphql.types.ChapterType
|
|||||||
import suwayomi.tachidesk.manga.model.table.ChapterTable
|
import suwayomi.tachidesk.manga.model.table.ChapterTable
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Queries
|
||||||
|
* - Filter by read
|
||||||
|
* - Filter by bookmarked
|
||||||
|
* - Filter by downloaded
|
||||||
|
* - Filter by scanlators
|
||||||
|
* - Sort? Upload date, source order, last read, chapter number
|
||||||
|
*
|
||||||
|
* TODO Mutations
|
||||||
|
* - Last page read
|
||||||
|
* - Read status
|
||||||
|
* - bookmark status
|
||||||
|
* - Check for updates?
|
||||||
|
* - Download
|
||||||
|
*/
|
||||||
class ChapterQuery {
|
class ChapterQuery {
|
||||||
fun chapter(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<ChapterType> {
|
fun chapter(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<ChapterType> {
|
||||||
return dataFetchingEnvironment.getValueFromDataLoader<Int, ChapterType>("ChapterDataLoader", id)
|
return dataFetchingEnvironment.getValueFromDataLoader<Int, ChapterType>("ChapterDataLoader", id)
|
||||||
|
|||||||
@@ -15,6 +15,23 @@ import suwayomi.tachidesk.graphql.types.ExtensionType
|
|||||||
import suwayomi.tachidesk.manga.model.table.ExtensionTable
|
import suwayomi.tachidesk.manga.model.table.ExtensionTable
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Queries
|
||||||
|
* - Installed
|
||||||
|
* - HasUpdate
|
||||||
|
* - Obsolete
|
||||||
|
* - IsNsfw
|
||||||
|
* - In Pkg name list
|
||||||
|
* - Query name
|
||||||
|
* - Sort?
|
||||||
|
* - Paged Queries
|
||||||
|
*
|
||||||
|
* TODO Mutations
|
||||||
|
* - Install
|
||||||
|
* - Update
|
||||||
|
* - Uninstall
|
||||||
|
* - Check for updates (global mutation?)
|
||||||
|
*/
|
||||||
class ExtensionQuery {
|
class ExtensionQuery {
|
||||||
fun extension(dataFetchingEnvironment: DataFetchingEnvironment, pkgName: String): CompletableFuture<ExtensionType> {
|
fun extension(dataFetchingEnvironment: DataFetchingEnvironment, pkgName: String): CompletableFuture<ExtensionType> {
|
||||||
return dataFetchingEnvironment.getValueFromDataLoader<String, ExtensionType>("ExtensionDataLoader", pkgName)
|
return dataFetchingEnvironment.getValueFromDataLoader<String, ExtensionType>("ExtensionDataLoader", pkgName)
|
||||||
|
|||||||
@@ -18,6 +18,19 @@ import suwayomi.tachidesk.manga.model.table.CategoryMangaTable
|
|||||||
import suwayomi.tachidesk.manga.model.table.MangaTable
|
import suwayomi.tachidesk.manga.model.table.MangaTable
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Queries
|
||||||
|
* - Query options(optionally query the title, description, or/and)
|
||||||
|
* - Sort?
|
||||||
|
*
|
||||||
|
* TODO Mutations
|
||||||
|
* - Favorite
|
||||||
|
* - Unfavorite
|
||||||
|
* - Add to category
|
||||||
|
* - Remove from category
|
||||||
|
* - Check for updates
|
||||||
|
* - Download x(all = -1) chapters
|
||||||
|
*/
|
||||||
class MangaQuery {
|
class MangaQuery {
|
||||||
fun manga(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<MangaType> {
|
fun manga(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<MangaType> {
|
||||||
return dataFetchingEnvironment.getValueFromDataLoader<Int, MangaType>("MangaDataLoader", id)
|
return dataFetchingEnvironment.getValueFromDataLoader<Int, MangaType>("MangaDataLoader", id)
|
||||||
|
|||||||
@@ -15,6 +15,18 @@ import suwayomi.tachidesk.graphql.types.SourceType
|
|||||||
import suwayomi.tachidesk.manga.model.table.SourceTable
|
import suwayomi.tachidesk.manga.model.table.SourceTable
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Queries
|
||||||
|
* - Filter by languages
|
||||||
|
* - Filter by name
|
||||||
|
* - Filter by NSFW
|
||||||
|
* - Sort?
|
||||||
|
*
|
||||||
|
* TODO Mutations
|
||||||
|
* - Browse with filters
|
||||||
|
* - Configure settings
|
||||||
|
*
|
||||||
|
*/
|
||||||
class SourceQuery {
|
class SourceQuery {
|
||||||
fun source(dataFetchingEnvironment: DataFetchingEnvironment, id: Long): CompletableFuture<SourceType?> {
|
fun source(dataFetchingEnvironment: DataFetchingEnvironment, id: Long): CompletableFuture<SourceType?> {
|
||||||
return dataFetchingEnvironment.getValueFromDataLoader<Long, SourceType?>("SourceDataLoader", id)
|
return dataFetchingEnvironment.getValueFromDataLoader<Long, SourceType?>("SourceDataLoader", id)
|
||||||
|
|||||||
Reference in New Issue
Block a user