eh3rrera / graphql-java-spring-boot-example

Sample GraphQL server implemented with graphql-java and Spring Boot
MIT License
211 stars 151 forks source link

separate query and mutation method resolver #6

Closed KrifaYounes closed 6 years ago

KrifaYounes commented 6 years ago

it's possible to separate method contained in query and mutation in differents file by domain AuthorQueryResolver.java BookQueryResolver.java AuthorMutationResolver.java BookMutationResolver.java

eh3rrera commented 6 years ago

Yes, it's possible, but for this project, and just for teaching purposes, I put all the queries in a Query class, all the mutations in a Mutation class, and the method to get authors from a book in another class.