VTL resolver tutorials for Amazon AppSync
Note
We now primarily support the APPSYNC_JS runtime and its documentation. Please consider using the APPSYNC_JS runtime and its guides here.
Data sources and resolvers are used by Amazon AppSync to translate GraphQL requests and fetch information from your Amazon resources. Amazon AppSync supports automatic provisioning and connections with certain data source types. Amazon AppSync also supports Amazon Lambda, Amazon DynamoDB, relational databases (Amazon Aurora Serverless), Amazon OpenSearch Service, and HTTP endpoints as data sources. You can use a GraphQL API with your existing Amazon resources or build data sources and resolvers from scratch. The following sections are meant to elucidate some of the more common GraphQL use cases in the form of tutorials.
Amazon AppSync uses mapping templates written in Apache Velocity Template Language (VTL) for resolvers. For more information about using mapping templates, see the Resolver mapping template reference. More information about working with VTL is available in the Resolver mapping template programming guide.
Amazon AppSync supports the automatic provisioning of DynamoDB tables from a GraphQL schema as described in Provision from schema (optional) and Launch a sample schema. You can also import from an existing DynamoDB table which will create schema and connect resolvers. This is outlined in Import from Amazon DynamoDB (optional).
Topics
- Creating a simple post application using DynamoDB resolvers
- Using Amazon Lambda resolvers
- Using OpenSearch Service resolvers
- Using local resolvers
- Combining GraphQL resolvers
- Using DynamoDB batch operations
- Performing DynamoDB transactions
- Using HTTP resolvers
- Using Aurora Serverless resolvers
- Using pipeline resolvers
- Using Delta Sync operations on versioned data sources