Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 10, 2025

Summary

Updates the frontend GraphQL query to use the new cancelApplication mutation instead of deleteApplication to align with the backend API renaming.

Background

The backend GraphQL API has renamed the mutation from deleteApplication to cancelApplication. This change updates the frontend to use the correct mutation name.

Changes Made

  • File: src/graphql/cancelApplication.ts
    • Updated line 6 to use cancelApplication instead of deleteApplication in the GraphQL mutation
    • Changed from: cancelApplication: deleteApplication(_id: $_id, comment: $comment)
    • Changed to: cancelApplication: cancelApplication(_id: $_id, comment: $comment)

Technical Details

  • This is a minimal, surgical change affecting only the mutation name
  • The mutation signature and response structure remain unchanged
  • Existing frontend consumer code continues to work without modification
  • All tests that import CANCEL_APP from the GraphQL module will automatically use the updated mutation

Verification

  • ✅ Confirmed no other references to deleteApplication exist in the codebase
  • ✅ Verified the change maintains backward compatibility for frontend components
  • ✅ Ensured existing test structure remains intact

Reference

Jira ticket: CRDCDH-3025

This pull request was created as a result of the following prompt from Copilot chat.

The backend GraphQL API is renaming the mutation "deleteApplication" to "cancelApplication". Update the frontend GraphQL query accordingly by replacing all references to the "deleteApplication" mutation with "cancelApplication" in the affected file(s). Ensure the mutation name and usage are consistent with the new backend API. Reference Jira ticket CRDCDH-3025 in the pull request description.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@coveralls
Copy link
Collaborator

coveralls commented Jul 10, 2025

Pull Request Test Coverage Report for Build 16198722036

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 71.43%

Totals Coverage Status
Change from base Build 16179854233: 0.0%
Covered Lines: 23280
Relevant Lines: 33681

💛 - Coveralls

Co-authored-by: amattu2 <38357871+amattu2@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GraphQL mutation from deleteApplication to cancelApplication (CRDCDH-3025) Update GraphQL mutation from deleteApplication to cancelApplication Jul 10, 2025
Copilot AI requested a review from amattu2 July 10, 2025 14:56
Copilot finished work on behalf of amattu2 July 10, 2025 14:56
amattu2

This comment was marked as outdated.

Co-authored-by: amattu2 <38357871+amattu2@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 10, 2025

Since the new API name is cancelApplication, we can remove the GraphQL mapping of cancelApplication: cancelApplication(...)

Good catch! I've removed the redundant field alias since the mutation name and field name are now the same. The GraphQL query now uses the cleaner syntax: cancelApplication(_id: $_id, comment: $comment) instead of cancelApplication: cancelApplication(_id: $_id, comment: $comment). Commit: 3fb4c7e

Copilot AI requested a review from amattu2 July 10, 2025 15:02
Copilot finished work on behalf of amattu2 July 10, 2025 15:02
@amattu2 amattu2 changed the base branch from main to 3.4.0 July 10, 2025 15:02
@amattu2 amattu2 added this to the 3.4.0 milestone Jul 10, 2025
@amattu2 amattu2 requested a review from Alejandro-Vega July 10, 2025 16:12
@amattu2 amattu2 marked this pull request as ready for review July 10, 2025 16:12
@amattu2 amattu2 changed the title Update GraphQL mutation from deleteApplication to cancelApplication CRDCDH-3025 Remove deleteApplication GraphQL alias Jul 10, 2025
@amattu2 amattu2 removed their request for review July 10, 2025 16:13
Copy link
Collaborator

@Alejandro-Vega Alejandro-Vega left a comment

Choose a reason for hiding this comment

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

LGTM!

@Alejandro-Vega Alejandro-Vega merged commit 47e1a80 into 3.4.0 Jul 10, 2025
8 checks passed
@Alejandro-Vega Alejandro-Vega deleted the copilot/fix-cb15b33a-aee4-4668-9535-fb32607a76dc branch July 10, 2025 19:14
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.

4 participants