You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using just only one argument as an object with named properties, could be interesting to turn it in more arguments with something like: createLoader(model, loaderName, options).
IMO, with it, can be separated the concern by domains, the required args: model and loaderName, and the options as an optional argument with default values.
Code Example
// Maybe in `loaderName` could be transform User to `UserLoader` under the hoodcreateLoader(UserModel,'User',{
viewerCanSee =defaultViewerCanSee,
filterMapping ={},
isAggregate =false,
shouldValidateContextUser =false,
defaultFilters ={},
defaultConditions ={},
defaultSort ={createdAt: -1},});
The text was updated successfully, but these errors were encountered:
IMO, with it, can be separated the concern by domains, the required args: model and loaderName, and the options as an optional argument with default values.
Yes! It would be a bigger breaking change (probably some major update). I'll try to do POC to implement this (and some other things).
Suggestion
Instead of using just only one argument as an object with named properties, could be interesting to turn it in more arguments with something like:
createLoader(model, loaderName, options)
.IMO, with it, can be separated the concern by domains, the required args:
model
andloaderName
, and theoptions
as an optional argument with default values.Code Example
The text was updated successfully, but these errors were encountered: