@PublicApi public class GraphQLDirective extends Object implements GraphQLType
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLDirective.Builder |
Constructor and Description |
---|
GraphQLDirective(String name,
String description,
EnumSet<Introspection.DirectiveLocation> locations,
List<GraphQLArgument> arguments,
boolean onOperation,
boolean onFragment,
boolean onField) |
Modifier and Type | Method and Description |
---|---|
TraversalControl |
accept(TraverserContext<GraphQLType> context,
GraphQLTypeVisitor visitor)
Double-dispatch entry point.
|
GraphQLArgument |
getArgument(String name) |
List<GraphQLArgument> |
getArguments() |
List<GraphQLType> |
getChildren() |
String |
getDescription() |
String |
getName() |
boolean |
isOnField()
Deprecated.
Use
validLocations() |
boolean |
isOnFragment()
Deprecated.
Use
validLocations() |
boolean |
isOnOperation()
Deprecated.
Use
validLocations() |
static GraphQLDirective.Builder |
newDirective() |
static GraphQLDirective.Builder |
newDirective(GraphQLDirective existing) |
String |
toString() |
GraphQLDirective |
transform(Consumer<GraphQLDirective.Builder> builderConsumer)
This helps you transform the current GraphQLDirective into another one by starting a builder with all
the current values and allows you to transform it how you want.
|
EnumSet<Introspection.DirectiveLocation> |
validLocations() |
public GraphQLDirective(String name, String description, EnumSet<Introspection.DirectiveLocation> locations, List<GraphQLArgument> arguments, boolean onOperation, boolean onFragment, boolean onField)
public String getName()
getName
in interface GraphQLType
[_A-Za-z][_0-9A-Za-z]*
public List<GraphQLArgument> getArguments()
public GraphQLArgument getArgument(String name)
public EnumSet<Introspection.DirectiveLocation> validLocations()
@Deprecated public boolean isOnOperation()
validLocations()
@Deprecated public boolean isOnFragment()
validLocations()
@Deprecated public boolean isOnField()
validLocations()
public String getDescription()
public GraphQLDirective transform(Consumer<GraphQLDirective.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 GraphQLDirective.Builder newDirective()
public static GraphQLDirective.Builder newDirective(GraphQLDirective existing)
Copyright © 2019. All rights reserved.