Skip to content

Instantly share code, notes, and snippets.

@svenhakvoort
Created May 17, 2020 16:17
Show Gist options
  • Save svenhakvoort/edb18bdc30797cc620e148a1cc90c500 to your computer and use it in GitHub Desktop.
Save svenhakvoort/edb18bdc30797cc620e148a1cc90c500 to your computer and use it in GitHub Desktop.
Modified DemoQuery
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