package com.sample.resolver; import com.coxautodev.graphql.tools.GraphQLQueryResolver; import com.sample.type.Book; import org.springframework.stereotype.Component; @Component public class SampleGraphQLQueryResolver implements GraphQLQueryResolver { public Book getBook(String bookId) { return Book.builder() .bookId(bookId) .name("ハルヒ") .author("キョン") .build(); } public boolean live(){ return true; } }