Closed jmarshall9120 closed 1 year ago
Okay, of course after I give up I get it sorted. I called the API with 'filters' instead of 'filter'. Usually I though passing unrecognized parameters caused an error. I will have to test further.
@jmarshall9120 - closing this, as this was a user error. If you have any further questions or concerns, please reply to this ticket. Thank you!
Before opening, please confirm:
JavaScript Framework
Vue
Amplify APIs
GraphQL API
Amplify Categories
auth, api, hosting
Environment information
Describe the bug
Running a query with a secondary key as shown [here] (https://docs.amplify.aws/guides/api-graphql/query-with-sorting/q/platform/js/) results in a query with sorted results as expected, but when a filter is added it ignores the filter. Oddly the query seems formed correctly on the call, however it returns all results unfiltered.
Querying the same query, with same parameters from the app sync dashboard, the filter works as expected.
Expected behavior
The filter to be applied whether querying from the front end of an application, or using the app sync console.
Reproduction steps
To reproduce create the below models and run the code from some front end. You'll need to insert some dummy data.
payload of http post:
http response
This is dummy data, so no risk.
I get an opposite result through appsync:
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response