This is a Graphql API built with AWS AppSync, DynamoDB and Lambda. The application was generated using the AWS CDK CLI and uses Typescript as the development langauge. For more information on using the AWS CDK with Typescript visit AWS Docs.
Download or clone the repository and run npm init. This will install the needed depencies on your machine. The lib directory constains the stack and its constructs.
export class BookStoreGraphqlApiStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// Constructs
})
}The lambda function are stored within the functions directory. The cdk.json file tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template