Class TypeUtil
java.lang.Object
graphql.schema.idl.TypeUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturnstrueif the provided type is a list type, otherwise returnsfalse.static booleanReturnstrueif the provided type is a non null type, otherwise returnsfalse.static booleanReturnstrueif the given type is a non null or list type, that is a wrapped type, otherwise returnsfalse.static StringsimplePrint(Type type) This will return the type in graphql SDL format, eg [typeName!]!static TypeNameUnwraps all layers of the type or just returns the type again if it's not a wrapped typestatic TypeUnwraps one layer of the type or just returns the type again if it's not a wrapped type
-
Constructor Details
-
TypeUtil
public TypeUtil()
-
-
Method Details
-
simplePrint
-
unwrapAll
-
unwrapOne
-
isNonNull
Returnstrueif the provided type is a non null type, otherwise returnsfalse.- Parameters:
type- the type to check- Returns:
trueif the provided type is a non null type otherwisefalse
-
isList
Returnstrueif the provided type is a list type, otherwise returnsfalse.- Parameters:
type- the type to check- Returns:
trueif the provided type is a list typ, otherwisefalse
-
isWrapped
Returnstrueif the given type is a non null or list type, that is a wrapped type, otherwise returnsfalse.- Parameters:
type- the type to check- Returns:
trueif the given type is a non null or list type, otherwisefalse
-