docs icon indicating copy to clipboard operation
docs copied to clipboard

Lack of complex examples in the documentation

Open sundnet opened this issue 1 year ago • 1 comments

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:

sundnet avatar Sep 15 '24 15:09 sundnet

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

esauerbo avatar Sep 18 '24 15:09 esauerbo