aws / aws/aws-appsync-community
@aws-appsync/utils incomplete type DynamoDBTransactGetItemsRequest
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
According to the [docs](https://docs.aws.amazon.com/appsync/latest/devguide/js-aws-appsync-resolver-reference-dynamodb-transact-get-items.html), `TransactGetItems` supports an optional `projection` on each element of the `transactItems` array. However, the optional `projection` attribute is missing from the `DynamoDBTransactGetItemsRequest` type.
Current (incomplete) type:
```ts
export type DynamoDBTransactGetItemsRequest = {
operation: 'TransactGetItems';
transactItems: {
table: string;
key: Key;
}[];
};
```
Expected type:
```ts
export type DynamoDBTransactGetItemsRequest = {
operation: 'TransactGetItems';
transactItems: {
table: string;
key: Key;
projection?: DynamoDBProjectionExpression;
}[];
};
```
My installed version: `"@aws-appsync/utils": "^1.12.0",`
Contributor guide
Research direction
Locate the @aws-appsync/utils definition of DynamoDBTransactGetItemsRequest and compare it with the AWS AppSync TransactGetItems documentation linked in the issue. Update the transactItems element type so projection is optional and uses DynamoDBProjectionExpression; done means the documented request shape is accepted by the type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, typescript
- Domain
- api, backend, database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100