Fork me on GitHub
Tamizhvendan S16:05:07

GraphQLize Update (#4) - Aggregate Functions & Group By

👍 32
🎉 4

congrats! good call on avoiding burn-out 🙏

👍 4

For this, it looks like you're adding one extra field per agg function you are supporting:


did you consider something like sumRating: sum("rating") instead?


(Asking because I did something similar for a different case (filters), and now I kind of regret it)

Tamizhvendan S03:05:56

Thanks @U08JKUHA9. TBH, I went this way after trying with different approaches. I did consider this sum("rating") but this resulted in

Tamizhvendan S03:05:12

sum("rating") {

Tamizhvendan S03:05:13

I do agree the field per aggregate function is not the cleanest way but I had no other better option

Tamizhvendan S03:05:44

Love to receive your inputs / suggestions that’y I am keeping this library in alpha state and building it in public


interesting, why did it result in returning an object instead of a scalar?

Tamizhvendan S03:05:34

Thanks a ton @U08JKUHA9 I just checked the GraphQL schema It is possible to have arguments on fields. My Bad, I was thinking only it applies to queries and get carried along on.

Tamizhvendan S04:05:18

I will fix it in the next release. Thanks again :)


yea this may be a good case for it, if you want to avoid the potential field "explosion"


Fulcro 3.2.8 is on Clojars. This version fixes an accidental regression on component indexing.

🎉 24
👍 4