Skip to content

[Issue]: Filter Volunteers by Chapter, Role, Status #60

@soramicha

Description

@soramicha

Branch Name

feature/60-filter-volunteers

Task

The goal is to edit the GraphQL endpoint for volunteers to allow filtering. We will filter Volunteers by Chapter, Role, and Status.

Why GraphQL and not REST? REST is awesome for simple querying commands while GraphQL is a lot more flexible. In fact, it is recommended and better practice to use GraphQL when it comes to filtering, sorting, and pagination, etc. Remember that using GraphQL means we can also control exactly what information we want to be returned to us, which is convenient. And this is all using just one endpoint too 💃

Inputs: (note they are all optional! and users can input one or more options! check Figma link I sent in the Slack for the visual idea of what this functionality is gonna do)
Status - refers to options in volunteer_status in Volunteers table already as a String
Role - role name as a String (What is their role in H4I overall? Refer to volunteer_assignment table that shows this!)
Chapter - chapter name as a String

The plan is that in the frontend, the user will pick 1+ chapters and 1+ roles and 1+ status and they will be all string inputs in our GraphQL. And then within our resolvers, we will convert the strings into IDs and proper volunteer_status enums, and do whatever JOIN commands necessary. Refer to https://docs.google.com/document/d/1tE_8BkrLbqR_SMnS2NA_ro1-d_y7V1rx-6VexejoN38/edit?tab=t.0 highlighted in green to get an idea of how you can get the proper data we need!

Test using Postman, and make sure to screenshot your results when you make your PR!

Image from Figma for this:

Image Image

Acceptance Criteria

  • Proper filtering for Chapters
  • Proper filtering for Status
  • Proper filtering for Role

Checklist

  • I have checked for duplicate issues.
  • I have assigned the issue to the correct project board.
  • I have tagged the issue properly.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions