Created
May 17, 2020 15:56
-
-
Save svenhakvoort/edfb238dc3e22d168c59f15fe5aaf77d to your computer and use it in GitHub Desktop.
DemoMutation
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.mutation | |
import com.example.demographql.model.Demo | |
import com.example.demographql.service.DemoService | |
import com.expediagroup.graphql.spring.operations.Mutation | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.stereotype.Controller | |
import reactor.core.publisher.Mono | |
@Controller | |
class DemoMutation: Mutation { | |
@Autowired | |
private lateinit var demoService: DemoService | |
fun newDemo(someText: String): Mono<Demo> { | |
return demoService.createNewDemo(someText) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment