Some TODOs with ideas

This commit is contained in:
Syer10
2023-03-31 22:00:01 -04:00
parent 3a67ddf0f6
commit 4c30d8ab05
5 changed files with 69 additions and 0 deletions
@@ -15,6 +15,18 @@ import suwayomi.tachidesk.graphql.types.CategoryType
import suwayomi.tachidesk.manga.model.table.CategoryTable
import java.util.concurrent.CompletableFuture
/**
* TODO Queries
* - Sort?
* - Query by name
* - In ID list
* - Paged queries
*
* TODO Mutations
* - Name
* - Order
* - Default
*/
class CategoryQuery {
fun category(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<CategoryType> {
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 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 {
fun chapter(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<ChapterType> {
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 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 {
fun extension(dataFetchingEnvironment: DataFetchingEnvironment, pkgName: String): CompletableFuture<ExtensionType> {
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 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 {
fun manga(dataFetchingEnvironment: DataFetchingEnvironment, id: Int): CompletableFuture<MangaType> {
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 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 {
fun source(dataFetchingEnvironment: DataFetchingEnvironment, id: Long): CompletableFuture<SourceType?> {
return dataFetchingEnvironment.getValueFromDataLoader<Long, SourceType?>("SourceDataLoader", id)