Is it possible to implement a custom request type in a custom provider in the react-admin framework?
My Use Case
In my case I have 2 separate cases of reference fields.
1. Reference ID field (normal)
api -> users/1
api -> comments/1
2. Sub Entity Reference
api -> users/1/comments/1
So I was planning to implement another request type, like this:
switch (type) {
case GET_LIST:
return apiGetList(resourceName, params);
case GET_MANY:
return apiGetMany(resourceName, params);
case GET_MANY_REFERENCE:
return apiGetManyReference(resourceName, params);
case GET_MANY_REFERENCE_CUSTOM:
return apiGetManyReferenceCustom(resourceName, params);
}
But I can't figure out how to trigger the type from the custom field?