Package io.smallrye.graphql.schema.model
Class Type
java.lang.Object
io.smallrye.graphql.schema.model.Reference
io.smallrye.graphql.schema.model.Type
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.smallrye.graphql.schema.model.Reference
Reference.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatchOperation(Operation operation) voidvoidaddInterface(Reference interfaceType) voidaddOperation(Operation operation) voidbooleanhasBatchOperation(String operationName) booleanbooleanbooleanbooleanbooleanhasOperation(String operationName) booleanbooleanbooleanbooleanisMemberOfUnion(Reference unionType) voidsetBatchOperations(Map<String, Operation> operations) voidsetDescription(String description) voidvoidsetInterfaces(Set<Reference> interfaces) voidsetIsInterface(boolean isInterface) voidsetOperations(Map<String, Operation> operations) toString()Methods inherited from class io.smallrye.graphql.schema.model.Reference
addDirectiveInstance, equals, getAdaptTo, getAdaptWith, getAllParametrizedTypes, getClassName, getClassParametrizedType, getClassParametrizedTypes, getDirectiveInstances, getGraphQLClassName, getName, getParentClassParametrizedTypes, getType, getWrapper, hasClassParameterizedTypes, hasDirectiveInstances, hashCode, hasWrapper, isAdaptingTo, isAdaptingWith, isAddParametrizedTypeNameExtension, setAdaptTo, setAdaptWith, setAddParametrizedTypeNameExtension, setClassName, setClassParametrizedTypes, setDirectiveInstances, setGraphQLClassName, setName, setParentClassParametrizedTypes, setType, setWrapper
-
Constructor Details
-
Type
public Type() -
Type
-
-
Method Details
-
getDescription
-
setDescription
-
getFields
-
setFields
-
addField
-
hasFields
public boolean hasFields() -
hasField
-
getOperations
-
setOperations
-
addOperation
-
hasOperations
public boolean hasOperations() -
hasOperation
-
getBatchOperations
-
setBatchOperations
-
addBatchOperation
-
hasBatchOperations
public boolean hasBatchOperations() -
hasBatchOperation
-
getInterfaces
-
setInterfaces
-
addInterface
-
hasInterfaces
public boolean hasInterfaces() -
isInterface
public boolean isInterface() -
setIsInterface
public void setIsInterface(boolean isInterface) -
getUnionMemberships
-
addUnion
-
hasUnionMemberships
public boolean hasUnionMemberships() -
isMemberOfUnion
-
toString
-