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
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")
Parameters
-
api_id
required - string -
arn
optional computed - string -
data_source
optional - string -
field
required - string -
id
optional computed - string -
kind
optional - string -
request_template
required - string -
response_template
required - string -
type
required - string -
caching_config
list block-
caching_keys
optional - set of string -
ttl
optional - number
-
-
pipeline_config
list block-
functions
optional - list of string
-
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
-
ResponseMappingTemplateS3Location
optional - String -
TypeName
required - String -
PipelineConfig
optional - PipelineConfig -
DataSourceName
optional - String -
RequestMappingTemplate
optional - String -
ResponseMappingTemplate
optional - String -
Kind
optional - String -
CachingConfig
optional - CachingConfig -
SyncConfig
optional - SyncConfig -
RequestMappingTemplateS3Location
optional - String -
ApiId
required - String -
FieldName
required - String
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.