GraphQL, Aggregating data

Hi, Wondering if there is any way to aggregate data using the GraphQL Api?

As an example, I would like to be able to retrieve the number of items contained within a boards group.

query { boards(ids: ####) { groups { item_count } } }

where item count would refer to a way to retrieve the number of items, or way to implement a graph ql function to count the number of items

Hey @Adurm :wave:

First off, my warmest welcome to the community :slight_smile: I’m glad you’re with us here and I hope you enjoy your stay.

To be transparent with you, this is not something that the API currently provides. I would suggest instead to query the group’s item IDs, and then to count the number of IDs returned - this would be your best bet in terms of getting the item count within a group.

What do you think? Would this be a plausible solution?

I’ve also moved the thread to the Feature Requests section, and hopefully this helps other users chime in with their feedback :slight_smile:

-Alex

Thanks for responding.

Yes what you have suggested is what ive already done but was hoping to further reduce the complexity of the query and reduce the number of nests within the response.

The above was a simple use case, but i was hoping, if ‘functions’ were allowed, that they could be used to simplify responses such as those contained within column_values - which result in alot of bloated data.

@Adurm

Got it, I’m glad you were able to implement a working solution on your end already. I appreciate your feedback on this and I definitely see how it would help with using our GraphQL API - I’ve passed the request along to our product team, but I’m afraid I can’t promise an ETA on this just yet.

That said, I really appreciate you sticking with us and looking out for opportunities to improve monday.com :slight_smile: That’s amazing!

-Alex

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.