Skip to content

bhati416416/serverlessdataapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Serverless Data API

MIT License

Cloudformation/SAM yaml file to create a GraphQL API with AWS AppSync backed by a DynamoDB table.

Check out this article for a breakdown of each resource in the template

https://dev.to/tom_millner/build-a-serverless-data-api-with-appsync-and-dynamodb-3jmi

Schema

        schema {
          query: Query
          mutation: Mutation
        }
        type Data {
          data: [AWSJSON]
          pk1: String
          sk1: String
        }
        type DataCollection {
          items: [Data]
          nextToken: String
        }
        input WriteDataInput {
          pk1: String!
          sk1: String!
          data: [AWSJSON]!
        }
        input UpdateDataInput {
          pk1: String!
          sk1: String!
          data: [AWSJSON]!
        }
        type Mutation {
          writeData(input: WriteDataInput!): Data
          updateData(input: UpdateDataInput!): Data
          deleteData(pk1: String!, sk1: String!): Data
        }
        type Query {
          readData(pk1: String!, sk1: String!): Data
          readAllPKData(pk1: String!): DataCollection
        }

About

serverless data api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published