add FXIOS-123 {Return member object} Returns member object in attendance and status update history#127
Conversation
|
Thanks for the PR @Harshith-2208 Currently the PR has 4 separate commits, but they're all working towards a single change, and some of them seem like fixups or partial changes. Before going into the review of the content it would be great if you could clean up the commit history by squashing everything into one clear commit. |
|
Done with squashing them can go ahead with reviewing. |
|
@Harshith-2208 From a quick look, it seems like the PR is adding a bit more complexity than what might be needed for the feature. I see you’ve added new types (AttendanceMemberRow, AttendanceWithMember) and SQL joins to include member data, which works, but might be a bit heavy. An alternative approach that might simplify things is to use a GraphQL field resolver instead of joining everything up front: This can help keep the schema clean and reduce the amount of SQL wiring. Here’s the #[ComplexObject] doc for reference: Not 100% sure this is the best route, but it might be worth considering. |
|
Updated the code using ComplexObject |
e111e13 to
69091e2
Compare
closes #123


I have added two new struct in attendance.rs which are AttendanceMemberRow which is a row and AttendanceWithMember which creates an object similarly two new struct in streak_update.rs. Then they are implemented in queries, a vector of rows matching the query are created having both the fields of attendance and member as flat rows then a new struct AttendanceWithMember for each r in rows then returns the vector