Aggregate functions in GraphQLList object
Author: ShauryaAgCreated Dec 29, 2020Updated Mar 19, 2026
Labels👻 Needs Champion
Addition of aggregate functions in GraphQLList Object such as in SQL:
Example: In order to implement something like:
SELECT post_id, likes, count(likes) FROM posts;where likes stores the user_ids of users who liked a certain post
as
query AllPosts {
posts {
post_id
likes
count(likes)
}
}and for GraphQLList<GraphQLInt> type data, provide a sum(values) function and so on...
Source: graphql/graphql-spec