amfoss / amfoss/root

Create a query to fetch lab-wide aggregate data

Abierto
#149 2 comentarios 0 reacciones 1 asignado Reclamado por @tejasai2007 Ver en GitHub
Lenguaje dominante
Rust
Estrellas
4
Forks
23
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.