Open Aldo-Garza opened 2 weeks ago
Hi @Aldo-Garza 👋 thanks for raising this issue. I was able to reproduce consistently with the provided schema.
The string[][]
values returned from the data client do seem to be parsed incorrectly as string[]
.
I've marked this as a bug for the team to investigate further.
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 matrixThe 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
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