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.
When you submit an update, CFNLong 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 CFNshort template. Changing the S3 file content without changing a property value will not result in an update operation.
See Update Behaviors of Stack Resources in the User Guide.
api_id
(String) The APSYlong GraphQL API to which you want to attach this resolver.field_name
(String) The GraphQL field on a type that invokes the resolver.type_name
(String) The GraphQL type that invokes this resolver.caching_config
(Attributes) The caching configuration for the resolver. (see below for nested schema)code
(String) The resolver
code that contains the request and response functions. When code is used, the runtime
is required. The runtime value must be APPSYNC_JS
.code_s3_location
(String) The Amazon S3 endpoint.data_source_name
(String) The resolver data source name.kind
(String) The resolver type.
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.max_batch_size
(Number) The maximum number of resolver request inputs that will be sent to a single LAMlong function in a BatchInvoke
operation.metrics_config
(String) Enables or disables enhanced resolver metrics for specified resolvers. Note that MetricsConfig
won't be used unless the resolverLevelMetricsBehavior
value is set to PER_RESOLVER_METRICS
. If the resolverLevelMetricsBehavior
is set to FULL_REQUEST_RESOLVER_METRICS
instead, MetricsConfig
will be ignored. However, you can still set its value.pipeline_config
(Attributes) Functions linked with the pipeline resolver. (see below for nested schema)request_mapping_template
(String) The request mapping template.
Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.request_mapping_template_s3_location
(String) The location of a request mapping template in an S3 bucket. Use this if you want to provision with a template file in S3 rather than embedding it in your CFNshort template.response_mapping_template
(String) The response mapping template.response_mapping_template_s3_location
(String) The location of a response mapping template in an S3 bucket. Use this if you want to provision with a template file in S3 rather than embedding it in your CFNshort template.runtime
(Attributes) Describes a runtime used by an APSYlong resolver or APSYlong function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified. (see below for nested schema)sync_config
(Attributes) The SyncConfig
for a resolver attached to a versioned data source. (see below for nested schema)id
(String) Uniquely identifies the resource.resolver_arn
(String)caching_config
Required:
ttl
(Number) The TTL in seconds for a resolver that has caching activated.
Valid values are 1?3,600 seconds.Optional:
caching_keys
(List of String) The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments
, $context.source
, and $context.identity
maps.pipeline_config
Optional:
functions
(List of String) A list of Function
objects.runtime
Required:
name
(String) The name
of the runtime to use. Currently, the only allowed value is APPSYNC_JS
.runtime_version
(String) The version
of the runtime to use. Currently, the only allowed version is 1.0.0
.sync_config
Required:
conflict_detection
(String) The Conflict Detection strategy to use.
Optional:
conflict_handler
(String) The Conflict Resolution strategy to perform in the event of a conflict.
LambdaConflictHandlerConfig
.lambda_conflict_handler_config
(Attributes) The LambdaConflictHandlerConfig
when configuring LAMBDA
as the Conflict Handler. (see below for nested schema)sync_config.lambda_conflict_handler_config
Optional:
lambda_conflict_handler_arn
(String) The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.Import is supported using the following syntax:
$ terraform import awscc_appsync_resolver.example <resource ID>