Created
May 17, 2020 16:17
-
-
Save svenhakvoort/edb18bdc30797cc620e148a1cc90c500 to your computer and use it in GitHub Desktop.
Modified DemoQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demographql.query | |
import com.example.demographql.model.Demo | |
import com.example.demographql.service.DemoService | |
import com.expediagroup.graphql.spring.operations.Query | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.stereotype.Controller | |
import reactor.core.publisher.Mono | |
@Controller | |
class DemoQuery: Query { | |
@Autowired | |
private lateinit var demoService: DemoService | |
fun demo(id: String): Mono<Demo> { | |
return demoService.findById(id) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment