-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support non string type in sort key in Eagerly load #2985
Comments
chrisbonifacio
added
to-be-reproduced
Pending reproduction
and removed
pending-triage
data-schema
labels
Nov 4, 2024
Hi @tcydig thanks for raising this issue! based on the linked code, it seems the transformer is incorrectly casting the numeric sort key value into a string which is causing this issue. |
tcydig
pushed a commit
to tcydig/amplify-category-api
that referenced
this issue
Nov 11, 2024
7 tasks
Hi @chrisbonifacio thank you for checking it and i am sorry to response late. today i fixed the issue and i made PR(#3011 )! |
Hey @tcydig, Thanks for raising the PR. We will review the PR and get back to you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment information
Data packages
Description
Which Category is your question related to?
API
What AWS Services are you utilizing?
Amplify Gen2(v6),AWS AppSync, DynamoDB
what is your goal
My goal is that i can get Patient and PlanDoc Info using Eagerly load
what is a issue
The problem is that when a Hasmany relation is created with PK and SK (Interger) and an Eagerly load is performed, a string type is forced on the SK of the child table and a type error occurs
Provide additional details e.g. code snippets
Hi, I'm trying to create a hasmany relation between two tables as follows:
(amplify/data/resource.ts)
Then I would like to get Patient and PlanDoc Info using Eagerly load as follows:
(i'm using Typescript)
I expected i get correct data without error after doing that query. But I got correct patient info and a error as follows:
After contacting the AWS support team, the reason was that the patientId attribute should be ‘N’ in the Query to the child table during the Eagerly load, but it was set to ‘S’.
Therefore, we feel that the parts of the amplify-category-api package, which generates the problematic resolver, need to be fixed.
amplify-category-api/packages/amplify-graphql-relational-transformer/src/resolver/ddb-generator.ts
Sorry, but I would like someone to confirm if this problem is a bug and, if so, Please could you fix it?
The text was updated successfully, but these errors were encountered: