Skip to content

[INTF25] Adds queries for admin comments#80

Merged
mxc-maggiechen merged 4 commits intomainfrom
INTF25-queries-for-admin-comments
Nov 19, 2025
Merged

[INTF25] Adds queries for admin comments#80
mxc-maggiechen merged 4 commits intomainfrom
INTF25-queries-for-admin-comments

Conversation

@ericahan22
Copy link
Member

@ericahan22 ericahan22 commented Nov 1, 2025

Notion ticket link

Build Queries for Admin Comments

Implementation description

  • Adds getAdminCommentsByApplicantRecordId and getAdminCommentById queries to services
  • Adds corresponding resolvers and types
  • Ensures queries are protected by authorizedByAdmin middleware

Steps to test

  1. Run the following queries and ensure proper responses:
# Fetch all comments for an applicant record
query {
  adminCommentsByApplicantRecordId(applicantRecordId: "aa6cb234-ecc5-43e5-b2cf-4ec426577658") {
    id
    userId
    applicantRecordId
    comment
    createdAt
    updatedAt
  }
}

# Example of expected response
{
  "data": {
    "adminCommentsByApplicantRecordId": [
      {
        "id": "some-comment-id",
        "userId": 1,
        "applicantRecordId": "aa6cb234-ecc5-43e5-b2cf-4ec426577658",
        "comment": "Test admin comment",
        "createdAt": "2025-10-25T20:50:57.520Z",
        "updatedAt": "2025-10-25T20:50:57.578Z"
      },
      ...
    ]
  }
}
# Fetch a single comment by ID
query {
  adminCommentById(id: "some-comment-id-from-previous-query") {
    id
    userId
    applicantRecordId
    comment
    createdAt
    updatedAt
  }
}

# Example of expected response
{
  "data": {
    "adminCommentById": {
      "id": "some-comment-id-from-previous-query",
      "userId": 1,
      "applicantRecordId": "aa6cb234-ecc5-43e5-b2cf-4ec426577658",
      "comment": "Test admin comment",
      "createdAt": "2025-10-25T20:50:57.520Z",
      "updatedAt": "2025-10-25T20:50:57.578Z"
    }
  }
}

What should reviewers focus on?

  • Just make sure the 2 queries run as expected

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@ericahan22 ericahan22 self-assigned this Nov 1, 2025
Base automatically changed from INTF25-mutators-for-admin-comments to main November 1, 2025 18:50
Copy link
Contributor

@mxc-maggiechen mxc-maggiechen left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@isabellehuangg isabellehuangg left a comment

Choose a reason for hiding this comment

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

👍

@mxc-maggiechen mxc-maggiechen merged commit 0a494f5 into main Nov 19, 2025
1 check passed
@mxc-maggiechen mxc-maggiechen deleted the INTF25-queries-for-admin-comments branch November 19, 2025 02:19
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