Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#808·graphql-spec

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:

sql
SELECT post_id, likes, count(likes) FROM posts;

where likes stores the user_ids of users who liked a certain post

as

graphql
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

View original on GitHubView discussion on GitHub