Created
August 1, 2022 11:18
-
-
Save atesibrahim/1f2848fcaac1fe469c48fb58529ce90e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
@AllArgsConstructor | |
public class BookQuery{ | |
private final BookRepository bookRepository; | |
@QueryMapping | |
public Iterable<Book> allBook(){ | |
return bookRepository.findAll(); | |
} | |
@QueryMapping | |
public Book getBookByTitle(@Argument("filter") BookInput bookInput){ | |
return bookRepository.findBookByTitle(bookInput.getTitle()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment