Skip to content
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

using $noSelect throws an error #57

Closed
ewingrj opened this issue Sep 2, 2019 · 1 comment
Closed

using $noSelect throws an error #57

ewingrj opened this issue Sep 2, 2019 · 1 comment

Comments

@ewingrj
Copy link

ewingrj commented Sep 2, 2019

From what I can tell, the $noSelect needs to be a query param. However when including it as a queryParam, feathers throws the following error:

error: BadRequest: Invalid query parameter $noSelect
    at new BadRequest (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/node_modules/@feathersjs/errors/lib/index.js:86:17)
    at commons_1._.each (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/lib/filter-query.js:41:27)
    at Object.keys.forEach.key (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/node_modules/@feathersjs/commons/lib/utils.js:15:45)
    at Array.forEach (<anonymous>)
    at Object.each (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/node_modules/@feathersjs/commons/lib/utils.js:15:30)
    at cleanQuery (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/lib/filter-query.js:35:21)
    at Object.filterQuery [as default] (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/lib/filter-query.js:87:20)
    at Object.filterQuery (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/lib/service.js:45:46)
    at Object._patch (/Users/rjewing/code/personal/evolution/packages/api/node_modules/feathers-objection/lib/index.js:513:14)
    at callMethod (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/lib/service.js:12:22)
    at Object.patch (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/adapter-commons/lib/service.js:83:16)
    at processHooks.call.then.hookObject (/Users/rjewing/code/personal/evolution/packages/api/node_modules/@feathersjs/feathers/lib/hooks/index.js:56:27)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
@dekelev
Copy link
Member

dekelev commented Sep 7, 2019

Any non-standard query operator needs to be explicitly whitelisted in the service file:

https://blog.feathersjs.com/feathers-2019-new-years-news-f478d5f2c8cd#60e1

@dekelev dekelev closed this as completed Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants