How can I get information about count inside my query?
This is my query which return paginated companies list.
How I can get count of MongoCompanies.find({}) and pass it?
Oh so you would need to put it in your schema so it will be apart of your graph.
type MongoCompanies {
id: Int!,
company_name: String,
company_count: Int
}
Then because company_count is not apart of your original MongoCompanies schema (I’m assuming id and company_name is here) you will have to add its custom functionality to your resolver: