Skip to content

[Issue]: Projects Sorting by Most Recent and Filtering by Chapter Name #63

@soramicha

Description

@soramicha

Branch Name

feature/63-projects-sort

Task

The goal is to edit the GraphQL endpoint for projects to allow filtering. We will filter projects by chapter name. We will also implement sorting by Most Recent for the results.

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)
Most Recent - check nonprofits_chapter_project start_date
Chapter - chapter name as a String (which chapters were involved in this nonprofit?)

The plan is that in the frontend, the user will pick 1+ chapters and they will be all string inputs in our GraphQL. And then within our resolvers, we will convert the strings into IDs 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

  • Correct chapter filtering
  • Correct Most Recent filtering

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

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions