Class Type

java.lang.Object
io.smallrye.graphql.schema.model.Reference
io.smallrye.graphql.schema.model.Type
All Implemented Interfaces:
Serializable

public final class Type extends Reference
Represent a GraphQL Type. A Type is one of the options for a response, it's a complex type that contains fields that itself is of a certain type. It's a Java Bean that we only care about the getter methods and properties. A Type is a java bean with fields, but can optionally also have operations (queries) that is done with the Source annotation. A Type can also optionally implements interfaces.
Author:
Phillip Kruger (phillip.kruger@redhat.com)
See Also:
  • Constructor Details

    • Type

      public Type()
    • Type

      public Type(String className, String name, String description)
  • Method Details

    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getFields

      public Map<String,Field> getFields()
    • setFields

      public void setFields(Map<String,Field> fields)
    • addField

      public void addField(Field field)
    • hasFields

      public boolean hasFields()
    • hasField

      public boolean hasField(String fieldName)
    • getOperations

      public Map<String,Operation> getOperations()
    • setOperations

      public void setOperations(Map<String,Operation> operations)
    • addOperation

      public void addOperation(Operation operation)
    • hasOperations

      public boolean hasOperations()
    • hasOperation

      public boolean hasOperation(String operationName)
    • getBatchOperations

      public Map<String,Operation> getBatchOperations()
    • setBatchOperations

      public void setBatchOperations(Map<String,Operation> operations)
    • addBatchOperation

      public void addBatchOperation(Operation operation)
    • hasBatchOperations

      public boolean hasBatchOperations()
    • hasBatchOperation

      public boolean hasBatchOperation(String operationName)
    • getInterfaces

      public Set<Reference> getInterfaces()
    • setInterfaces

      public void setInterfaces(Set<Reference> interfaces)
    • addInterface

      public void addInterface(Reference interfaceType)
    • hasInterfaces

      public boolean hasInterfaces()
    • isInterface

      public boolean isInterface()
    • setIsInterface

      public void setIsInterface(boolean isInterface)
    • getUnionMemberships

      public Set<Reference> getUnionMemberships()
    • addUnion

      public void addUnion(Reference unionType)
    • hasUnionMemberships

      public boolean hasUnionMemberships()
    • isMemberOfUnion

      public boolean isMemberOfUnion(Reference unionType)
    • toString

      public String toString()
      Overrides:
      toString in class Reference