Instead of all the items in return I want the number of items only in appsync query.Look at the below example:
My schema :
type Post @model {
id: ID!
title: String!
comments: [Comment] @hasMany
}
type Comment @model {
id: ID!
content: String!
post: Post @belongsTo
}
Here in getPost query we can get all the comments list related to post if we won't provide pagination limit. But I don't want the list of comments, I want the total number of comments. When user will click on the comment icon I will fetch comments in separate query.
Now my question is how to get that comments is there any in-built method avaliable or I have to do it manually (how)?