@PublicApi public interface GraphQLDirectiveContainer extends GraphQLNamedSchemaElement
GraphQLAppliedDirective
s.
Directives can be repeatable and (by default) non-repeatable.
There are access methods here that get the two different types.
The use of GraphQLDirective
to represent a directive applied to an element is deprecated in favour of
GraphQLAppliedDirective
. A GraphQLDirective
really should represent the definition of a directive in a schema, not its use
on schema elements. However, it has been left in place for legacy reasons and will be removed in a
future version.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHILD_APPLIED_DIRECTIVES |
static java.lang.String |
CHILD_DIRECTIVES |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<GraphQLAppliedDirective>> |
getAllAppliedDirectivesByName()
This will return a Map of the all directives that are associated with a
GraphQLNamedSchemaElement , including both
repeatable and non-repeatable directives. |
java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> |
getAllDirectivesByName()
Deprecated.
- use the
GraphQLAppliedDirective methods instead |
GraphQLAppliedDirective |
getAppliedDirective(java.lang.String directiveName)
Returns a non-repeatable directive with the provided name.
|
java.util.List<GraphQLAppliedDirective> |
getAppliedDirectives()
This will return a list of all the directives that have been put on
GraphQLNamedSchemaElement as a flat list, which may contain repeatable
and non-repeatable directives. |
default java.util.List<GraphQLAppliedDirective> |
getAppliedDirectives(java.lang.String directiveName)
Returns all of the directives with the provided name, including repeatable and non repeatable directives.
|
GraphQLDirective |
getDirective(java.lang.String directiveName)
Deprecated.
- use the
GraphQLAppliedDirective methods instead |
java.util.List<GraphQLDirective> |
getDirectives()
Deprecated.
- use the
GraphQLAppliedDirective methods instead |
default java.util.List<GraphQLDirective> |
getDirectives(java.lang.String directiveName)
Deprecated.
- use the
GraphQLAppliedDirective methods instead |
java.util.Map<java.lang.String,GraphQLDirective> |
getDirectivesByName()
Deprecated.
- use the
GraphQLAppliedDirective methods instead |
default boolean |
hasAppliedDirective(java.lang.String directiveName)
This will return true if the element has a directive (repeatable or non repeatable) with the specified name
|
default boolean |
hasDirective(java.lang.String directiveName)
Deprecated.
use
hasAppliedDirective(String) instead |
getDefinition, getDescription, getName
accept, copy, equals, getChildren, getChildrenWithTypeReferences, hashCode, withNewChildren
static final java.lang.String CHILD_DIRECTIVES
static final java.lang.String CHILD_APPLIED_DIRECTIVES
java.util.List<GraphQLAppliedDirective> getAppliedDirectives()
GraphQLNamedSchemaElement
as a flat list, which may contain repeatable
and non-repeatable directives.java.util.Map<java.lang.String,java.util.List<GraphQLAppliedDirective>> getAllAppliedDirectivesByName()
GraphQLNamedSchemaElement
, including both
repeatable and non-repeatable directives.GraphQLAppliedDirective getAppliedDirective(java.lang.String directiveName)
directiveName
- the name of the directive to retrievedefault java.util.List<GraphQLAppliedDirective> getAppliedDirectives(java.lang.String directiveName)
directiveName
- the name of the directives to retrieve@Deprecated default boolean hasDirective(java.lang.String directiveName)
hasAppliedDirective(String)
insteaddirectiveName
- the name of the directivedefault boolean hasAppliedDirective(java.lang.String directiveName)
directiveName
- the name of the directive@Deprecated java.util.List<GraphQLDirective> getDirectives()
GraphQLAppliedDirective
methods insteadGraphQLNamedSchemaElement
as a flat list, which may contain repeatable
and non-repeatable directives.@Deprecated java.util.Map<java.lang.String,GraphQLDirective> getDirectivesByName()
GraphQLAppliedDirective
methods insteadGraphQLNamedSchemaElement
. Any repeatable directives
will be filtered out of this map.@Deprecated java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> getAllDirectivesByName()
GraphQLAppliedDirective
methods insteadGraphQLNamedSchemaElement
, including both
repeatable and non repeatable directives.@Deprecated GraphQLDirective getDirective(java.lang.String directiveName)
GraphQLAppliedDirective
methods insteadAssertException
if
the directive is a repeatable directive that has more then one instance.directiveName
- the name of the directive to retrieve@Deprecated default java.util.List<GraphQLDirective> getDirectives(java.lang.String directiveName)
GraphQLAppliedDirective
methods insteaddirectiveName
- the name of the directives to retrieve