Class Resolver.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.Resolver.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Resolver>
- Enclosing class:
Resolver
@Stability(Stable)
public static final class Resolver.Builder
extends Object
implements software.amazon.jsii.Builder<Resolver>
A fluent builder for
Resolver
.-
Method Summary
Modifier and TypeMethodDescriptionapi
(IGraphqlApi api) The API this resolver is attached to.build()
cachingConfig
(CachingConfig cachingConfig) The caching configuration for this resolver.The function code.static Resolver.Builder
dataSource
(BaseDataSource dataSource) The data source this resolver is using.name of the GraphQL field in the given type this resolver is attached to.maxBatchSize
(Number maxBatchSize) The maximum number of elements per batch, when using batch invoke.pipelineConfig
(List<? extends IAppsyncFunction> pipelineConfig) configuration of the pipeline resolver.requestMappingTemplate
(MappingTemplate requestMappingTemplate) The request mapping template for this resolver.responseMappingTemplate
(MappingTemplate responseMappingTemplate) The response mapping template for this resolver.runtime
(FunctionRuntime runtime) The functions runtime.name of the GraphQL type this resolver is attached to.
-
Method Details
-
create
@Stability(Stable) public static Resolver.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Resolver.Builder
.
-
fieldName
name of the GraphQL field in the given type this resolver is attached to.- Parameters:
fieldName
- name of the GraphQL field in the given type this resolver is attached to. This parameter is required.- Returns:
this
-
typeName
name of the GraphQL type this resolver is attached to.- Parameters:
typeName
- name of the GraphQL type this resolver is attached to. This parameter is required.- Returns:
this
-
cachingConfig
The caching configuration for this resolver.Default: - No caching configuration
- Parameters:
cachingConfig
- The caching configuration for this resolver. This parameter is required.- Returns:
this
-
code
The function code.Default: - no code is used
- Parameters:
code
- The function code. This parameter is required.- Returns:
this
-
maxBatchSize
The maximum number of elements per batch, when using batch invoke.Default: - No max batch size
- Parameters:
maxBatchSize
- The maximum number of elements per batch, when using batch invoke. This parameter is required.- Returns:
this
-
pipelineConfig
@Stability(Stable) public Resolver.Builder pipelineConfig(List<? extends IAppsyncFunction> pipelineConfig) configuration of the pipeline resolver.Default: - no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unit
- Parameters:
pipelineConfig
- configuration of the pipeline resolver. This parameter is required.- Returns:
this
-
requestMappingTemplate
@Stability(Stable) public Resolver.Builder requestMappingTemplate(MappingTemplate requestMappingTemplate) The request mapping template for this resolver.Default: - No mapping template
- Parameters:
requestMappingTemplate
- The request mapping template for this resolver. This parameter is required.- Returns:
this
-
responseMappingTemplate
@Stability(Stable) public Resolver.Builder responseMappingTemplate(MappingTemplate responseMappingTemplate) The response mapping template for this resolver.Default: - No mapping template
- Parameters:
responseMappingTemplate
- The response mapping template for this resolver. This parameter is required.- Returns:
this
-
runtime
The functions runtime.Default: - no function runtime, VTL mapping templates used
- Parameters:
runtime
- The functions runtime. This parameter is required.- Returns:
this
-
dataSource
The data source this resolver is using.Default: - No datasource
- Parameters:
dataSource
- The data source this resolver is using. This parameter is required.- Returns:
this
-
api
The API this resolver is attached to.- Parameters:
api
- The API this resolver is attached to. This parameter is required.- Returns:
this
-
build
-