Skip to content
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

Lack of complex examples in the documentation #7966

Open
sundnet opened this issue Sep 15, 2024 · 1 comment
Open

Lack of complex examples in the documentation #7966

sundnet opened this issue Sep 15, 2024 · 1 comment

Comments

@sundnet
Copy link

sundnet commented Sep 15, 2024

Describe the content issue:
I tried to describe CartItem data model and update the CartItem but it was hard to get an example to update properties where there is hash and sort key. Most of the example or search or chatgpt solutions only provide gen1 examples . The below code was generated by chat gpt, but i could not correct it as there is lack of complex examples everywhere. Manytimes, i had to trial and error or rely on chatgpt to provide the code but sometimes even that fails. Please add tons of example snippets for variety of scenarios and it wont cost AWS anything ,but it is very hepful for coders who are new to gen2 amplify .

await client.models.CartItem.update({
userId: userId,
lineItemId: lineItemId, // Composite key
{ quantity: quantity, total: quantity * cartItems.find((item) => item.id.lineItemId === lineItemId)?.price ?? 0 },
});

URL page where content issue is:

@esauerbo
Copy link
Contributor

Hey @sundnet sorry you're having issues getting this working. Can you provide the link to the tutorial you're working with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants