GraphQL

Description

Open in GitHub

First, make sure you've run npm i -g serverless and added your AWS credentials.

git clone [email protected]:serverless-cqrs/graphql-example.git
cd graphql-example
npm i
serverless deploy

Once deployed, navigate to the returned endpoint url and you'll see the graphql playground, where you can run the following queries:

mutation {
  addTodo(id: "123", title: "Get Milk")
}
query {
  getById(id: "123") {
    id
    todos {
      title
      completed
    }
  }
}

Last updated

Was this helpful?