#set( $limit = $util.defaultIfNull($context.args.limit, 10) ) #set( $query = { "expression": "#type = :type and #connectionAttribute = :connectionAttribute", "expressionNames": { "#type": "type", "#connectionAttribute": "parentId" }, "expressionValues": { ":type": { "S": "AREA" }, ":connectionAttribute": { "S": "$context.source.id" } } } ) { "version": "2017-02-28", "operation": "Query", "query": $util.toJson($query), "scanIndexForward": #if( $context.args.sortDirection ) #if( $context.args.sortDirection == "ASC" ) true #else false #end #else true #end, "filter": #if( $context.args.filter ) $util.transform.toDynamoDBFilterExpression($ctx.args.filter) #else null #end, "limit": $limit, "nextToken": #if( $context.args.nextToken ) "$context.args.nextToken" #else null #end, "index": "ByTypeAndParent-index" }