Skip to content

Conversation

@amandayu255
Copy link
Contributor

Closes #61

Overview

  • Added GraphQL filters for nonprofits by chapter and status
  • Updated the nonprofits query to accept chapter names and status options
  • Converted chapter names to IDs in the backend before filtering

Testing

Through Postman and Supabase

Screenshots / Screencasts

42145E10-6E3A-4543-9DE1-365A70C9206F
CE658FA8-44E3-48D4-880B-F1D10CC2CF6C

Checklist

  • Code is neat, readable, and works
  • Code is commented where appropriate and well-documented
  • Commit messages follow our guidelines
  • Issue number is linked
  • Branch is linked
  • Reviewers are assigned (one of your tech leads)

Tip: You can make the issue and then check them after the fact or replace [ ] with [x] to check it!

Notes

{Any issues/suggestions relating to the ticket, repo, assignments, TL duties; please mention here!}

Copy link
Collaborator

@soramicha soramicha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I created two rows only - one active, one inactive, but when i used Postman, i got this:

image

And it showed up three results than 1. we have to search through the nonprofit_chapter_project table - not the nonprofits.

In your screenshot, it says POST - this is a GET request btw!

@amandayu255
Copy link
Contributor Author

8613454F-9D3E-4608-B5FA-50209611DFF5

Updated to filter through the nonprofit_chapter_project table!

return nonprofit;
},

nonprofitChapterProjects: async (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you are creating a new API for nonprofit_chapter_projects. For our design of the api's, we've already created all APIs which are individual table entities and not join tables like nonprofit_chapter_projects. We don't want to expose them and have them be able to be called publicly. And so ultimately the goal is to be able to just call something like this from Postman:

query {
nonprofits(
chapterNames: [...]
statuses: [...]
) {
id
name
chapters {
id
status
}
}
}

And be able to retrieve proper nonprofits based on the chapter and/or status name. And internally we would use the nonprofit_chapter_project table to gather the right data we need. Hopefully that makes sense and let me know if you have questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants