-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Enhance paramsForServer
with parameters with specific values.
#607
base: master
Are you sure you want to change the base?
Enhance paramsForServer
with parameters with specific values.
#607
Conversation
paramsForServer
with parameters with specific values.
Please, take a look at my comment there |
@J3m5 Allowing a filtering function within the That would be a more straightforward solution over hard-coding the |
Ok I get it. There is one small problem however. And I think the added code could be isolated in a separate function. |
This is a good idea. Can you double check the conflicts from the other PRs merged? |
Will update it these days or even today. |
Pretty nice! I also thought about this before. A mention about this in the docs would be pretty neat! @Yavorss could you add this to the docs? |
@Yavorss were you able to make any additional progress on this. I should have some time soon to take a look, if not. |
Summary
This a solution to the issue with
-1
fromfeathers-hooks-common
mentioned here #590. The solution is simple. Instead of filtering only by parameter, we could filter by parameter with a specific value. For instance,paramsForServer: [['$limit', '-1']]
orparamsForServer: [['$limit', value => value === '-1']]
. This is not a breaking change.Other Information
If that looks good for the team, we could update the documentation and link that PR to here as well.