amfoss / amfoss/root

Create a query to fetch lab-wide aggregate data

オープン
#149 コメント 2 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。