aws-cdk-lib.aws_appsync.ExtendedResolverProps

interface ExtendedResolverProps

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

Additional property for an AppSync resolver for data source reference.

Example

// 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';

declare const appsyncFunction: appsync.AppsyncFunction;
declare const baseDataSource: appsync.BaseDataSource;
declare const code: appsync.Code;
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,
  pipelineConfig: [appsyncFunction],
  requestMappingTemplate: mappingTemplate,
  responseMappingTemplate: mappingTemplate,
  runtime: functionRuntime,
};

Properties

NameTypeDescription
fieldNamestringname of the GraphQL field in the given type this resolver is attached to.
typeNamestringname of the GraphQL type this resolver is attached to.
cachingConfig?CachingConfigThe caching configuration for this resolver.
code?CodeThe function code.
dataSource?BaseDataSourceThe data source this resolver is using.
maxBatchSize?numberThe maximum number of elements per batch, when using batch invoke.
pipelineConfig?IAppsyncFunction[]configuration of the pipeline resolver.
requestMappingTemplate?MappingTemplateThe request mapping template for this resolver.
responseMappingTemplate?MappingTemplateThe response mapping template for this resolver.
runtime?FunctionRuntimeThe functions runtime.

fieldName

Type: string

name of the GraphQL field in the given type this resolver is attached to.


typeName

Type: string

name of the GraphQL type this resolver is attached to.


cachingConfig?

Type: CachingConfig (optional, default: No caching configuration)

The caching configuration for this resolver.


code?

Type: Code (optional, default: no code is used)

The function code.


dataSource?

Type: BaseDataSource (optional, default: No datasource)

The data source this resolver is using.


maxBatchSize?

Type: number (optional, default: No max batch size)

The maximum number of elements per batch, when using batch invoke.


pipelineConfig?

Type: IAppsyncFunction[] (optional, default: no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unit)

configuration of the pipeline resolver.


requestMappingTemplate?

Type: MappingTemplate (optional, default: No mapping template)

The request mapping template for this resolver.


responseMappingTemplate?

Type: MappingTemplate (optional, default: No mapping template)

The response mapping template for this resolver.


runtime?

Type: FunctionRuntime (optional, default: no function runtime, VTL mapping templates used)

The functions runtime.