@PublicApi public class GraphQLDirective extends java.lang.Object implements GraphQLType
| Modifier and Type | Class and Description |
|---|---|
static class |
GraphQLDirective.Builder |
| Constructor and Description |
|---|
GraphQLDirective(java.lang.String name,
java.lang.String description,
java.util.EnumSet<Introspection.DirectiveLocation> locations,
java.util.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(java.lang.String name) |
java.util.List<GraphQLArgument> |
getArguments() |
java.util.List<GraphQLType> |
getChildren() |
java.lang.String |
getDescription() |
java.lang.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) |
java.lang.String |
toString() |
GraphQLDirective |
transform(java.util.function.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.
|
java.util.EnumSet<Introspection.DirectiveLocation> |
validLocations() |
public GraphQLDirective(java.lang.String name,
java.lang.String description,
java.util.EnumSet<Introspection.DirectiveLocation> locations,
java.util.List<GraphQLArgument> arguments,
boolean onOperation,
boolean onFragment,
boolean onField)
public java.lang.String getName()
getName in interface GraphQLType[_A-Za-z][_0-9A-Za-z]*public java.util.List<GraphQLArgument> getArguments()
public GraphQLArgument getArgument(java.lang.String name)
public java.util.EnumSet<Introspection.DirectiveLocation> validLocations()
@Deprecated public boolean isOnOperation()
validLocations()@Deprecated public boolean isOnFragment()
validLocations()@Deprecated public boolean isOnField()
validLocations()public java.lang.String getDescription()
public java.lang.String toString()
toString in class java.lang.Objectpublic GraphQLDirective transform(java.util.function.Consumer<GraphQLDirective.Builder> builderConsumer)
builderConsumer - the consumer code that will be given a builder to transformpublic TraversalControl accept(TraverserContext<GraphQLType> context, GraphQLTypeVisitor visitor)
GraphQLTypeNode, see accept(...) for more details about the pattern.accept in interface GraphQLTypecontext - 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 GraphQLTypepublic static GraphQLDirective.Builder newDirective()
public static GraphQLDirective.Builder newDirective(GraphQLDirective existing)