@PublicApi public class GraphQLTypeReference extends java.lang.Object implements GraphQLNamedOutputType, GraphQLNamedInputType
Constructor and Description |
---|
GraphQLTypeReference(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
TraversalControl |
accept(TraverserContext<GraphQLSchemaElement> context,
GraphQLTypeVisitor visitor) |
Node |
getDefinition()
The AST
Node this schema element is based on. |
java.lang.String |
getDescription() |
java.lang.String |
getName() |
static GraphQLTypeReference |
typeRef(java.lang.String typeName)
A factory method for creating type references so that when used with static imports allows
more readable code such as
.type(typeRef(GraphQLString)) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getChildrenWithTypeReferences, withNewChildren
public static GraphQLTypeReference typeRef(java.lang.String typeName)
.type(typeRef(GraphQLString))
typeName
- the name of the type to referencepublic java.lang.String getName()
getName
in interface GraphQLNamedSchemaElement
public java.lang.String getDescription()
getDescription
in interface GraphQLNamedSchemaElement
public Node getDefinition()
GraphQLNamedSchemaElement
Node
this schema element is based on. Is null if the GraphQLSchema
is not based on a SDL document.
Some elements also have additional extension Nodes. See for example GraphQLObjectType.getExtensionDefinitions()
getDefinition
in interface GraphQLNamedSchemaElement
public TraversalControl accept(TraverserContext<GraphQLSchemaElement> context, GraphQLTypeVisitor visitor)
accept
in interface GraphQLSchemaElement