AppSync DynamoDB atomic append to existing list attribute and other list operations

0 votes

We have an object in dynamoDB with the key id and the data below in JSON format:

We are creating, getting, and updating this table through our frontend application using Amplify API connection to AppSync.

Currently, when we want to add items to our objects list, we overwrite the entire thing, but I know that it is possible to append new items to the existing data atomically.

My extra question is if append is supported, are other list operations supported for example splice and how do we implement it? Do we need to change the query on the client-side, or app syncs resolver / graphql schema?

Currenly I am updating my data by overwriting with a fresh copy every time using this command on the client side:

import { API } from "aws-amplify"; import { ... updateTable, ... } from "../graphql/mutations"; API.graphql({ query: updateTable, variables: variables })


Here is the data structure in dynamoDB

{ "id": "something", "objects": [ [ { "foo": [ "first", "second" ], "start": 0, "end": 20 }, { "bar": [ "third", "fourth" ], "start":10, "end": 40 }, ] ], }

Apr 12, 2022 in IoT (Internet of Things) by Soham
• 9,710 points
509 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In IoT (Internet of Things)

0 votes
1 answer

How to get Unicast, Dns and Gateway Address in UWP?

Try this code Snippet I found here: https://social.msdn.microsoft.com/Forums/en-US/27a8b7a8-8071-4bc1-bbd4-e7c1fc2bd8d7/windows-10-iot-core-how-do-you-create-a-tcp-server-and-client?forum=WindowsIoT ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,214 views
0 votes
1 answer

How to connect Raspberry Pi and lighting the LED?

You might want to try instead to ...READ MORE

answered Jul 23, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
665 views
0 votes
1 answer
0 votes
1 answer

What is the best way to retrofit existing alarm PIR with esp8266/etc?

Here is an explanation that best fits ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,017 views
0 votes
1 answer

When to use MQTT and when to use REST for event submission?

MQTT is designed to be a fast ...READ MORE

answered Sep 14, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,510 views
0 votes
0 answers

AppSync DynamoDB atomic append to existing list attribute and other list operations

We have an object in dynamo DB ...READ MORE

Apr 21, 2022 in AWS by Soham
• 9,710 points
831 views
0 votes
1 answer

AWS AppSync User relations for FriendsList

This is possible in AppSync today. To accomplish ...READ MORE

answered Sep 11, 2018 in AWS by Priyaj
• 58,020 points
1,312 views
0 votes
0 answers

Amplify pull --sandboxId <UUID> results in "Failed to pull sandbox app"

I'm trying to generate the data models ...READ MORE

Jan 24, 2023 in AWS by Tejashwini
• 3,820 points
405 views
0 votes
1 answer

Extending auto-generated Amplify Datastore classes with factory constructors

it seems like the issue is that ...READ MORE

answered Feb 17, 2023 in AWS by sarit
• 1,830 points
767 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP