diff --git a/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/client/dto/KotlinBlogDTOs.kt b/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/client/dto/KotlinBlogDTOs.kt index dd2bb8a..4f2cb3e 100644 --- a/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/client/dto/KotlinBlogDTOs.kt +++ b/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/client/dto/KotlinBlogDTOs.kt @@ -26,7 +26,7 @@ data class KotlinBlogItem( @XmlElement(true) val pubDate: String, @XmlElement(true) - val featuredImage: String, + val featuredImage: String?, @XmlElement(true) val guid: String, @XmlElement(true) diff --git a/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedEntryDataFetcher.kt b/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedEntryDataFetcher.kt index 515cf3e..474c369 100644 --- a/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedEntryDataFetcher.kt +++ b/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedEntryDataFetcher.kt @@ -67,7 +67,7 @@ class FeedEntryDataFetcher( @DgsQuery(field = DgsConstants.QUERY.FeedEntries) suspend fun feedEntries(@InputArgument filters: List?): List = coroutineScope { - FeedSourceKey.values().filter { + FeedSourceKey.entries.filter { filters == null || filters.contains(it) }.map { source -> async(coroutineDispatcher) { diff --git a/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedSourceDataFetcher.kt b/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedSourceDataFetcher.kt index 3b82315..1f4c790 100644 --- a/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedSourceDataFetcher.kt +++ b/src/main/kotlin/io/github/reactivecircus/kstreamlined/backend/datafetcher/FeedSourceDataFetcher.kt @@ -11,7 +11,7 @@ class FeedSourceDataFetcher { @DgsQuery(field = DgsConstants.QUERY.FeedSources) suspend fun feedSources(): List { - return FeedSourceKey.values().map { + return FeedSourceKey.entries.map { val title = when (it) { FeedSourceKey.KOTLIN_BLOG -> FeedSourceTitle.KotlinBlog FeedSourceKey.KOTLIN_YOUTUBE_CHANNEL -> FeedSourceTitle.KotlinYouTube diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index a3f949d..90366c6 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,6 @@ server.port=${PORT:8000} server.compression.enabled=true server.compression.mime-types=application/json -dgs.graphql.apq.enabled=true ks.kotlin-blog-feed-url=https://blog.jetbrains.com/kotlin/feed/ ks.kotlin-youtube-feed-url=https://www.youtube.com/feeds/videos.xml?channel_id=UCP7uiEZIqci43m22KDl0sNw ks.talking-kotlin-feed-url=https://talkingkotlin.com/feed diff --git a/src/main/resources/schema/kstreamlined.graphqls b/src/main/resources/schema/kstreamlined.graphqls index 0c9a8db..77b71d0 100644 --- a/src/main/resources/schema/kstreamlined.graphqls +++ b/src/main/resources/schema/kstreamlined.graphqls @@ -46,7 +46,7 @@ type KotlinBlog implements FeedEntry { "Url of the content." contentUrl: String! "Url of the feature image." - featuredImageUrl: String! + featuredImageUrl: String "Description of the blog post." description: String! }