Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.09 KB

README.md

File metadata and controls

44 lines (35 loc) · 1.09 KB

Serverless GraphQL API

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

Schema

        schema {
            query: Query
            mutation: Mutation
        }

        type StellarObject {
            identifier: String
            type: String
            galaxy: String
        }

        input AddStellarObjectInput {
            identifier: String!
            type: String
            galaxy: String
        }

        input UpdateStellarObjectInput {
            identifier: String!
            type: String
            galaxy: String
        }

        type Mutation {
            addStellarObject(input: AddStellarObjectInput!): StellarObject
            updateStellarObject(input: UpdateStellarObjectInput!): StellarObject
            deleteStellarObject(identifier: String!): StellarObject
        }

        type Query {
            getStellarObject(identifier: String!): StellarObject
            getStellarObjects: [StellarObject]
            getStellarObjectCoordinates(identifier: String!): String
        }