Class ResolvableFieldOptions
(experimental) Properties for configuring a resolvable field.
Inheritance
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public class ResolvableFieldOptions : Object, IResolvableFieldOptions, IFieldOptions
Syntax (vb)
Public Class ResolvableFieldOptions
Inherits Object
Implements IResolvableFieldOptions, IFieldOptions
Remarks
Stability: Experimental
Options: responseMappingTemplate - the mapping template for responses from this resolver
ExampleMetadata: infused
Examples
GraphqlApi api;
ObjectType filmNode;
MappingTemplate dummyRequest;
MappingTemplate dummyResponse;
var string = GraphqlType.String();
var int = GraphqlType.Int();
api.AddMutation("addFilm", new ResolvableField(new ResolvableFieldOptions {
ReturnType = filmNode.Attribute(),
Args = new Dictionary<string, GraphqlType> { { "name", string }, { "film_number", int } },
DataSource = api.AddNoneDataSource("none"),
RequestMappingTemplate = dummyRequest,
ResponseMappingTemplate = dummyResponse
}));
Synopsis
Constructors
ResolvableFieldOptions() |
Properties
Args | (experimental) The arguments for this field. |
DataSource | (experimental) The data source creating linked to this resolvable field. |
Directives | (experimental) the directives for this field. |
PipelineConfig | (experimental) configuration of the pipeline resolver. |
RequestMappingTemplate | (experimental) The request mapping template for this resolver. |
ResponseMappingTemplate | (experimental) The response mapping template for this resolver. |
ReturnType | (experimental) The return type for this field. |
Constructors
ResolvableFieldOptions()
public ResolvableFieldOptions()
Properties
Args
(experimental) The arguments for this field.
public IDictionary<string, GraphqlType> Args { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, GraphqlType>
Remarks
i.e. type Example (first: String second: String) {}
Default: - no arguments
Stability: Experimental
DataSource
(experimental) The data source creating linked to this resolvable field.
public BaseDataSource DataSource { get; set; }
Property Value
Remarks
Default: - no data source
Stability: Experimental
Directives
(experimental) the directives for this field.
public Directive[] Directives { get; set; }
Property Value
Remarks
Default: - no directives
Stability: Experimental
PipelineConfig
(experimental) configuration of the pipeline resolver.
public IAppsyncFunction[] PipelineConfig { get; set; }
Property Value
Remarks
Default: - no pipeline resolver configuration An empty array or undefined prop will set resolver to be of type unit
Stability: Experimental
RequestMappingTemplate
(experimental) The request mapping template for this resolver.
public MappingTemplate RequestMappingTemplate { get; set; }
Property Value
Remarks
Default: - No mapping template
Stability: Experimental
ResponseMappingTemplate
(experimental) The response mapping template for this resolver.
public MappingTemplate ResponseMappingTemplate { get; set; }
Property Value
Remarks
Default: - No mapping template
Stability: Experimental
ReturnType
(experimental) The return type for this field.
public GraphqlType ReturnType { get; set; }
Property Value
Remarks
Stability: Experimental