Class ObjectType
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.InterfaceType
software.amazon.awscdk.services.appsync.ObjectType
- All Implemented Interfaces:
IIntermediateType
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:49.553Z")
@Stability(Experimental)
public class ObjectType
extends InterfaceType
implements IIntermediateType
(experimental) Object Types are types declared by you.
Example:
GraphqlApi api; MappingTemplate dummyRequest; MappingTemplate dummyResponse; ObjectType info = ObjectType.Builder.create("Info") .definition(Map.of( "node", ResolvableField.Builder.create() .returnType(GraphqlType.string()) .args(Map.of( "id", GraphqlType.string())) .dataSource(api.addNoneDataSource("none")) .requestMappingTemplate(dummyRequest) .responseMappingTemplate(dummyResponse) .build())) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forObjectType
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.appsync.IIntermediateType
IIntermediateType.Jsii$Default, IIntermediateType.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionObjectType
(String name, ObjectTypeOptions props) protected
ObjectType
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ObjectType
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addField
(AddFieldOptions options) (experimental) Add a field to this Object Type.protected Resolver
generateResolver
(IGraphqlApi api, String fieldName) (experimental) Generate the resolvers linked to this Object Type.protected Resolver
generateResolver
(IGraphqlApi api, String fieldName, ResolvableFieldOptions options) (experimental) Generate the resolvers linked to this Object Type.(experimental) The Interface Types this Object Type implements.(experimental) The resolvers linked to this data source.void
setResolvers
(List<Resolver> value) (experimental) The resolvers linked to this data source.toString()
(experimental) Generate the string of this object type.Methods inherited from class software.amazon.awscdk.services.appsync.InterfaceType
attribute, attribute, getDefinition, getDirectives, getModes, getName, setModes
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.services.appsync.IIntermediateType
attribute, attribute, getDefinition, getDirectives, getIntermediateType, getName
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ObjectType
protected ObjectType(software.amazon.jsii.JsiiObjectRef objRef) -
ObjectType
protected ObjectType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ObjectType
- Parameters:
name
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
addField
(experimental) Add a field to this Object Type.Object Types must have both fieldName and field options.
- Specified by:
addField
in interfaceIIntermediateType
- Overrides:
addField
in classInterfaceType
- Parameters:
options
- the options to add a field. This parameter is required.
-
generateResolver
@Stability(Experimental) @NotNull protected Resolver generateResolver(@NotNull IGraphqlApi api, @NotNull String fieldName, @Nullable ResolvableFieldOptions options) (experimental) Generate the resolvers linked to this Object Type.- Parameters:
api
- This parameter is required.fieldName
- This parameter is required.options
-
-
generateResolver
@Stability(Experimental) @NotNull protected Resolver generateResolver(@NotNull IGraphqlApi api, @NotNull String fieldName) (experimental) Generate the resolvers linked to this Object Type.- Parameters:
api
- This parameter is required.fieldName
- This parameter is required.
-
toString
(experimental) Generate the string of this object type.- Specified by:
toString
in interfaceIIntermediateType
- Overrides:
toString
in classInterfaceType
-
getInterfaceTypes
(experimental) The Interface Types this Object Type implements.Default: - no interface types
- Specified by:
getInterfaceTypes
in interfaceIIntermediateType
-
getResolvers
(experimental) The resolvers linked to this data source.- Specified by:
getResolvers
in interfaceIIntermediateType
-
setResolvers
(experimental) The resolvers linked to this data source.- Specified by:
setResolvers
in interfaceIIntermediateType
-