amplify-studio
amplify-studio copied to clipboard
model with index and sort causes sync issue on data manager
Before opening, please confirm:
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
App Id
d3agmbof1zzckq
Region
us-east-1
Environment name
dev
Figma File Version (if applicable)
No response
Amplify CLI Version
No response
If applicable, what version of Node.js are you using?
No response
What operating system are you using?
No response
Browser type?
No response
Describe the bug
using the following model
type Message @model @auth(rules: [{allow: public}]) {
id: ID!
text: String
type: String @index(name: "messagesByDate", queryField: "messagesByDate", sortKeyFields: ["createdAt"])
createdAt: String
}
and creating a record with the following
results in the following and does not change state
error on networking tab
{"data":{"createMessage":null},"errors":[{"path":["createMessage"],"data":null,"errorType":"DynamoDB:DynamoDbException","errorInfo":null,"locations":[{"line":2,"column":3,"sourceName":null}],"message":"One or more parameter values were invalid: Type mismatch for Index Key createdAt Expected: S Actual: NULL IndexName: messagesByDate (Service: DynamoDb, Status Code: 400, Request ID: GIG0V003AI19AR231KSTNQ1GIBVV4KQNSO5AEMVJF66Q9ASUAAJG)"}]}
Expected behavior
display error is mutation fails and work as expected
Reproduction steps
- use the data model provided then push using amplify cli
- open data manager
- create a record
Project Identifier
No response
Additional information
No response
Is there any update on that ?