# ExtendedResolverProps

Additional property for an AppSync resolver for data source reference.

Extends: ExtendedResolverProps
Extends: BaseResolverProps

- Source: [`aws-appsync/lib/resolver.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-appsync/lib/resolver.ts#L99)
- Type last changed: v2.60.0 · 12 Jan 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_appsync as appsync } from 'aws-cdk-lib';
import { aws_appsync as interfaces_appsync } from 'aws-cdk-lib/interfaces';

declare const baseDataSource: appsync.BaseDataSource;
declare const code: appsync.Code;
declare const functionConfigurationRef: interfaces_appsync.IFunctionConfigurationRef;
declare const functionRuntime: appsync.FunctionRuntime;
declare const mappingTemplate: appsync.MappingTemplate;
const extendedResolverProps: appsync.ExtendedResolverProps = {
  fieldName: 'fieldName',
  typeName: 'typeName',

  // the properties below are optional
  cachingConfig: {
    ttl: cdk.Duration.minutes(30),

    // the properties below are optional
    cachingKeys: ['cachingKeys'],
  },
  code: code,
  dataSource: baseDataSource,
  maxBatchSize: 123,
  metricsConfig: appsync.ResolverMetricsConfig.ENABLED,
  pipelineConfig: [functionConfigurationRef],
  requestMappingTemplate: mappingTemplate,
  responseMappingTemplate: mappingTemplate,
  runtime: functionRuntime,
};
```

## Properties

- `cachingConfig`: [CachingConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CachingConfig.html) — The caching configuration for this resolver.

  **Default:** No caching configuration

- `code`: [Code](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.Code.html) — The function code.

  **Default:** no code is used

- `dataSource`: [BaseDataSource](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.BaseDataSource.html) — The data source this resolver is using.

  **Default:** No datasource

- `fieldName`: string (required) — name of the GraphQL field in the given type this resolver is attached to.

- `maxBatchSize`: number — The maximum number of elements per batch, when using batch invoke.

  **Default:** No max batch size

- `metricsConfig`: [ResolverMetricsConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.ResolverMetricsConfig.html) — Whether to enable enhanced metrics Value will be ignored, if `enhancedMetricsConfig.resolverLevelMetricsBehavior` on AppSync GraphqlApi construct is set to `FULL_REQUEST_RESOLVER_METRICS`.

  **Default:** no metrics configuration

- `pipelineConfig`: [IFunctionConfigurationRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_appsync.IFunctionConfigurationRef.html)[] — configuration of the pipeline resolver.

  **Default:** no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unit

- `requestMappingTemplate`: [MappingTemplate](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.MappingTemplate.html) — The request mapping template for this resolver.

  **Default:** No mapping template

- `responseMappingTemplate`: [MappingTemplate](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.MappingTemplate.html) — The response mapping template for this resolver.

  **Default:** No mapping template

- `runtime`: [FunctionRuntime](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.FunctionRuntime.html) — The functions runtime.

  **Default:** no function runtime, VTL mapping templates used

- `typeName`: string (required) — name of the GraphQL type this resolver is attached to.
