Skip to content

Commit

Permalink
fix(amplify-appsync-simulator): allow null returns in response templa…
Browse files Browse the repository at this point in the history
…te (#2267)

Simulator converted falsy results to an empty object which prevented returning null for fields in
connection type and caused graphql validation error when query included a non nullable field

fix #2248
  • Loading branch information
yuth authored and kaustavghosh06 committed Sep 12, 2019
1 parent 47a0f67 commit 7056250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/amplify-appsync-simulator/src/velocity/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class VelocityTemplate {
identity,
stash: convertToJavaTypes(stash || {}),
source: convertToJavaTypes(source),
result: convertToJavaTypes(result || {}),
result: convertToJavaTypes(result),
};

if (prevResult) {
Expand Down

0 comments on commit 7056250

Please sign in to comment.