Skip to content

Commit

Permalink
wip: adding support for code-based resolvers and functions to be updated
Browse files Browse the repository at this point in the history
  • Loading branch information
alharris-at committed Feb 9, 2023
1 parent 16c23b7 commit fa43af1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function isHotswappableAppSyncChange(
return ret;
}

const classifiedChanges = classifyChanges(change, ['RequestMappingTemplate', 'ResponseMappingTemplate']);
const classifiedChanges = classifyChanges(change, ['RequestMappingTemplate', 'ResponseMappingTemplate', 'Code', 'Runtime']);
classifiedChanges.reportNonHotswappablePropertyChanges(ret);

const namesOfHotswappableChanges = Object.keys(classifiedChanges.hotswappableProps);
Expand Down Expand Up @@ -51,6 +51,10 @@ export async function isHotswappableAppSyncChange(
...change.oldValue.Properties,
requestMappingTemplate: change.newValue.Properties?.RequestMappingTemplate,
responseMappingTemplate: change.newValue.Properties?.ResponseMappingTemplate,
code: change.newValue.Properties?.Code,
runtime: change.newValue.Properties?.Runtime
? { name: 'APPSYNC_JS', runtimeVersion: '1.0.0' }
: null,
};
const evaluatedResourceProperties = await evaluateCfnTemplate.evaluateCfnExpression(sdkProperties);
const sdkRequestObject = transformObjectKeys(evaluatedResourceProperties, lowerCaseFirstCharacter);
Expand Down

0 comments on commit fa43af1

Please sign in to comment.