re: A Beginner’s Guide to GraphQL VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The error handling in delete is interesting. REST would dictate that the deletion of a non existant user works (idempotency) and hence that the del...
 

I don't know if I understood correctly what you mean, but the way I think is, instead you return the deleted user you could return anything like a string saying "User deleted!" or something.

 

I was asking if GraphQL had the REST concept of idempotency (i.e. if you repeat a data-altering operation, then it behaves the same way - hence the 'deleting a deleted user'). Your implementation isn't idempotent, and I was asking if it should have been. Obviously if you delete something that's not there, the only sensible reply is probably 204 - again REST (IIRC) says this is what you should do, GraphQL...?

code of conduct - report abuse