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

How to pass filter fields and where parameter for get api #1202

Closed
vijeta-singh opened this issue Mar 28, 2018 · 2 comments
Closed

How to pass filter fields and where parameter for get api #1202

vijeta-singh opened this issue Mar 28, 2018 · 2 comments

Comments

@vijeta-singh
Copy link

In get api response I want selected property.
How I should pass fields filter and where parameter in get api call.

I am passing { "fields": {"id": true, "first_name": true, "last_name": true,"status":true} }.
Getting following error -
Unhandled error in GET /user?filter=%7B%22fields%22%3A%20%7B%22id%22%3A%20true%7D%7D: 500 AssertionError [ERR_ASSERTION]: The query argument must be an object

@vijeta-singh
Copy link
Author

Does loopback-next support api response filer by where option? I did not find any example regrading this in documentation.

@dhmlau dhmlau changed the title How to pass filer fields and where parameter for get api How to pass filter fields and where parameter for get api Apr 20, 2018
@dhmlau
Copy link
Member

dhmlau commented Apr 20, 2018

@vijeta-singh , this is related to the type coercion. In favor of #750, I'd like to close this issue and continue the discussion over there. Thanks.

@dhmlau dhmlau closed this as completed Apr 20, 2018
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