AWS::AppSync::ResolverThe `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](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference.html) . > 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html) in the *AWS CloudFormation User Guide* .
import { CfnResolver } from 'aws-cdk-lib/aws-appsync';Or use the module namespace:
import * as appsync from 'aws-cdk-lib/aws-appsync';
// appsync.CfnResolverConfiguration passed to the constructor as CfnResolverProps.
apiIdRequiredstringThe AWS AppSync GraphQL API to which you want to attach this resolver.
fieldNameRequiredstringThe GraphQL field on a type that invokes the resolver.
typeNameRequiredstringThe GraphQL type that invokes this resolver.
cachingConfigOptionalIResolvable | CachingConfigPropertyThe caching configuration for the resolver.
codeOptionalstringThe `resolver` code that contains the request and response functions. When code is used, the `runtime` is required. The runtime value must be `APPSYNC_JS` .
codeS3LocationOptionalstringThe Amazon S3 endpoint.
dataSourceNameOptionalstringThe resolver data source name.
kindOptionalstringThe resolver type. - *UNIT* : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source. - *PIPELINE* : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of `Function` objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
maxBatchSizeOptionalnumberThe maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.
metricsConfigOptionalstringEnables 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.
pipelineConfigOptionalIResolvable | PipelineConfigPropertyFunctions linked with the pipeline resolver.
requestMappingTemplateOptionalstringThe 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.
requestMappingTemplateS3LocationOptionalstringThe location of a request mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
responseMappingTemplateOptionalstringThe response mapping template.
responseMappingTemplateS3LocationOptionalstringThe location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
runtimeOptionalIResolvable | AppSyncRuntimePropertyDescribes a runtime used by an AWS AppSync resolver or AWS AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
syncConfigOptionalIResolvable | SyncConfigPropertyThe `SyncConfig` for a resolver attached to a versioned data source.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about AWS AppSync on one page. HD quality, print-friendly.
Download Free Infographicaws-appsyncAWS::AppSync::Resolver