aws-cdk-lib.aws_appsync.CfnResolverProps

interface CfnResolverProps

LanguageType name
.NETAmazon.CDK.AWS.AppSync.CfnResolverProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#CfnResolverProps
Javasoftware.amazon.awscdk.services.appsync.CfnResolverProps
Pythonaws_cdk.aws_appsync.CfnResolverProps
TypeScript aws-cdk-lib » aws_appsync » CfnResolverProps

Properties for defining a CfnResolver.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cfnResolverProps: appsync.CfnResolverProps = {
  apiId: 'apiId',
  fieldName: 'fieldName',
  typeName: 'typeName',

  // the properties below are optional
  cachingConfig: {
    ttl: 123,

    // the properties below are optional
    cachingKeys: ['cachingKeys'],
  },
  code: 'code',
  codeS3Location: 'codeS3Location',
  dataSourceName: 'dataSourceName',
  kind: 'kind',
  maxBatchSize: 123,
  pipelineConfig: {
    functions: ['functions'],
  },
  requestMappingTemplate: 'requestMappingTemplate',
  requestMappingTemplateS3Location: 'requestMappingTemplateS3Location',
  responseMappingTemplate: 'responseMappingTemplate',
  responseMappingTemplateS3Location: 'responseMappingTemplateS3Location',
  runtime: {
    name: 'name',
    runtimeVersion: 'runtimeVersion',
  },
  syncConfig: {
    conflictDetection: 'conflictDetection',

    // the properties below are optional
    conflictHandler: 'conflictHandler',
    lambdaConflictHandlerConfig: {
      lambdaConflictHandlerArn: 'lambdaConflictHandlerArn',
    },
  },
};

Properties

NameTypeDescription
apiIdstringThe AWS AppSync GraphQL API to which you want to attach this resolver.
fieldNamestringThe GraphQL field on a type that invokes the resolver.
typeNamestringThe GraphQL type that invokes this resolver.
cachingConfig?IResolvable | CachingConfigPropertyThe caching configuration for the resolver.
code?stringThe resolver code that contains the request and response functions.
codeS3Location?stringThe Amazon S3 endpoint.
dataSourceName?stringThe resolver data source name.
kind?stringThe resolver type.
maxBatchSize?numberThe maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
pipelineConfig?IResolvable | PipelineConfigPropertyFunctions linked with the pipeline resolver.
requestMappingTemplate?stringThe request mapping template.
requestMappingTemplateS3Location?stringThe location of a request mapping template in an Amazon S3 bucket.
responseMappingTemplate?stringThe response mapping template.
responseMappingTemplateS3Location?stringThe location of a response mapping template in an Amazon S3 bucket.
runtime?IResolvable | AppSyncRuntimePropertyDescribes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
syncConfig?IResolvable | SyncConfigPropertyThe SyncConfig for a resolver attached to a versioned data source.

apiId

Type: string

The AWS AppSync GraphQL API to which you want to attach this resolver.


fieldName

Type: string

The GraphQL field on a type that invokes the resolver.


typeName

Type: string

The GraphQL type that invokes this resolver.


cachingConfig?

Type: IResolvable | CachingConfigProperty (optional)

The caching configuration for the resolver.


code?

Type: string (optional)

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 .


codeS3Location?

Type: string (optional)

The Amazon S3 endpoint.


dataSourceName?

Type: string (optional)

The resolver data source name.


kind?

Type: string (optional)

The 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.

maxBatchSize?

Type: number (optional)

The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.


pipelineConfig?

Type: IResolvable | PipelineConfigProperty (optional)

Functions linked with the pipeline resolver.


requestMappingTemplate?

Type: string (optional)

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.


requestMappingTemplateS3Location?

Type: string (optional)

The 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.


responseMappingTemplate?

Type: string (optional)

The response mapping template.


responseMappingTemplateS3Location?

Type: string (optional)

The 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.


runtime?

Type: IResolvable | AppSyncRuntimeProperty (optional)

Describes a runtime used by an AWS AppSync pipeline 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.


syncConfig?

Type: IResolvable | SyncConfigProperty (optional)

The SyncConfig for a resolver attached to a versioned data source.