Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UserScheduleTypeResolver:
- Type: AWS::AppSync::Resolver
- DependsOn: SessionManagerSchema
- Properties:
- ApiId: !GetAtt SessionManagerApi.ApiId
- TypeName: UserSchedule
- FieldName: Sessions
- DataSourceName: !GetAtt SessionsTableDataSource.Name
- RequestMappingTemplate: !Sub |
- #set($ids = [])
- #foreach($item in ${!ctx.source.items})
- #set($map = {})
- $util.qr($map.put("SessionId", $util.dynamodb.toString($item.SessionId)))
- $util.qr($ids.add($map))
- #end
- {
- "version" : "2018-05-29",
- "operation" : "BatchGetItem",
- "tables" : {
- "${DDBSessionsTable}": {
- "keys": $util.toJson($ids),
- "consistentRead": true
- }
- }
- }
- ResponseMappingTemplate: !Sub |
- $util.toJson($ctx.result.data.${DDBSessionsTable})
Add Comment
Please, Sign In to add comment