-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Is your feature request related to a problem? Please describe.
I'm using nestjsx/crud
, an excellent library to create REST apis on top of typeorm and nestjs.
By default, relations/joins are not included in getOne/getMany responses,
And you need to specify in the url that you want to join them, means adding additional query params that are not configureable on the List
Component level.
There is a way to configure eager relations, but then there is no way to turn them off.
And it's not only list, but for Edit
and show.
I'm sure there's also relevant for other frameworks.
Describe the solution you'd like
A way to pass opaque configuration object, that will be set on the List
, Show
Edit
, and references
components, and will be transfer to the dataProvider on each action.
The data provider will figure out what more query params or additional actions to do by that config.
Describe alternatives you've considered
- Writing custom dataProvider and add configuration per resource
works, but, if i want the same resource with a bit different behaviour (say on a reference i want a more lightweight version) i will need to trick my provider, and create "virtual" resource to get different configuration. - duplicate resources on the server, with different default joins
its very cumbersome