mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
Throw error instead of returning null (#666)
In case e.g. no manga exists for the passed id, the query returned null. This makes it harder to have a "streamlined" error handling in the client, since these types of queries need a special handling.
This commit is contained in:
@@ -36,8 +36,8 @@ import suwayomi.tachidesk.graphql.types.GlobalMetaType
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
class MetaQuery {
|
||||
fun meta(dataFetchingEnvironment: DataFetchingEnvironment, key: String): CompletableFuture<GlobalMetaType?> {
|
||||
return dataFetchingEnvironment.getValueFromDataLoader<String, GlobalMetaType?>("GlobalMetaDataLoader", key)
|
||||
fun meta(dataFetchingEnvironment: DataFetchingEnvironment, key: String): CompletableFuture<GlobalMetaType> {
|
||||
return dataFetchingEnvironment.getValueFromDataLoader("GlobalMetaDataLoader", key)
|
||||
}
|
||||
|
||||
enum class MetaOrderBy(override val column: Column<out Comparable<*>>) : OrderBy<GlobalMetaType> {
|
||||
|
||||
Reference in New Issue
Block a user