MCPcopy Create free account
hub / github.com/aws-samples/aws-appsync-resolver-samples / request

Function request

samples/dynamodb/batch/batchGetItems.js:8–18  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

6 * @returns {import('@aws-appsync/utils').DynamoDBBatchGetItemRequest} the request
7 */
8export function request(ctx) {
9 return {
10 operation: 'BatchGetItem',
11 tables: {
12 Posts: {
13 keys: ctx.args.ids.map((id) => util.dynamodb.toMapValues({ id })),
14 consistentRead: true,
15 },
16 },
17 };
18}
19
20/**
21 * Returns the BatchGetItem table items

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected