Example for a GraphQL Application in Spring Boot (#2477)

This commit is contained in:
Graham Cox
2017-08-21 20:01:41 +01:00
committed by Grzegorz Piwowarek
parent 04fa1782a2
commit 706b3d6c67
12 changed files with 305 additions and 0 deletions
@@ -0,0 +1,17 @@
package com.baeldung.graphql;
import java.util.List;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
public class Query implements GraphQLQueryResolver {
private PostDao postDao;
public Query(PostDao postDao) {
this.postDao = postDao;
}
public List<Post> recentPosts(int count, int offset) {
return postDao.getRecentPosts(count, offset);
}
}