Class TypeInfo

java.lang.Object
graphql.schema.idl.TypeInfo

public class TypeInfo extends Object
This helper gives you access to the type info given a type definition
  • Method Details

    • typeInfo

      public static TypeInfo typeInfo(Type type)
    • getRawType

      public Type getRawType()
    • getTypeName

      public TypeName getTypeName()
    • getName

      public String getName()
    • isList

      public boolean isList()
    • isNonNull

      public boolean isNonNull()
    • isPlain

      public boolean isPlain()
    • renameAs

      public TypeInfo renameAs(String newName)
      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

      public <T extends GraphQLType> T decorate(GraphQLType objectType)
      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

      public static String getAstDesc(Type type)
    • unwrapOne

      public TypeInfo unwrapOne()
    • unwrapOneType

      public Type unwrapOneType()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object