aws / aws/aws-appsync-community

@aws-appsync/utils Dynamodb operations don't seem to support Sets

Open
#375 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
507
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hello, I don't know if it's me but I'm rather confused by the whole `DynamoDBOperation` set of helpers in `@aws-appsync/utils/dynamodb`.
I need to add to a `StringSet` in my mutation inside a Javascript resolver.

* `add` documentation: `Helper function to add a new attribute item when updating DynamoDB.` I assume this is a `SET` DynamoDB operation, so not an operation on sets.
* `increment` documentation: `Helper function to increment the existing attribute value in the item when updating DynamoDB.` Which probably translates to a `ADD` operation despite the doc (what I need) but only accepts numbers according to the types.
* leaves use with `append`: `Helper function to append to the existing list in DynamoDB`. Looks like it's only on list.

Also, I suppose removing from a StringSet is not through `decrement` nor `remove`. Does anyone have any pointers? In the meantime I'm writing the whole thing with `expression` and `expressionValues` but that somewhat defeats the whole purpose of the library. Thanks!

PS: I could not find the source for this library, that would definitely help answer my question. Where can we find it?

Contributor guide

Open the contributing guide

Research direction

Start at the @aws-appsync/utils/dynamodb helpers described in the issue and locate the library source, which the report could not find. Compare the documented add, increment, append, remove, and decrement operations with DynamoDB StringSet needs; done means the supported set operations and their usage are implemented or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
api, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.