Class TypeMapper

  • All Implemented Interfaces:

    
    public class TypeMapper
    
                        

    Maps GraphQL types to Java types using ViaductSchema.TypeExpr. TypeExpr provides: - baseTypeDef: the base type (String, Int, User, etc.) - baseTypeNullable: is the base type nullable? - listDepth: depth of list nesting (0 = not a list, 1 = List, 2 = List

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeMapper()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String toJavaType(ViaductSchema.TypeExpr<out Object> typeExpr) Maps a ViaductSchema.TypeExpr to its Java representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeMapper

        TypeMapper()
    • Method Detail

      • toJavaType

         String toJavaType(ViaductSchema.TypeExpr<out Object> typeExpr)

        Maps a ViaductSchema.TypeExpr to its Java representation.

        Parameters:
        typeExpr - the type expression
        Returns:

        the Java type string