-
Notifications
You must be signed in to change notification settings - Fork 87
paramsForServer Hook #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would go a more drastic way. We should deprecate the current In a next major release, I would like to rename the |
Here is a question, what do the params hooks do differently than something like this? async (context) => {
const { myParam, ...query } = context.params.query || {}
context.params = {
...query,
myParam
}
} |
Just a quick headsup. I started working on a massive rewrite of the package (#764). It's not released yet and will take a few weeks. This is what I came up with: I wrote these in my package 'feathers-utils' and use them for months. Porting them over to hooks-common. I deprecated the old paramsForServer & paramsFromClient. |
I think we should update the docs to include an example of how one might use the
paramsForServer
as a hook.I am not a fan of having to use the
paramsForServer
on every service call and would rather have it work more generically via a client side hook.I can update the docs at some point, but wanted to capture my solution.
The text was updated successfully, but these errors were encountered: