An example serverless app created with SST.
Install the example.
$ npm init serverless-stack --example graphql-appsync
# Or with Yarn
$ yarn create serverless-stack --example graphql-appsyncStart the Live Lambda Development environment.
$ npm sst startOnce your local environment is ready, head over to the AppSync console.
Here you can run queries and mutations and make changes locally to test your Lambda resolvers.
mutation createNote {
createNote(note: { id: "001", content: "My note" }) {
id
content
}
}
query getNoteById {
getNoteById(noteId: "001") {
id
content
}
}
query listNotes {
listNotes {
id
content
}
}
mutation updateNote {
updateNote(note: { id: "001", content: "My updated note" }) {
id
content
}
}
mutation deleteNote {
deleteNote(noteId: "001")
}Starts the local Lambda development environment.
Build your app and synthesize your stacks.
Generates a .build/ directory with the compiled files and a .build/cdk.out/ directory with the synthesized CloudFormation stacks.
Deploy all your stacks to AWS. Or optionally deploy a specific stack.
Remove all your stacks and all of their resources from AWS. Or optionally remove a specific stack.
Runs your tests using Jest. Takes all the Jest CLI options.
Learn more about the Serverless Stack.