AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

AppsyncFunction

AppSync Functions are local functions that perform certain operations onto a backend data source. Developers can compose operations (Functions) and execute them in sequence with Pipeline Resolvers.

Import

import { AppsyncFunction } from 'aws-cdk-lib/aws-appsync';

Or use the module namespace:

import * as appsync from 'aws-cdk-lib/aws-appsync';
// appsync.AppsyncFunction

Properties

Configuration passed to the constructor as AppsyncFunctionProps.

apiRequired
IGraphqlApi

the GraphQL Api linked to this AppSync Function.

dataSourceRequired
BaseDataSource

the data source linked to this AppSync Function.

7 properties inherited from BaseAppsyncFunctionProps
nameRequiredinherited from BaseAppsyncFunctionProps
string

the name of the AppSync Function.

codeOptionalinherited from BaseAppsyncFunctionProps
Code

The function code.

Default: - no code is used

descriptionOptionalinherited from BaseAppsyncFunctionProps
string

the description for this AppSync Function.

Default: - no description

maxBatchSizeOptionalinherited from BaseAppsyncFunctionProps
number

The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation. Can only be set when using LambdaDataSource.

Default: - No max batch size

requestMappingTemplateOptionalinherited from BaseAppsyncFunctionProps
MappingTemplate

the request mapping template for the AppSync Function.

Default: - no request mapping template

responseMappingTemplateOptionalinherited from BaseAppsyncFunctionProps
MappingTemplate

the response mapping template for the AppSync Function.

Default: - no response mapping template

runtimeOptionalinherited from BaseAppsyncFunctionProps
FunctionRuntime

The functions runtime.

Default: - no function runtime, VTL mapping templates used

Get the AWS AppSync Cheat Sheet

Everything you need to know about AWS AppSync on one page. HD quality, print-friendly.

Download Free Infographic