ngrx-json-api
ngrx-json-api copied to clipboard
add support for server-generated ids
a temporary ID is needed for ngrx-json-api till the POST completes. Adding a new flag "hasTemporaryId" to remove the ID from the POST request again. After that it is up to the application to switch from the temporary to the permanent id.
This allows for a server generated id, however when the post responses successful, the temp id needs to be updated.
"After that it is up to the application to switch from the temporary to the permanent id." > how do I listen for / update the store?
I think what @remmeier means is that the server will generate an id and that will be returned in a successful POST request. This server generated id will be used to index the StoreResource
and the StoreResource indexed by temporaryId
will be removed.