Newer
Older
sample-spring-graphql1 / src / main / kotlin / com / sample / resolver / SampleGraphQLQueryResolver.kt
yhornisse on 12 May 2020 408 bytes Add files
package com.sample.resolver

import com.coxautodev.graphql.tools.GraphQLQueryResolver
import com.sample.type.Book
import org.springframework.stereotype.Component

@Component
class SampleGraphQLQueryResolver : GraphQLQueryResolver {
    fun getBook(name : String) : Book {
        val b = Book(123, "タイトル", "俺", 1000);
        return b;
    }

    fun live() : Boolean {
        return true;
    }
}