We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9340a6 + 1447bbd commit 5379ac3Copy full SHA for 5379ac3
src/main/kotlin/com/example/demo/datafetchers/ReviewsDataFetcher.kt
@@ -46,7 +46,7 @@ class ReviewsDataFetcher(private val reviewsService: ReviewsService) {
46
val show : Show? = dfe.getSource()
47
48
//Load the reviews from the DataLoader. This call is async and will be batched by the DataLoader mechanism.
49
- return reviewsDataLoader.load(show?.id)
+ return show?.id?.let { reviewsDataLoader.load(it) } ?: CompletableFuture.completedFuture(emptyList())
50
}
51
52
@DgsMutation
0 commit comments