Add delete achievement mutation and service
What does this MR do and why?
Add support for deleting achievements via GraphQL.
Related to #385394 (closed)
Screenshots or screen recordings
How to set up and validate locally
- Enable feature flag in rails console:
Feature.enable(:achievements)
- Find some user achievements (you may need to run the seed depending on the age of your database:
bundle exec rake db:seed_fu FILTER=36_achievements
) http://gdk.test:3000/-/graphql-explorerquery { namespace(fullPath: "gitlab-org") { achievements { nodes { id name } } } }
Achievements::Achievement.all
- Delete an achievement
mutation { achievementsDelete(input: { achievementId: "gid://gitlab/Achievements::Achievement/88" }) { achievement { id name } errors } }
- Try and delete it again...
- Query to ensure the achievement no longer gets returned
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Lee Tickett