title: May I return state from a CQRS Command?
body: <p>I just learned about CQRS and have been analyzing my existing code, looking for places where I violate or apply CQRS.</p>
  
  <p>So far I haven't found any places where a query is changing state.
  However, many commands modify state and return a data object representing the updated state.<br>
  For example: An angular client makes an HTTP request to <code>/api/message.post</code>.  The user's id is attached to the request by the HTTP server (based on the HTTP headers) and passed to a microservice that handles <code>message.post</code> commands. The result of the command handler is <code>{ok: false}</code> or <code>{ok: true, message: {_id: "xyz", text: "new" ...}}</code> and the response object is proxied from the microservice back to Angular by the HTTP server.</p>
  
  <p>Is returning state from a command a violation of CQRS?<br>
  Should I return only "ok: true/false" from the command, then make a second request to get the new message? If so, why?<br>
  Is it worth the overhead if the request/responses are happening through http from a browser?</p>
  
  <p><em>edit</em> The reason I have the data I need at the end of my command is, my read and write models are currently identical. I do understand that in the future I can apply a write model for commands and a read model for queries, at which point it no longer makes sense to return the data the command wrote.</p>