How to add and delete from a set type? #390
Answered
by
raryanpur
meightythree
asked this question in
Q&A
-
Is it possible to directly add/delete from the |
Beta Was this translation helpful? Give feedback.
Answered by
raryanpur
Jun 9, 2024
Replies: 1 comment
-
Sure, you should be able to use the For example,
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
meightythree
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, you should be able to use the
add
anddelete
operations on thepatch
andupdate
mutations (docs here and here). These resolve to using theUPDATE
expression in Dynamo under the hood, so don't require you to read-modify-write in client code or use read capacity units.For example,
await ConnectionEntity.patch({userId}).delete({connectionIds: [<ids_to_remove>]})