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 typeboolean
static String
getAstDesc
(Type type) getName()
static TypeName
getTypeName
(Type<?> type) Gets theTypeName
type name of a [Type], unwrapping any lists or non-null decorationsint
hashCode()
boolean
isList()
boolean
boolean
isPlain()
This will rename the type with the specified new name but will preserve the wrapping that was presenttoString()
static TypeInfo
static String
Gets 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 theTypeName
type name of a [Type], unwrapping any lists or non-null decorations- Parameters:
type
- the Type- Returns:
- the inner
TypeName
for 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
-