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

[MINT-3227] API Support for deleting an MTO Milestone #1554

Merged
merged 6 commits into from
Dec 5, 2024

Conversation

ClayBenson94
Copy link
Collaborator

@ClayBenson94 ClayBenson94 commented Dec 5, 2024

MINT-3227

Description

  • Adds API Support (GraphQL mutation) for deleting an MTO milestone
  • Adds Postman Query
  • Adds resolver test (honestly pretty minimal at this point, maybe could bolster this up)

Note

This PR also introduces a sqlutils.ExecProcedure method, useful for calling delete statements which do not need to return any values

How to test this change

  1. Use scripts/dev db:seed to populate an MTO with some milestones
  2. Optionally create some milestones from the common milestone library and link some solutions
  3. Use the postman query to delete those milestones
    a. Ensure that the milestones are deleted properly
    b. Ensure that any milestone solution links are also deleted (but not the solutions themselves

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.
  • Updated the Postman Collection if necessary.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

@ClayBenson94 ClayBenson94 requested review from a team as code owners December 5, 2024 14:44
@ClayBenson94 ClayBenson94 requested review from OddTomBrooks, garyjzhao and StevenWadeOddball and removed request for a team December 5, 2024 14:44
Copy link
Contributor

@StevenWadeOddball StevenWadeOddball left a comment

Choose a reason for hiding this comment

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

Thanks Clay! This looks good functionally. I didn't validate the cascade behavior. I have one slight change request regarding setting a session variable for the delete statement. That's needed for change history.

pkg/sqlqueries/SQL/mto/milestone/delete.sql Show resolved Hide resolved
pkg/storage/mto_milestone.go Outdated Show resolved Hide resolved
pkg/graph/schema/types/mto_milestone.graphql Show resolved Hide resolved
Copy link
Contributor

@StevenWadeOddball StevenWadeOddball left a comment

Choose a reason for hiding this comment

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

Thanks Clay! This looks good

@ClayBenson94 ClayBenson94 merged commit 8ecfab5 into feature/MINT-3175_mto Dec 5, 2024
10 checks passed
@ClayBenson94 ClayBenson94 deleted the MINT-3227/delete_mto_milestone branch December 5, 2024 17:42
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.

2 participants