Open mayteio opened 4 years ago
Create works nicely on the feature/many-to-many
branch though I have yet to get update or delete working.
Basically, via redux-sagas, we listen for CRUD_CREATE_SUCCESS
, CRUD_UPDATE_SUCCESS
, CRUD_DELETE_SUCCESS
and fire off new dataProvider calls depending on what we're trying to do. See here.
Delete would be easy - in the example app, there is a PostCategory connection (many to many) with a queryField postCategorysByPost
. You'd simple query this with the postId, then use dataProvider.delete to delete each connection.
Update is a little trickier:
postCategorysByPost
queryField
In the example, a post can have many editors.