contrib
contrib copied to clipboard
feat: allow aggregate ordering of through table edges
Summary
- Add support for using
entgql.OrderField()
aggregates for edges that use a Through table. - The OrderField string must be prefixed with the string value of the edge. For example:
edge.To("friends", User.Type).
Through("friendships", Friendship.Type).
Annotations(entgql.RelayConnection()),
would require the OrderField string to start with FRIENDS_
For the count aggregation the full string would be FRIENDS_COUNT
.
- The changes skip the through table OrderBy and only use the original edge OrderBy.