Action-based (RPC-like) interactions
Hi! I'm pretty new in the whole stack, so probably the question is noobish.
I must implement a mix of data-centric and "command/action" views. Some pages are relevant to entities ("resources") some are not.
E.g., cases:
1) I have a resource called "plate", I want to call "cleanPlate" on the server side.
2) I have a server-side method that is not relevant to any resource (e.g., "putHouseOnFire")
I probably could implement this with "direct" calls to the back end, but it does not sound right, assuming we have a facility to communicate with the back end. From another hand, dataProvider is to provide data, not to initiate actions.
The initial idea was to add resources with only names and custom calls e.g. in the <Refine> resources section:
{
name: "put_house_on_fire",
custom: "/put-house-on-fire",
}
But it is not correct.
What would be the proper way to handle things like this?
I must implement a mix of data-centric and "command/action" views. Some pages are relevant to entities ("resources") some are not.
E.g., cases:
1) I have a resource called "plate", I want to call "cleanPlate" on the server side.
2) I have a server-side method that is not relevant to any resource (e.g., "putHouseOnFire")
I probably could implement this with "direct" calls to the back end, but it does not sound right, assuming we have a facility to communicate with the back end. From another hand, dataProvider is to provide data, not to initiate actions.
The initial idea was to add resources with only names and custom calls e.g. in the <Refine> resources section:
{
name: "put_house_on_fire",
custom: "/put-house-on-fire",
}
But it is not correct.
What would be the proper way to handle things like this?
