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] Community interest backend #12411

Merged
merged 11 commits into from
Jan 6, 2025
Merged

Conversation

esizer
Copy link
Member

@esizer esizer commented Jan 2, 2025

🤖 Resolves #12253

👋 Introduction

Adds the community interest model to the server along with supporting code.

🕵️ Details

Based on the UI, we will be adding these in their own forms so I went with their own mutations instead of a field on the employee profile. It seemed like it made sense to me, especially when it came to validating the input.

Though, I could be convinced to move it to a field on the UpdateEmployeeProfileInput as well.

🧪 Testing

  1. Refresh the API make refresh-api
  2. Confirm migrations runs as expected
  3. Refresh the database make seed-fresh
  4. Confirm no errors and expected data gets seeded into new tables
  5. Test creating and updating community interests
  6. Confirm test coverage is good (tried to cover edge cases but was not sure)

@petertgiles petertgiles self-requested a review January 6, 2025 13:37
Copy link
Contributor

@petertgiles petertgiles left a comment

Choose a reason for hiding this comment

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

Looks and works great! I flagged a few small things to check on.

{
Schema::create('community_interests', function (Blueprint $table) {
$table->uuid('id')->primary()->default(new Expression('public.gen_random_uuid()'));
$table->foreignUuid('user_id')
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoah, cool, I didn't know about this shortcut.

api/tests/Feature/CommunityInterestTest.php Outdated Show resolved Hide resolved
api/graphql/schema.graphql Outdated Show resolved Hide resolved
@esizer esizer requested a review from petertgiles January 6, 2025 16:03
@esizer esizer added this pull request to the merge queue Jan 6, 2025
Merged via the queue into main with commit a3fe42a Jan 6, 2025
10 checks passed
@esizer esizer deleted the 122530-community-interest-model branch January 6, 2025 17:47
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.

✨Backend model for Community Interest
2 participants