[Gen 2] Feature request: Support secondary index query with sorting #5048
Labels
duplicate
This issue or pull request already exists
feature-request
A request for a new feature or an enhancement to an existing API or category.
GraphQL API
Issues related to the API (GraphQL) Category
pending-close-response-required
The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.
pending-community-response
Pending response from the issue opener or other community members
Description
The flutter gen2 doc regarding secondary index query here uses typescript as example.
so the model is:
After run client-code gen
npx ampx generate graphql-client-code --app-id xxxx --branch main --format modelgen --model-target dart --out lib/models
, I am not able to seelistByDate
function signature shown in the Message model's dart file, but I can only see the index created like below:I am not sure if sorting by secondary index is supported by flutter gen 2 or not, so created this feature request issue. What I want to do is the flutter way of
await client.models.Message.listByDate({ roomId: "YOUR_ROOM_ID", }, { sortDirection: 'DESC', })
but there is no instrution on the doc what is the function call to execute the index query and with sorting
Categories
Steps to Reproduce
As mentioned above.
Screenshots
No response
Platforms
Flutter Version
3.19.3
Amplify Flutter Version
2.0.0
Deployment Method
Amplify CLI
Schema
The text was updated successfully, but these errors were encountered: