Enhance paramsForServer with parameters with specific values.#607
Enhance paramsForServer with parameters with specific values.#607Yavorss wants to merge 6 commits intofeathersjs-ecosystem:masterfrom
paramsForServer with parameters with specific values.#607Conversation
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
-1fromfeathers-hooks-commonmentioned 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.