amfoss / amfoss/root

Create a query to fetch lab-wide aggregate data

Đang mở
#149 2 bình luận 0 reaction 1 người được giao Được @tejasai2007 nhận Xem trên GitHub
Ngôn ngữ chính
Rust
Star
4
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Currently two root query objects exist in the GraphQL schema - `allMembers` and `members`, each of these are used to fetch details regarding members individually.

To support dashboard-level analytics and visualizations, we need to introduce a new root query object, lab, dedicated to aggregate and statistical data.

## Goal
Add a new lab query field in the GraphQL schema to provide aggregate insights, starting with daily attendance counts within a specified date range.

This will enable rendering of the attendance trend graph on the Home page (as shown below):

Attendance Graph

## Deliverables
- [ ] Introduce a new root-level lab query object.
- [ ] Within lab, implement an attendance(startDate, endDate) resolver.
- [ ] The resolver should return a list of objects containing:
> date: Date! — the date of attendance.
totalPresent: Int! — the total number of present members for that date.

Expected Schema would look something like this:
```graphql
query {
lab {
attendance(startDate: "1999-01-01", endDate: "1999-12-31") {
date,
totalPresent
}
}
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.