-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Response from API.get is not what is expected with queryStringParameters #1244
Comments
I just realised I was working on old documentation, and have changed my project to suit the new documentation. I now get a result back from the API.get comment written in this manner. API.get('imageSetsCRUD', '/imageSets?status=active').then((response) => ... etc. And now response is a resource, filled with tonnes of information, but no results that I wanted.
|
On your lambda function you need to add FilterExpression. I did this. (The column was Years on my case)
and then I invoke like this
|
Ahh thanks. Why can't documentation refer to things like this... I haven't seen the words 'FilterExpression' anywhere in any documents or forums or discussions. This works perfectly. |
Cool |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Do you want to request a feature or report a bug?
Confusion rather than a feature of bug.
What is the current behavior?
I have aws-amplify set up in my project alongside awsmobile.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.
I have set the app up as per instructions, documentation, and examples. But using queryStringParameters does not work. I have the following to my cloud-api app in AWSMobilehub
and also
What is the expected behavior?
I don't get any errors from my query when I add a queryStringParameter inside the options... but it responds by returning my entire set instead of the ones I asked for...
In my following example. I have an attribute named status, with values active, inactive, completed.
The following code returns my entire result set, not just the active status items.
Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?
aws-amplify 1.0.0
aws-amplify-react 1.0.0
awsmobile-cli 1.1.4
The text was updated successfully, but these errors were encountered: