@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:03.096Z") @Stability(value=Experimental) public class GraphqlType extends software.amazon.jsii.JsiiObject implements IField
GraphQL Types are the building blocks for object types, queries, mutations, etc. They are types like String, Int, Id or even Object Types you create.
i.e. String, String!, [String], [String!], [String]!
GraphQL Types are used to define the entirety of schema.
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();
software.amazon.jsii.JsiiObject.InitializationModeIField.Jsii$Default, IField.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
GraphqlType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
GraphqlType(software.amazon.jsii.JsiiObjectRef objRef) |
protected |
GraphqlType(Type type) |
protected |
GraphqlType(Type type,
GraphqlTypeOptions options) |
| Modifier and Type | Method and Description |
|---|---|
String |
argsToString()
(experimental) Generate the arguments for this field.
|
static GraphqlType |
awsDate()
(experimental) `AWSDate` scalar type represents a valid extended `ISO 8601 Date` string.
|
static GraphqlType |
awsDate(BaseTypeOptions options)
(experimental) `AWSDate` scalar type represents a valid extended `ISO 8601 Date` string.
|
static GraphqlType |
awsDateTime()
(experimental) `AWSDateTime` scalar type represents a valid extended `ISO 8601 DateTime` string.
|
static GraphqlType |
awsDateTime(BaseTypeOptions options)
(experimental) `AWSDateTime` scalar type represents a valid extended `ISO 8601 DateTime` string.
|
static GraphqlType |
awsEmail()
(experimental) `AWSEmail` scalar type represents an email address string (i.e.`username@example.com`).
|
static GraphqlType |
awsEmail(BaseTypeOptions options)
(experimental) `AWSEmail` scalar type represents an email address string (i.e.`username@example.com`).
|
static GraphqlType |
awsIpAddress()
(experimental) `AWSIPAddress` scalar type respresents a valid `IPv4` of `IPv6` address string.
|
static GraphqlType |
awsIpAddress(BaseTypeOptions options)
(experimental) `AWSIPAddress` scalar type respresents a valid `IPv4` of `IPv6` address string.
|
static GraphqlType |
awsJson()
(experimental) `AWSJson` scalar type represents a JSON string.
|
static GraphqlType |
awsJson(BaseTypeOptions options)
(experimental) `AWSJson` scalar type represents a JSON string.
|
static GraphqlType |
awsPhone()
(experimental) `AWSPhone` scalar type represents a valid phone number.
|
static GraphqlType |
awsPhone(BaseTypeOptions options)
(experimental) `AWSPhone` scalar type represents a valid phone number.
|
static GraphqlType |
awsTime()
(experimental) `AWSTime` scalar type represents a valid extended `ISO 8601 Time` string.
|
static GraphqlType |
awsTime(BaseTypeOptions options)
(experimental) `AWSTime` scalar type represents a valid extended `ISO 8601 Time` string.
|
static GraphqlType |
awsTimestamp()
(experimental) `AWSTimestamp` scalar type represents the number of seconds since `1970-01-01T00:00Z`.
|
static GraphqlType |
awsTimestamp(BaseTypeOptions options)
(experimental) `AWSTimestamp` scalar type represents the number of seconds since `1970-01-01T00:00Z`.
|
static GraphqlType |
awsUrl()
(experimental) `AWSURL` scalar type represetns a valid URL string.
|
static GraphqlType |
awsUrl(BaseTypeOptions options)
(experimental) `AWSURL` scalar type represetns a valid URL string.
|
String |
directivesToString()
(experimental) Generate the directives for this field.
|
String |
directivesToString(List<AuthorizationType> _modes)
(experimental) Generate the directives for this field.
|
static GraphqlType |
doBoolean()
(experimental) `Boolean` scalar type is a boolean value: true or false.
|
static GraphqlType |
doBoolean(BaseTypeOptions options)
(experimental) `Boolean` scalar type is a boolean value: true or false.
|
static GraphqlType |
doFloat()
(experimental) `Float` scalar type is a signed double-precision fractional value.
|
static GraphqlType |
doFloat(BaseTypeOptions options)
(experimental) `Float` scalar type is a signed double-precision fractional value.
|
static GraphqlType |
doInt()
(experimental) `Int` scalar type is a signed non-fractional numerical value.
|
static GraphqlType |
doInt(BaseTypeOptions options)
(experimental) `Int` scalar type is a signed non-fractional numerical value.
|
IIntermediateType |
getIntermediateType()
(experimental) the intermediate type linked to this attribute (i.e.
|
Boolean |
getIsList()
(experimental) property determining if this attribute is a list i.e.
|
Boolean |
getIsRequired()
(experimental) property determining if this attribute is non-nullable i.e.
|
Boolean |
getIsRequiredList()
(experimental) property determining if this attribute is a non-nullable list i.e.
|
Type |
getType()
(experimental) the type of attribute.
|
static GraphqlType |
id()
(experimental) `ID` scalar type is a unique identifier.
|
static GraphqlType |
id(BaseTypeOptions options)
(experimental) `ID` scalar type is a unique identifier.
|
static GraphqlType |
intermediate()
(experimental) an intermediate type to be added as an attribute (i.e.
|
static GraphqlType |
intermediate(GraphqlTypeOptions options)
(experimental) an intermediate type to be added as an attribute (i.e.
|
static GraphqlType |
string()
(experimental) `String` scalar type is a free-form human-readable text.
|
static GraphqlType |
string(BaseTypeOptions options)
(experimental) `String` scalar type is a free-form human-readable text.
|
String |
toString()
(experimental) Generate the string for this attribute.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFieldOptionsprotected GraphqlType(software.amazon.jsii.JsiiObjectRef objRef)
protected GraphqlType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
protected GraphqlType(@NotNull
Type type,
@Nullable
GraphqlTypeOptions options)
type - This parameter is required.options - @Stability(value=Experimental)
protected GraphqlType(@NotNull
Type type)
type - This parameter is required.@Stability(value=Experimental) @NotNull public static GraphqlType awsDate(@Nullable BaseTypeOptions options)
In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsDate()
In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.
@Stability(value=Experimental) @NotNull public static GraphqlType awsDateTime(@Nullable BaseTypeOptions options)
In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsDateTime()
In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.
@Stability(value=Experimental) @NotNull public static GraphqlType awsEmail(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsEmail()
@Stability(value=Experimental) @NotNull public static GraphqlType awsIpAddress(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsIpAddress()
@Stability(value=Experimental) @NotNull public static GraphqlType awsJson(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsJson()
@Stability(value=Experimental) @NotNull public static GraphqlType awsPhone(@Nullable BaseTypeOptions options)
The number can specify a country code at the beginning, but is not required for US phone numbers.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsPhone()
The number can specify a country code at the beginning, but is not required for US phone numbers.
@Stability(value=Experimental) @NotNull public static GraphqlType awsTime(@Nullable BaseTypeOptions options)
In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsTime()
In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.
@Stability(value=Experimental) @NotNull public static GraphqlType awsTimestamp(@Nullable BaseTypeOptions options)
Timestamps are serialized and deserialized as numbers.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsTimestamp()
Timestamps are serialized and deserialized as numbers.
@Stability(value=Experimental) @NotNull public static GraphqlType awsUrl(@Nullable BaseTypeOptions options)
URLs wihtout schemes or contain double slashes are considered invalid.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType awsUrl()
URLs wihtout schemes or contain double slashes are considered invalid.
@Stability(value=Experimental) @NotNull public static GraphqlType doBoolean(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType doBoolean()
@Stability(value=Experimental) @NotNull public static GraphqlType doFloat(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType doFloat()
@Stability(value=Experimental) @NotNull public static GraphqlType id(@Nullable BaseTypeOptions options)
Often used as a key for a cache and not intended to be human-readable.
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType id()
Often used as a key for a cache and not intended to be human-readable.
@Stability(value=Experimental) @NotNull public static GraphqlType doInt(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType doInt()
@Stability(value=Experimental) @NotNull public static GraphqlType intermediate(@Nullable GraphqlTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.@Stability(value=Experimental) @NotNull public static GraphqlType intermediate()
@Stability(value=Experimental) @NotNull public static GraphqlType string(@Nullable BaseTypeOptions options)
options - the options to configure this attribute - isList - isRequired - isRequiredList.@Stability(value=Experimental) @NotNull public static GraphqlType string()
@Stability(value=Experimental) @NotNull public String argsToString()
argsToString in interface IField@Stability(value=Experimental) @NotNull public String directivesToString(@Nullable List<AuthorizationType> _modes)
directivesToString in interface IField_modes - @Stability(value=Experimental) @NotNull public String directivesToString()
directivesToString in interface IField@Stability(value=Experimental) @NotNull public String toString()
@Stability(value=Experimental) @NotNull public Boolean getIsList()
Default: - false
@Stability(value=Experimental) @NotNull public Boolean getIsRequired()
Default: - false
getIsRequired in interface IField@Stability(value=Experimental) @NotNull public Boolean getIsRequiredList()
Default: - false
getIsRequiredList in interface IField@Stability(value=Experimental) @NotNull public Type getType()
@Stability(value=Experimental) @Nullable public IIntermediateType getIntermediateType()
Default: - no intermediate type
getIntermediateType in interface IFieldCopyright © 2022. All rights reserved.