Skip to content

Instantly share code, notes, and snippets.

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