Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ add filtering by restriction code to WebSoc endpoint #130

Merged
merged 14 commits into from
May 15, 2024

Conversation

andrew-wang0
Copy link
Member

Summary

Added filtering by restriction code to websoc REST & GraphQL endpoints using the excludeRestrictionCodes parameter.

  • Included restrictionCodes in db schema & scraper
  • Added excludeRestrictionCodes to query parameters for REST & GraphQL

Example queries:

To exclude sections that include restriction code 'A'

GET http://localhost:8080/v1/rest/websoc?year=2024&quarter=Winter&ge=GE-4&excludeRestrictionCodes=A

To exclude sections that include restriction code 'X' or 'L' (or both)

GET http://localhost:8080/v1/rest/websoc?year=2024&quarter=Winter&ge=GE-4&excludeRestrictionCodes=X,L

Issues

Closes #122

@andrew-wang0 andrew-wang0 added story point: 3 Change to endpoint or response type: feature request Brand new functionality, features, pages, workflows, endpoints, etc area: api Related to the API in general labels Feb 10, 2024
@andrew-wang0 andrew-wang0 self-assigned this Feb 10, 2024
@andrew-wang0 andrew-wang0 linked an issue Feb 10, 2024 that may be closed by this pull request
@KevinWu098
Copy link
Member

🤤

@KevinWu098
Copy link
Member

Will start writing the feature with this staging instance 🫡, hopefully sus out some bugs while I'm at it

@KevinWu098 KevinWu098 temporarily deployed to staging-130-docs February 10, 2024 10:30 — with GitHub Actions Inactive
@KevinWu098 KevinWu098 temporarily deployed to staging-130 February 10, 2024 10:30 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 changed the title 122 add filtering by restriction code to websoc endpoint feat: add filtering by restriction code to WebSoc endpoint Feb 12, 2024
@github-actions github-actions bot changed the title feat: add filtering by restriction code to WebSoc endpoint feat: ✨ add filtering by restriction code to WebSoc endpoint Feb 12, 2024
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130-docs February 12, 2024 22:29 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130 February 12, 2024 22:29 — with GitHub Actions Inactive
@ecxyzzy ecxyzzy temporarily deployed to staging-130-docs February 13, 2024 19:02 — with GitHub Actions Inactive
@ecxyzzy ecxyzzy temporarily deployed to staging-130 February 13, 2024 19:02 — with GitHub Actions Inactive
Copy link
Member

@ecxyzzy ecxyzzy left a comment

Choose a reason for hiding this comment

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

Looks good enough for initial testing. However, this only filters out requests that go through the cache; requests that result in invoking the WebSoc proxy aren't filtered out properly.

cc: @KevinWu098 (stakeholder)

@andrew-wang0 andrew-wang0 temporarily deployed to staging-130 March 12, 2024 21:53 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130-docs March 12, 2024 21:53 — with GitHub Actions Inactive
@andrew-wang0
Copy link
Member Author

Looks good enough for initial testing. However, this only filters out requests that go through the cache; requests that result in invoking the WebSoc proxy aren't filtered out properly.

I believe filtering should work for the WebSoc proxy now!

@ecxyzzy
@KevinWu098

@andrew-wang0 andrew-wang0 temporarily deployed to staging-130-docs April 10, 2024 23:43 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130 April 10, 2024 23:43 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130 April 24, 2024 18:37 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130-docs April 24, 2024 18:37 — with GitHub Actions Inactive
Copy link
Contributor

@ap0nia ap0nia left a comment

Choose a reason for hiding this comment

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

It looks pretty good at a cursory glance! 🚀

apps/api/src/routes/v1/rest/websoc/+endpoint.ts Outdated Show resolved Hide resolved
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130-docs April 24, 2024 23:57 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130 April 24, 2024 23:57 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130-docs April 25, 2024 00:03 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 temporarily deployed to staging-130 April 25, 2024 00:03 — with GitHub Actions Inactive
@andrew-wang0 andrew-wang0 requested a review from ap0nia May 14, 2024 18:09
@ap0nia ap0nia temporarily deployed to staging-130 May 15, 2024 06:45 — with GitHub Actions Inactive
@ap0nia ap0nia temporarily deployed to staging-130-docs May 15, 2024 06:45 — with GitHub Actions Inactive
Copy link
Member

@ecxyzzy ecxyzzy left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@ecxyzzy ecxyzzy merged commit 74889e2 into main May 15, 2024
5 checks passed
@ecxyzzy ecxyzzy deleted the 122-add-filtering-by-restriction-code-to-websoc-endpoint branch May 15, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Related to the API in general story point: 3 Change to endpoint or response type: feature request Brand new functionality, features, pages, workflows, endpoints, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filtering by restriction code to WebSoc endpoint
4 participants