News for hackers. Stuff that matters.
Re:SQL as an API language by ilikehurdles on Thursday October 04, 2018 @06:32PM (#18144269)
The answer is muddier than what the other comments say. It depends on how you design your schema. It can support whatever you need it to support. Aggregations aren't impossible, but they have to be designed into the schema. A very quick example query with aggregates _may_ look like this:

    {
      searchFriends(first_name: {startsWith: "John"} age: {gte: 30}) {
        count
        aggregate {
          total_age: sum(field: age)
          avg_age: average(field: age)
          name_count: distinct(field: first_name)
        }
        nodes {
          first_name
          last_name
          age
          gender
          location
        }
      }
    }
But there are many different ways to model this.

There are no comments on this comment yet.