@PublicApi public class GraphQLEnumType extends Object implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLUnmodifiedType, GraphQLNullableType, GraphQLDirectiveContainer
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLEnumType.Builder |
Constructor and Description |
---|
GraphQLEnumType(String name,
String description,
List<GraphQLEnumValueDefinition> values)
Deprecated.
use the
newEnum() builder pattern instead, as this constructor will be made private in a future version. |
GraphQLEnumType(String name,
String description,
List<GraphQLEnumValueDefinition> values,
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.
|
List<GraphQLType> |
getChildren() |
Coercing |
getCoercing() |
EnumTypeDefinition |
getDefinition() |
String |
getDescription() |
List<GraphQLDirective> |
getDirectives() |
String |
getName() |
GraphQLEnumValueDefinition |
getValue(String name) |
List<GraphQLEnumValueDefinition> |
getValues() |
static GraphQLEnumType.Builder |
newEnum() |
static GraphQLEnumType.Builder |
newEnum(GraphQLEnumType existing) |
GraphQLEnumType |
transform(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(String name, String description, 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(String name, String description, List<GraphQLEnumValueDefinition> values, 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 List<GraphQLEnumValueDefinition> getValues()
public GraphQLEnumValueDefinition getValue(String name)
public String getName()
getName
in interface GraphQLType
[_A-Za-z][_0-9A-Za-z]*
public String getDescription()
public Coercing getCoercing()
public EnumTypeDefinition getDefinition()
public List<GraphQLDirective> getDirectives()
getDirectives
in interface GraphQLDirectiveContainer
public GraphQLEnumType transform(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 List<GraphQLType> getChildren()
getChildren
in interface GraphQLType
public static GraphQLEnumType.Builder newEnum()
public static GraphQLEnumType.Builder newEnum(GraphQLEnumType existing)
Copyright © 2019. All rights reserved.