# CfnResolverProps

Properties for defining a `CfnResolver`.

Extends: CfnResolverProps
Used as props by: CfnResolver

- Source: Generated code
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

```ts
// 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,
  metricsConfig: 'metricsConfig',
  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

- `apiId`: string (required) — The AWS AppSync GraphQL API to which you want to attach this resolver.

- `cachingConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResolver.CachingConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnResolver.CachingConfigProperty.html) — The caching configuration for the resolver.

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

- `codeS3Location`: string — The Amazon S3 endpoint.

- `dataSourceName`: string — The resolver data source name.

- `fieldName`: string (required) — The GraphQL field on a type that invokes the resolver.

- `kind`: string — 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`: number — The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.

- `metricsConfig`: 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.

- `pipelineConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResolver.PipelineConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnResolver.PipelineConfigProperty.html) — Functions linked with the pipeline resolver.

- `requestMappingTemplate`: 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.

- `requestMappingTemplateS3Location`: string — 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`: string — The response mapping template.

- `responseMappingTemplateS3Location`: string — 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`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResolver.AppSyncRuntimeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnResolver.AppSyncRuntimeProperty.html) — Describes 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.

- `syncConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResolver.SyncConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnResolver.SyncConfigProperty.html) — The `SyncConfig` for a resolver attached to a versioned data source.

- `typeName`: string (required) — The GraphQL type that invokes this resolver.
