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

0 votes

We have an object in dynamo DB 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?

Currently 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 dynamo DB

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



 

Apr 21, 2022 in AWS by Soham
• 9,710 points
851 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 AWS

0 votes
1 answer
0 votes
1 answer

Adding Keypair to existing EC2 instance

No you can't. The reason is KeyPair ...READ MORE

answered Apr 8, 2018 in AWS by code_ninja
• 6,300 points
1,343 views
+1 vote
2 answers
+1 vote
3 answers
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,317 views
0 votes
0 answers
+1 vote
1 answer

How to convert a list of vectors with various length into a Data.Frame?

We can easily use this command as.data.frame(lapply(d1, "length< ...READ MORE

answered Apr 4, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,690 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,373 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