craftql icon indicating copy to clipboard operation
craftql copied to clipboard

completely remove a entry

Open aquafun20 opened this issue 6 years ago • 1 comments

mutation removeArticle { upsertBlog(id: 123, enabled: false) { id } }

This disabled my entry. But how can I completely remove my entry?

aquafun20 avatar Sep 19 '19 10:09 aquafun20

First instinct is that you may not want to do this from GraphQL or any data api, because Entries have complex relations to other tables.

You could have a look at calling through Ajax Craft's EntriesController::actionDeleteEntry() to manage this properly, with the id, site, etc.. that you're interested in, and consider also user identity to be permitted to take such action...

narration-sd avatar Sep 19 '19 16:09 narration-sd