public class GraphQLTypeUtil
extends java.lang.Object
Constructor and Description |
---|
GraphQLTypeUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getUnwrappedTypeName(GraphQLType type)
This will get the unwrapped type name that includes the non null and list wrappers
so it might be '[typeName!]'
|
static boolean |
isEnum(GraphQLType type)
Returns true if the given type is an enum type
|
static boolean |
isInput(GraphQLType type)
Returns true if the given type is an input type
|
static boolean |
isLeaf(GraphQLType type)
Returns true if the given type is a leaf type, that it cant contain any more fields
|
static boolean |
isList(GraphQLType type)
Returns true if the given type is a list type
|
static boolean |
isNonNull(GraphQLType type)
Returns true if the given type is a non null type
|
static boolean |
isNotWrapped(GraphQLType type)
Returns true if the given type is NOT a non null or list type
|
static boolean |
isNullable(GraphQLType type)
Returns true if the given type is a nullable type
|
static boolean |
isScalar(GraphQLType type)
Returns true if the given type is a scalar type
|
static boolean |
isWrapped(GraphQLType type)
Returns true if the given type is a non null or list type, that is a wrapped type
|
static GraphQLUnmodifiedType |
unwrapAll(GraphQLType type)
Unwraps all layers of the type or just returns the type again if its not a wrapped type
|
static GraphQLType |
unwrapOne(GraphQLType type)
Unwraps one layer of the type or just returns the type again if its not a wrapped type
|
public static java.lang.String getUnwrappedTypeName(GraphQLType type)
type
- the type in playpublic static boolean isNonNull(GraphQLType type)
type
- the type to checkpublic static boolean isNullable(GraphQLType type)
type
- the type to checkpublic static boolean isList(GraphQLType type)
type
- the type to checkpublic static boolean isWrapped(GraphQLType type)
type
- the type to checkpublic static boolean isNotWrapped(GraphQLType type)
type
- the type to checkpublic static boolean isScalar(GraphQLType type)
type
- the type to checkpublic static boolean isEnum(GraphQLType type)
type
- the type to checkpublic static boolean isLeaf(GraphQLType type)
type
- the type to checkpublic static boolean isInput(GraphQLType type)
type
- the type to checkpublic static GraphQLType unwrapOne(GraphQLType type)
type
- the type to unwrapOnepublic static GraphQLUnmodifiedType unwrapAll(GraphQLType type)
type
- the type to unwrapOne