diff --git a/src/main/kotlin/com/sample/resolver/SampleGraphQLQueryResolver.kt b/src/main/kotlin/com/sample/resolver/SampleGraphQLQueryResolver.kt index e1cd7b3..908b11f 100644 --- a/src/main/kotlin/com/sample/resolver/SampleGraphQLQueryResolver.kt +++ b/src/main/kotlin/com/sample/resolver/SampleGraphQLQueryResolver.kt @@ -6,12 +6,8 @@ @Component class SampleGraphQLQueryResolver : GraphQLQueryResolver { - fun getBook(name : String) : Book { - val b = Book(123, "タイトル", "俺", 1000); - return b; - } + fun getBook(name : String) : Book = + Book(id = 123, name = "タイトル", author = "俺", value = 1000); - fun live() : Boolean { - return true; - } -} \ No newline at end of file + fun live() : Boolean = true +}