Package graphql.schema.idl
Class TypeInfo
java.lang.Object
graphql.schema.idl.TypeInfo
This helper gives you access to the type info given a type definition
-
Method Summary
Modifier and TypeMethodDescription<T extends GraphQLType>
Tdecorate(GraphQLType objectType) This will decorate a graphql type with the original hierarchy of non null and list'ness it originally contained in its definition typebooleanstatic StringgetAstDesc(Type type) getName()static TypeNamegetTypeName(Type<?> type) Gets theTypeNametype name of a [Type], unwrapping any lists or non-null decorationsinthashCode()booleanisList()booleanbooleanisPlain()This will rename the type with the specified new name but will preserve the wrapping that was presenttoString()static TypeInfostatic StringGets the string type name of a [Type], unwrapping any lists or non-null decorations
-
Method Details
-
typeInfo
-
getRawType
-
getTypeName
-
getName
-
isList
public boolean isList() -
isNonNull
public boolean isNonNull() -
isPlain
public boolean isPlain() -
renameAs
This will rename the type with the specified new name but will preserve the wrapping that was present- Parameters:
newName- the new name of the type- Returns:
- a new type info rebuilt with the new name
-
decorate
This will decorate a graphql type with the original hierarchy of non null and list'ness it originally contained in its definition type- Type Parameters:
T- the type- Parameters:
objectType- this should be a graphql type that was originally built from this raw type- Returns:
- the decorated type
-
getAstDesc
-
unwrapOne
-
unwrapOneType
-
getTypeName
Gets theTypeNametype name of a [Type], unwrapping any lists or non-null decorations- Parameters:
type- the Type- Returns:
- the inner
TypeNamefor this type
-
typeName
Gets the string type name of a [Type], unwrapping any lists or non-null decorations- Parameters:
type- the Type- Returns:
- the inner string name for this type
-
equals
-
hashCode
public int hashCode() -
toString
-