I have an entity view for a blog article like so:
public interface BlogArticleView {
@IdMapping
UUID getId();
String getTitle();
String getSlug();
String getDescription();
String getContent();
Integer getLikes();
Timestamp getCreatedDate();
Timestamp getLastModifiedDate();
List<BlogTagView> getTags();
List<BlogCommentView> getComments();
}
Whenever I use graphql to query just the description
field from an article (by looking up its ID), the following query is generated:
select b1_0.id,null,null,null,null,b1_0.created_date,b1_0.description,null,null,null,null,null from blog_article b1_0 where b1_0.id=?
For some reason, even though I specify just the description field, it also queries the created_date from the database. The same thing happens when I query for the title, and it also returns the likes
attribute with it. How do I prevent this overfetching?