Generating a GraphQL API From Your Database — The Magic of AWS AppSync
Published in
3 min readMay 26, 2019
How to fast-track your GraphQL API creation
This hands-on guide will hold your hands through each step as you let AWS create a GraphQL API for you using a DynamoDB table.
If you already have a DynamoDB table you want to use, skip ahead to the next section. If not, then go ahead and create a table of magical kittens:
- Go to Services > DynamoDB
- Click Create table.
- For Table name, enter: Magical-Kittens-Table
- For Primary key, enter: kitten_id
- Click Create.
- Then Create item.
- For Item {1} kitten-id, enter: brit-shorthair1
- Click on the + and Append a Number: { age : 0.5}
- Append a String: { personality : fierce }
- Append a Boolean: { magical: true } and click Save.
Voila! You now have a table. Let’s make that API now:
- Go to Services > AWS AppSync.
- Click Create API.
- Select Import DynamoDB…