mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
Handle missing objects in graphql
This commit is contained in:
@@ -28,9 +28,10 @@ class SourceDataLoader : KotlinDataLoader<Long, SourceType?> {
|
||||
future {
|
||||
transaction {
|
||||
addLogger(Slf4jSqlDebugLogger)
|
||||
SourceTable.select { SourceTable.id inList ids }.map {
|
||||
SourceType(it)
|
||||
}
|
||||
val source = SourceTable.select { SourceTable.id inList ids }
|
||||
.mapNotNull { SourceType(it) }
|
||||
.associateBy { it.id }
|
||||
ids.map { source[it] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user