AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

Resolver

An AppSync resolver.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as ResolverProps.

apiRequired
IGraphqlApi

The API this resolver is attached to.

1 property inherited from ExtendedResolverProps
dataSourceOptionalinherited from ExtendedResolverProps
BaseDataSource

The data source this resolver is using.

Default: - No datasource

10 properties inherited from BaseResolverProps
fieldNameRequiredinherited from BaseResolverProps
string

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

typeNameRequiredinherited from BaseResolverProps
string

name of the GraphQL type this resolver is attached to.

cachingConfigOptionalinherited from BaseResolverProps
CachingConfig

The caching configuration for this resolver.

Default: - No caching configuration

codeOptionalinherited from BaseResolverProps
Code

The function code.

Default: - no code is used

maxBatchSizeOptionalinherited from BaseResolverProps
number

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

Default: - No max batch size

metricsConfigOptionalinherited from BaseResolverProps
ResolverMetricsConfig

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

pipelineConfigOptionalinherited from BaseResolverProps
IFunctionConfigurationRef[]

configuration of the pipeline resolver.

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

requestMappingTemplateOptionalinherited from BaseResolverProps
MappingTemplate

The request mapping template for this resolver.

Default: - No mapping template

responseMappingTemplateOptionalinherited from BaseResolverProps
MappingTemplate

The response mapping template for this resolver.

Default: - No mapping template

runtimeOptionalinherited from BaseResolverProps
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