Skip to content

Commit

Permalink
Change featuredImageUrl to nullable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 committed Nov 20, 2023
1 parent b0215e3 commit bcf5b8d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class FeedEntryDataFetcher(

@DgsQuery(field = DgsConstants.QUERY.FeedEntries)
suspend fun feedEntries(@InputArgument filters: List<FeedSourceKey>?): List<FeedEntry> = coroutineScope {
FeedSourceKey.values().filter {
FeedSourceKey.entries.filter {
filters == null || filters.contains(it)
}.map { source ->
async(coroutineDispatcher) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FeedSourceDataFetcher {

@DgsQuery(field = DgsConstants.QUERY.FeedSources)
suspend fun feedSources(): List<FeedSource> {
return FeedSourceKey.values().map {
return FeedSourceKey.entries.map {
val title = when (it) {
FeedSourceKey.KOTLIN_BLOG -> FeedSourceTitle.KotlinBlog
FeedSourceKey.KOTLIN_YOUTUBE_CHANNEL -> FeedSourceTitle.KotlinYouTube
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/schema/kstreamlined.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -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!
}
Expand Down

0 comments on commit bcf5b8d

Please sign in to comment.