ResolverProps
- class aws_cdk.aws_appsync.ResolverProps(*, field_name, type_name, caching_config=None, code=None, max_batch_size=None, pipeline_config=None, request_mapping_template=None, response_mapping_template=None, runtime=None, data_source=None, api)
Bases:
ExtendedResolverProps
Additional property for an AppSync resolver for GraphQL API reference.
- Parameters:
field_name (
str
) – name of the GraphQL field in the given type this resolver is attached to.type_name (
str
) – name of the GraphQL type this resolver is attached to.caching_config (
Union
[CachingConfig
,Dict
[str
,Any
],None
]) – The caching configuration for this resolver. Default: - No caching configurationcode (
Optional
[Code
]) – The function code. Default: - no code is usedmax_batch_size (
Union
[int
,float
,None
]) – The maximum number of elements per batch, when using batch invoke. Default: - No max batch sizepipeline_config (
Optional
[Sequence
[IAppsyncFunction
]]) – configuration of the pipeline resolver. Default: - no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unitrequest_mapping_template (
Optional
[MappingTemplate
]) – The request mapping template for this resolver. Default: - No mapping templateresponse_mapping_template (
Optional
[MappingTemplate
]) – The response mapping template for this resolver. Default: - No mapping templateruntime (
Optional
[FunctionRuntime
]) – The functions runtime. Default: - no function runtime, VTL mapping templates useddata_source (
Optional
[BaseDataSource
]) – The data source this resolver is using. Default: - No datasourceapi (
IGraphqlApi
) – The API this resolver is attached to.
- ExampleMetadata:
infused
Example:
# api: appsync.GraphqlApi # appsync_function: appsync.AppsyncFunction pipeline_resolver = appsync.Resolver(self, "pipeline", api=api, data_source=api.add_none_data_source("none"), type_name="typeName", field_name="fieldName", request_mapping_template=appsync.MappingTemplate.from_file("beforeRequest.vtl"), pipeline_config=[appsync_function], response_mapping_template=appsync.MappingTemplate.from_file("afterResponse.vtl") )
Attributes
- api
The API this resolver is attached to.
- caching_config
The caching configuration for this resolver.
- Default:
No caching configuration
- code
The function code.
- Default:
no code is used
- data_source
The data source this resolver is using.
- Default:
No datasource
- field_name
name of the GraphQL field in the given type this resolver is attached to.
- max_batch_size
The maximum number of elements per batch, when using batch invoke.
- Default:
No max batch size
- pipeline_config
configuration of the pipeline resolver.
- Default:
no pipeline resolver configuration
An empty array | undefined sets resolver to be of kind, unit
- request_mapping_template
The request mapping template for this resolver.
- Default:
No mapping template
- response_mapping_template
The response mapping template for this resolver.
- Default:
No mapping template
- runtime
The functions runtime.
- Default:
no function runtime, VTL mapping templates used
- type_name
name of the GraphQL type this resolver is attached to.