graphql-mapping-template
Advanced tools
Comparing version 3.4.0 to 3.4.1-beta.0
@@ -6,2 +6,18 @@ # Change Log | ||
## [3.4.1-beta.0](https://github.com/aws-amplify/amplify-cli/compare/graphql-mapping-template@3.1.1...graphql-mapping-template@3.4.1-beta.0) (2019-08-13) | ||
### Bug Fixes | ||
* **graphql-elasticsearch-transformer:** fixed es req template ([311f57d](https://github.com/aws-amplify/amplify-cli/commit/311f57d)) | ||
### Features | ||
* adding amplify cli predictions category ([#1936](https://github.com/aws-amplify/amplify-cli/issues/1936)) ([b7b7c2c](https://github.com/aws-amplify/amplify-cli/commit/b7b7c2c)) | ||
# [3.4.0](https://github.com/aws-amplify/amplify-cli/compare/graphql-mapping-template@3.1.1...graphql-mapping-template@3.4.0) (2019-08-07) | ||
@@ -8,0 +24,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Expression, ObjectNode, CompoundExpressionNode } from './ast'; | ||
import { Expression, ObjectNode, CompoundExpressionNode, ListNode } from './ast'; | ||
export declare class ElasticsearchMappingTemplate { | ||
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
static searchItem({ query, size, from, path, sort }: { | ||
static searchItem({ query, size, search_after, path, sort }: { | ||
path: Expression; | ||
@@ -23,4 +23,4 @@ sort?: Expression | ObjectNode; | ||
size?: Expression; | ||
from?: Expression; | ||
search_after?: Expression | ListNode; | ||
}): ObjectNode; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var print_1 = require("./print"); | ||
var ast_1 = require("./ast"); | ||
@@ -26,3 +27,3 @@ var ElasticsearchMappingTemplate = /** @class */ (function () { | ||
ElasticsearchMappingTemplate.searchItem = function (_a) { | ||
var query = _a.query, size = _a.size, from = _a.from, path = _a.path, sort = _a.sort; | ||
var query = _a.query, size = _a.size, search_after = _a.search_after, path = _a.path, sort = _a.sort; | ||
return ast_1.obj({ | ||
@@ -33,8 +34,3 @@ version: ast_1.str('2017-02-28'), | ||
params: ast_1.obj({ | ||
body: ast_1.obj({ | ||
from: from, | ||
size: size, | ||
sort: sort, | ||
query: query | ||
}) | ||
body: ast_1.raw("{\n #if( $context.args.nextToken )\"search_after\": " + print_1.print(search_after) + ", #end\n \"size\": " + print_1.print(size) + ",\n \"sort\": " + print_1.print(sort) + ",\n \"query\": " + print_1.print(query) + "\n }") | ||
}) | ||
@@ -41,0 +37,0 @@ }); |
{ | ||
"name": "graphql-mapping-template", | ||
"version": "3.4.0", | ||
"version": "3.4.1-beta.0", | ||
"description": "An AST wrapper around AWS AppSync resolvers", | ||
@@ -45,3 +45,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "a1daedd901266197bfe3c551e1e0013e14e88e6b" | ||
"gitHead": "5747d438683009424fa7e4cefae0a21efac35ea3" | ||
} |
@@ -0,5 +1,6 @@ | ||
import { print } from './print'; | ||
import { | ||
obj, Expression, str, ObjectNode, iff, ifElse, | ||
ref, raw, int, CompoundExpressionNode, compoundExpression, | ||
set, qref | ||
set, qref, ListNode, | ||
} from './ast'; | ||
@@ -31,3 +32,3 @@ | ||
*/ | ||
public static searchItem({ query, size, from, path, sort }: { | ||
public static searchItem({ query, size, search_after, path, sort }: { | ||
path: Expression, | ||
@@ -37,3 +38,3 @@ sort?: Expression | ObjectNode, | ||
size?: Expression, | ||
from?: Expression | ||
search_after?: Expression | ListNode | ||
}): ObjectNode { | ||
@@ -45,8 +46,8 @@ return obj({ | ||
params: obj({ | ||
body: obj({ | ||
from, | ||
size, | ||
sort, | ||
query | ||
}) | ||
body: raw(`{ | ||
#if( $context.args.nextToken )"search_after": ${print(search_after)}, #end | ||
"size": ${print(size)}, | ||
"sort": ${print(sort)}, | ||
"query": ${print(query)} | ||
}`) | ||
}) | ||
@@ -53,0 +54,0 @@ }) |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
107723
2110
2