@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:47:01.084Z") @Stability(value=Experimental) public class ObjectType extends InterfaceType implements IIntermediateType
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
ObjectType.Builder
(experimental) A fluent builder for
ObjectType. |
software.amazon.jsii.JsiiObject.InitializationModeIIntermediateType.Jsii$Default, IIntermediateType.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
ObjectType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ObjectType(software.amazon.jsii.JsiiObjectRef objRef) |
|
ObjectType(String name,
ObjectTypeOptions props) |
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
List<InterfaceType> |
getInterfaceTypes()
(experimental) The Interface Types this Object Type implements.
|
List<Resolver> |
getResolvers()
(experimental) The resolvers linked to this data source.
|
void |
setResolvers(List<Resolver> value)
(experimental) The resolvers linked to this data source.
|
String |
toString()
(experimental) Generate the string of this object type.
|
attribute, attribute, getDefinition, getDirectives, getModes, getName, setModesjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitattribute, attribute, getDefinition, getDirectives, getIntermediateType, getNameprotected ObjectType(software.amazon.jsii.JsiiObjectRef objRef)
protected ObjectType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public ObjectType(@NotNull
String name,
@NotNull
ObjectTypeOptions props)
name - This parameter is required.props - This parameter is required.@Stability(value=Experimental)
public void addField(@NotNull
AddFieldOptions options)
Object Types must have both fieldName and field options.
addField in interface IIntermediateTypeaddField in class InterfaceTypeoptions - the options to add a field. This parameter is required.@Stability(value=Experimental) @NotNull protected Resolver generateResolver(@NotNull IGraphqlApi api, @NotNull String fieldName, @Nullable ResolvableFieldOptions options)
api - This parameter is required.fieldName - This parameter is required.options - @Stability(value=Experimental) @NotNull protected Resolver generateResolver(@NotNull IGraphqlApi api, @NotNull String fieldName)
api - This parameter is required.fieldName - This parameter is required.@Stability(value=Experimental) @NotNull public String toString()
toString in interface IIntermediateTypetoString in class InterfaceType@Stability(value=Experimental) @Nullable public List<InterfaceType> getInterfaceTypes()
Default: - no interface types
getInterfaceTypes in interface IIntermediateType@Stability(value=Experimental) @Nullable public List<Resolver> getResolvers()
getResolvers in interface IIntermediateType@Stability(value=Experimental)
public void setResolvers(@Nullable
List<Resolver> value)
setResolvers in interface IIntermediateTypeCopyright © 2022. All rights reserved.