Not sure if I should post this on the forum or not...
# prisma-whats-new
m
Not sure if I should post this on the forum or not, just let me know. Anyhow, one of the things I really loved about the old API was how I could grab an aggregation of a nested field. For instance, I could grab a list of users and then, for each user, I could grab the number of transactions that they have made. Now, all aggregate data has to be grabbed through a FieldConnection which seems a little bit more annoying. Is there a way to grab nested aggregate data now? Like, grab users with the UserConnection and then grab the transaction count from within? Am I am missing something or is that not possible with the new API? Thank You
n
hey @Michael Jones thanks for bringing this up! I think Slack is great to discuss questions like this, but the chance to eventually get a reply is lower. Adding inner connection fields is an open feature request, which you can track by subscribing this issue: https://github.com/graphcool/prisma/issues/1780 It's high on our list to implement that, and it would then allow you to aggregate across relations. Until then, it's fairly straight forward to implement the aggregation in your resolver: https://www.graph.cool/forum/t/how-to-use-field-resolvers-to-get-aggregates-of-inner-relation-types/2930?u=nilan
m
Ok, wasn't sure if there was an issue relating to it! Thank you 🙂
👍 1