@PublicApi public class GraphQLEnumType extends java.lang.Object implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLUnmodifiedType, GraphQLNullableType, GraphQLDirectiveContainer
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLEnumType.Builder |
Constructor and Description |
---|
GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values)
Deprecated.
use the
newEnum() builder pattern instead, as this constructor will be made private in a future version. |
GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values,
java.util.List<GraphQLDirective> directives,
EnumTypeDefinition definition)
Deprecated.
use the
newEnum() builder pattern instead, as this constructor will be made private in a future version. |
Modifier and Type | Method and Description |
---|---|
TraversalControl |
accept(TraverserContext<GraphQLType> context,
GraphQLTypeVisitor visitor)
Double-dispatch entry point.
|
java.util.List<GraphQLType> |
getChildren() |
Coercing |
getCoercing() |
EnumTypeDefinition |
getDefinition() |
java.lang.String |
getDescription() |
java.util.List<GraphQLDirective> |
getDirectives() |
java.lang.String |
getName() |
GraphQLEnumValueDefinition |
getValue(java.lang.String name) |
java.util.List<GraphQLEnumValueDefinition> |
getValues() |
static GraphQLEnumType.Builder |
newEnum() |
static GraphQLEnumType.Builder |
newEnum(GraphQLEnumType existing) |
GraphQLEnumType |
transform(java.util.function.Consumer<GraphQLEnumType.Builder> builderConsumer)
This helps you transform the current GraphQLEnumType 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, toString, wait, wait, wait
getDirective, getDirectivesByName
@Deprecated public GraphQLEnumType(java.lang.String name, java.lang.String description, java.util.List<GraphQLEnumValueDefinition> values)
newEnum()
builder pattern instead, as this constructor will be made private in a future version.name
- the namedescription
- the descriptionvalues
- the values@Deprecated public GraphQLEnumType(java.lang.String name, java.lang.String description, java.util.List<GraphQLEnumValueDefinition> values, java.util.List<GraphQLDirective> directives, EnumTypeDefinition definition)
newEnum()
builder pattern instead, as this constructor will be made private in a future version.name
- the namedescription
- the descriptionvalues
- the valuesdirectives
- the directives on this type elementdefinition
- the AST definitionpublic java.util.List<GraphQLEnumValueDefinition> getValues()
public GraphQLEnumValueDefinition getValue(java.lang.String name)
public java.lang.String getName()
getName
in interface GraphQLType
[_A-Za-z][_0-9A-Za-z]*
public java.lang.String getDescription()
public Coercing getCoercing()
public EnumTypeDefinition getDefinition()
public java.util.List<GraphQLDirective> getDirectives()
getDirectives
in interface GraphQLDirectiveContainer
public GraphQLEnumType transform(java.util.function.Consumer<GraphQLEnumType.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 GraphQLEnumType.Builder newEnum()
public static GraphQLEnumType.Builder newEnum(GraphQLEnumType existing)