VTL resolver tutorials for AWS 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 AWS AppSync to translate GraphQL requests and fetch information from your AWS resources. AWS AppSync supports automatic provisioning and connections with certain data source types. AWS AppSync also supports AWS 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 AWS 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.
AWS 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.
AWS 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 AWS 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