amfoss / amfoss/root

Create a query to fetch lab-wide aggregate data

未关闭
#149 2 条评论 0 个 reaction 已指派 1 人 已被 @tejasai2007 认领 在 GitHub 查看
主要语言
Rust
星标
4
派生
23
PR 合并指标
30 天内没有已合并 PR

描述

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
}
}
}
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。