AWS AppSync Resolver

This page shows how to write Terraform and CloudFormation for AWS AppSync Resolver and write them securely.

aws_appsync_resolver (Terraform)

The Resolver in AWS AppSync can be configured in Terraform with the resource name aws_appsync_resolver. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

poc_resolvers.tf#L2
resource "aws_appsync_resolver" "poc_mutation_create_person" {
  type              = "Mutation"
  api_id            = aws_appsync_graphql_api.poc_appsync_api.id
  data_source       = aws_appsync_datasource.poc_ds_person.name
  field             = "createPocPersonTable"
  response_template = file("resource/resolvers/person/person_create_response.vtl")

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an AppSync Resolver.

AWS::AppSync::Resolver (CloudFormation)

The Resolver in AppSync can be configured in CloudFormation with the resource name AWS::AppSync::Resolver. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

The AWS::AppSync::Resolver resource defines the logical GraphQL resolver that you attach to fields in a schema. Request and response templates for resolvers are written in Apache Velocity Template Language (VTL) format. For more information about resolvers, see Resolver Mapping Template Reference.

Note When you submit an update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template. To cause this resource to be updated you must change a property value for this resource in the CloudFormation template. Changing the Amazon S3 file content without changing a property value will not result in an update operation. See Update Behaviors of Stack Resources in the AWS CloudFormation User Guide.

Frequently asked questions

What is AWS AppSync Resolver?

AWS AppSync Resolver is a resource for AppSync of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS AppSync Resolver?

For Terraform, the jjoc007/poc-appsync-golang-mongo source code example is useful. See the Terraform Example section for further details.