You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However the returned data does not comply with the expected data type which is string[][], instead it returns string[] (the return
type of the sdk is in fact correct string[][], but the data is not ), causing errors when trying to use the data.
Looking over your use-case, we do not currently support building a matrix of elements in the way that you are attempting to do. Could you structure the data as multiple records or store it in a json field or manager serializing/deserializing the data in your code to accomplish the requirements of your application?
Thank you for pointing out that our types expose the .array operator inside of an array field, this is an error and we will correct the types to resolve this bug.
The schema definition syntax issue that mistakenly allowed for fields of arrays within arrays has been fixed with the latest version of the library. As a bug, this is resolved, so I will resolve this issue. If there is a feature request to extend behavior to cover cases like this, please open an issue with the details/use-cases.
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
No response
Backend
Amplify Gen 2
Environment information
Describe the bug
The model is described as
MatrixTest: a.model({ values: a.string().required().array().required().array().required() }).authorization((allow) =>[allow.publicApiKey()]),
Which represents a string matrix
The following server actions are used to insert and read a matrix
The following snippet is used to read and create such entity
However the returned data does not comply with the expected data type which is string[][], instead it returns string[] (the return
type of the sdk is in fact correct string[][], but the data is not ), causing errors when trying to use the data.
This is the value returned by the sdk
Which must be, note the value part
Expected behavior
Details given on the description
Reproduction steps
Details given on the description
Code Snippet
// Put your code below this line.
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
The text was updated successfully, but these errors were encountered: