cdk-appsync-api-gateway-resolvers

Resolvers to map Appsync queries/mutations to API Gateway endpoints

Usage no npm install needed!

<script type="module">
  import cdkAppsyncApiGatewayResolvers from 'https://cdn.skypack.dev/cdk-appsync-api-gateway-resolvers';
</script>

README

cdk-appsync-api-gateway-resolvers

Built with typescript version dependants license

Resolvers to map Appsync queries/mutations to API Gateway endpoints

Example Useage

const resolverRole = new ApiGatewayResolverRole(
  this,
  'groupResolverRole',
  legacyApiArn
);

const dataSource = new ApiGatewayDataSource(this, 'groupDataSource', {
  apiId,
  httpEndpoint: legacyApiDomain,
  serviceRoleArn: resolverRole.roleArn,
});

new GetResolver(this, {
  apiId,
  dataSourceName: dataSource.attrName,
  apiStage: stageName,
  apiPath: 'groups',
  fieldName: 'group',
  responseMappingTemplatePath: join(
    __dirname,
    '../resolvers/getGroupResponse.vtl'
  ),
});

Checklist

CD Feature Provided
Typescript
Linting (AirBnB + Prettier)
Unit tests (Jest)
Coverage check (ideally 100% with Jest)
Github Continuous Deployment

Built by Skyhook

This module is contributed by the team at Skyhook.