Fork me on GitHub
#announcements
<
2020-05-20
>
Tamizhvendan S16:05:07

GraphQLize Update (#4) - Aggregate Functions & Group By https://www.graphqlize.org/blog/graphqlize-update-4/

👍 32
🎉 4
kszabo16:05:16

congrats! good call on avoiding burn-out 🙏

👍 4
isak20:05:46

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

isak20:05:47

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

isak20:05:23

(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") {
  value
}

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

isak03:05:48

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 https://graphql.org/learn/schema/#arguments. 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 :)

isak04:05:31

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

tony.kay20:05:33

Fulcro 3.2.8 is on Clojars. This version fixes an accidental regression on component indexing. https://github.com/fulcrologic/fulcro

🎉 24
👍 4