Class ResolverProps
Additional property for an AppSync resolver for GraphQL API reference.
Inheritance
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ResolverProps : Object, IResolverProps, IExtendedResolverProps, IBaseResolverProps
Syntax (vb)
Public Class ResolverProps
Inherits Object
Implements IResolverProps, IExtendedResolverProps, IBaseResolverProps
Remarks
ExampleMetadata: infused
Examples
GraphqlApi api;
AppsyncFunction appsyncFunction;
var pipelineResolver = new Resolver(this, "pipeline", new ResolverProps {
Api = api,
DataSource = api.AddNoneDataSource("none"),
TypeName = "typeName",
FieldName = "fieldName",
RequestMappingTemplate = MappingTemplate.FromFile("beforeRequest.vtl"),
PipelineConfig = new [] { appsyncFunction },
ResponseMappingTemplate = MappingTemplate.FromFile("afterResponse.vtl")
});
Synopsis
Constructors
ResolverProps() |
Properties
Api | The API this resolver is attached to. |
CachingConfig | The caching configuration for this resolver. |
Code | The function code. |
DataSource | The data source this resolver is using. |
FieldName | name of the GraphQL field in the given type this resolver is attached to. |
MaxBatchSize | The maximum number of elements per batch, when using batch invoke. |
PipelineConfig | configuration of the pipeline resolver. |
RequestMappingTemplate | The request mapping template for this resolver. |
ResponseMappingTemplate | The response mapping template for this resolver. |
Runtime | The functions runtime. |
TypeName | name of the GraphQL type this resolver is attached to. |
Constructors
ResolverProps()
public ResolverProps()
Properties
Api
The API this resolver is attached to.
public IGraphqlApi Api { get; set; }
Property Value
CachingConfig
The caching configuration for this resolver.
public ICachingConfig CachingConfig { get; set; }
Property Value
Remarks
Default: - No caching configuration
Code
The function code.
public Code Code { get; set; }
Property Value
Remarks
Default: - no code is used
DataSource
The data source this resolver is using.
public BaseDataSource DataSource { get; set; }
Property Value
Remarks
Default: - No datasource
FieldName
name of the GraphQL field in the given type this resolver is attached to.
public string FieldName { get; set; }
Property Value
System.String
MaxBatchSize
The maximum number of elements per batch, when using batch invoke.
public Nullable<double> MaxBatchSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - No max batch size
PipelineConfig
configuration of the pipeline resolver.
public IAppsyncFunction[] PipelineConfig { get; set; }
Property Value
Remarks
Default: - no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unit
RequestMappingTemplate
The request mapping template for this resolver.
public MappingTemplate RequestMappingTemplate { get; set; }
Property Value
Remarks
Default: - No mapping template
ResponseMappingTemplate
The response mapping template for this resolver.
public MappingTemplate ResponseMappingTemplate { get; set; }
Property Value
Remarks
Default: - No mapping template
Runtime
The functions runtime.
public FunctionRuntime Runtime { get; set; }
Property Value
Remarks
Default: - no function runtime, VTL mapping templates used
TypeName
name of the GraphQL type this resolver is attached to.
public string TypeName { get; set; }
Property Value
System.String