HN user

happyshadows

27 karma
Posts2
Comments9
View on HN

This is my approach as well. Works very well with an event-sourcing model.

It is much easier to capture user intent with POST /api/customer/1/change-address-due-to-move { "address_1": "...", "address_2": "...", ... }

than with: PUT /api/customer/1 { "address_1": "...", "address_2": "...", ... }

Also, GET /api/resource/action is nice place for a payload describing the expected inputs to the action. Link it all together with hypermedia and you really have something ;)

Believe others are coming around to this line of thought: ThoughtWorks included "REST without PUT" onto their technology radar earlier this year.

Mutations is a great gem. I've used in my latest project and it has been an exceptionally useful tool for managing complexity.