how do people write their delete mutation resolver...
# orm-help
b
how do people write their delete mutation resolvers? (like in a graceful way, i feel there should be more than just telling the datastore to yeet the record and not tell the client about more info)
r
Hey @bob 👋 Could you elaborate more on your use-case? Do you mean not deleting the records directly?
b
I mean just in general, when a query calls for a record to be removed from the database (deleting a user or a post) should there be some feedback to the client?
r
My personal approach firing the
delete
API in
try/catch
and then returning the deleted record on success and an error if fails or if the record is not found.