amplify-category-api
amplify-category-api copied to clipboard
Ability to create Local Secondary Index for AppSync Model table
Environment information
NA
Describe the feature
Currently we can only crease GSI for the data models in Amplify.
ChartOfAccount: a
.model({
orgId: a.id().required(),
accountName: a.string().required(),
accountDescription: a.string(),
categoryName: a.string().required(),
categoryType: a.string().required(),}) //ex: "INCOME", "EXPENSE", "ASSET",
.identifier(["orgId", "accountName"])
.secondaryIndexes((index) => [index("orgId").sortKeys(["categoryName"])])
.authorization((allow) => [allow.owner()]),
});
There is no option to create Local Secondary Index for the model. Unable to update/add using the backend.ts as the table would be already created by then and the LSI should be created with the table.
Use case
To create and use Local Secondary Index for the data models in amplify.
Very important feature
Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂
Any update on this?