@PublicApi public class GraphQLObjectType extends java.lang.Object implements GraphQLType, GraphQLOutputType, GraphQLFieldsContainer, GraphQLCompositeType, GraphQLUnmodifiedType, GraphQLNullableType, GraphQLDirectiveContainer
GraphQLScalarType
s.
See http://graphql.org/learn/schema/#object-types-and-fields for more details on the concept.Modifier and Type | Class and Description |
---|---|
static class |
GraphQLObjectType.Builder |
Constructor and Description |
---|
GraphQLObjectType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLFieldDefinition> fieldDefinitions,
java.util.List<GraphQLOutputType> interfaces) |
GraphQLObjectType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLFieldDefinition> fieldDefinitions,
java.util.List<GraphQLOutputType> interfaces,
java.util.List<GraphQLDirective> directives,
ObjectTypeDefinition definition) |
Modifier and Type | Method and Description |
---|---|
TraversalControl |
accept(TraverserContext<GraphQLType> context,
GraphQLTypeVisitor visitor)
Double-dispatch entry point.
|
java.util.List<GraphQLType> |
getChildren() |
ObjectTypeDefinition |
getDefinition() |
java.lang.String |
getDescription() |
java.util.List<GraphQLDirective> |
getDirectives() |
GraphQLFieldDefinition |
getFieldDefinition(java.lang.String name) |
java.util.List<GraphQLFieldDefinition> |
getFieldDefinitions() |
java.util.List<GraphQLOutputType> |
getInterfaces() |
java.lang.String |
getName() |
static GraphQLObjectType.Builder |
newObject() |
static GraphQLObjectType.Builder |
newObject(GraphQLObjectType existing) |
java.lang.String |
toString() |
GraphQLObjectType |
transform(java.util.function.Consumer<GraphQLObjectType.Builder> builderConsumer)
This helps you transform the current GraphQLObjectType into another one by starting a builder with all
the current values and allows you to transform it how you want.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDirective, getDirectivesByName
public GraphQLObjectType(java.lang.String name, java.lang.String description, java.util.List<GraphQLFieldDefinition> fieldDefinitions, java.util.List<GraphQLOutputType> interfaces)
public GraphQLObjectType(java.lang.String name, java.lang.String description, java.util.List<GraphQLFieldDefinition> fieldDefinitions, java.util.List<GraphQLOutputType> interfaces, java.util.List<GraphQLDirective> directives, ObjectTypeDefinition definition)
public java.util.List<GraphQLDirective> getDirectives()
getDirectives
in interface GraphQLDirectiveContainer
public GraphQLFieldDefinition getFieldDefinition(java.lang.String name)
getFieldDefinition
in interface GraphQLFieldsContainer
public java.util.List<GraphQLFieldDefinition> getFieldDefinitions()
getFieldDefinitions
in interface GraphQLFieldsContainer
public java.util.List<GraphQLOutputType> getInterfaces()
public java.lang.String getDescription()
public java.lang.String getName()
getName
in interface GraphQLType
[_A-Za-z][_0-9A-Za-z]*
public ObjectTypeDefinition getDefinition()
public java.lang.String toString()
toString
in class java.lang.Object
public GraphQLObjectType transform(java.util.function.Consumer<GraphQLObjectType.Builder> builderConsumer)
builderConsumer
- the consumer code that will be given a builder to transformpublic TraversalControl accept(TraverserContext<GraphQLType> context, GraphQLTypeVisitor visitor)
GraphQLType
Node
, see accept(...) for more details about the pattern.accept
in interface GraphQLType
context
- TraverserContext bound to this graphQL type objectvisitor
- Visitor instance that performs actual processing on the types(s)public java.util.List<GraphQLType> getChildren()
getChildren
in interface GraphQLType
public static GraphQLObjectType.Builder newObject()
public static GraphQLObjectType.Builder newObject(GraphQLObjectType existing)