Skip to content

Instantly share code, notes, and snippets.

@aronbalog
Last active July 26, 2019 19:24
Show Gist options
  • Save aronbalog/e65b33afe5353a2d34c22e1c3da00110 to your computer and use it in GitHub Desktop.
Save aronbalog/e65b33afe5353a2d34c22e1c3da00110 to your computer and use it in GitHub Desktop.
package com.example.demo.graphql
import com.coxautodev.graphql.tools.GraphQLMutationResolver
import com.example.demo.dao.PersonDao
import com.example.demo.data.Person
import com.example.demo.graphql.input.PersonInput
import org.springframework.stereotype.Component
@Component
class Mutation(
private val personDao: PersonDao
): GraphQLMutationResolver {
fun personCreate(input: PersonInput) =
personDao.createPerson(input.name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment