@PublicApi public class GraphQLDirective extends java.lang.Object implements GraphQLNamedSchemaElement
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLDirective.Builder |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHILD_ARGUMENTS |
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) |
public static final java.lang.String CHILD_ARGUMENTS
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 GraphQLNamedSchemaElement
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.Object
public GraphQLDirective transform(java.util.function.Consumer<GraphQLDirective.Builder> builderConsumer)
builderConsumer
- the consumer code that will be given a builder to transformpublic TraversalControl accept(TraverserContext<GraphQLSchemaElement> context, GraphQLTypeVisitor visitor)
accept
in interface GraphQLSchemaElement
public java.util.List<GraphQLSchemaElement> getChildren()
getChildren
in interface GraphQLSchemaElement
public SchemaElementChildrenContainer getChildrenWithTypeReferences()
getChildrenWithTypeReferences
in interface GraphQLSchemaElement
public GraphQLDirective withNewChildren(SchemaElementChildrenContainer newChildren)
withNewChildren
in interface GraphQLSchemaElement
public static GraphQLDirective.Builder newDirective()
public static GraphQLDirective.Builder newDirective(GraphQLDirective existing)