This project deploys a basic GraphQL API built with Neptune Graph database, AWS AppSync, and AWS Lambda.
First, clone the project:
git clone [email protected]:dabit3/cdk-appsync-neptune.git
Next, change into the directories and install the dependencies:
cdk cdk-appsync-neptune
npm install
# or
yarn
Next, also change into the lambda-fns
directory to install the dependencies there:
cd lambda-fns
npm install
# or
yarn
To deploy the API and services, build the project and then run the deploy
command:
npm run build && cdk deploy
To test it out, open the AWS AppSync Console and try running the following queries:
query listPosts {
listPosts {
id
title
content
}
}
mutation createPost {
createPost(post: {
content:"Hello world"
title: "My first pos!!"
}) {
id
title
content
}
}