@PublicApi public interface QueryDirectives
MergedField
. This does not include directives on parent
fields or fragment containers.
Because a MergedField
can actually have multiple fields and hence
directives on each field instance its possible that there is more than one directive named "foo"
on the merged field. How you decide which one to use is up to your code.
NOTE: A future version of the interface will try to add access to the inherited directives from parent fields and fragments. This proved to be a non-trivial problem and hence we decide to give access to immediate field directives and provide this holder interface, so we can add the other directives in the future
MergedField
Modifier and Type | Method and Description |
---|---|
java.util.List<QueryAppliedDirective> |
getImmediateAppliedDirective(java.lang.String directiveName)
This will return a list of the named applied directives that are immediately on this merged field.
|
java.util.Map<Field,java.util.List<QueryAppliedDirective>> |
getImmediateAppliedDirectivesByField()
This will return a map of the
Field s inside a MergedField
and the immediate applied directives that are on each specific field |
java.util.Map<java.lang.String,java.util.List<QueryAppliedDirective>> |
getImmediateAppliedDirectivesByName()
This will return a map of the applied directives that are immediately on a merged field
|
java.util.List<GraphQLDirective> |
getImmediateDirective(java.lang.String directiveName)
Deprecated.
- use the
QueryAppliedDirective methods instead |
java.util.Map<Field,java.util.List<GraphQLDirective>> |
getImmediateDirectivesByField()
Deprecated.
- use the
QueryAppliedDirective methods instead |
java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> |
getImmediateDirectivesByName()
Deprecated.
- use the
QueryAppliedDirective methods instead |
java.util.Map<java.lang.String,java.util.List<QueryAppliedDirective>> getImmediateAppliedDirectivesByName()
java.util.List<QueryAppliedDirective> getImmediateAppliedDirective(java.lang.String directiveName)
directiveName
- the named directive@Deprecated java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> getImmediateDirectivesByName()
QueryAppliedDirective
methods insteadjava.util.Map<Field,java.util.List<QueryAppliedDirective>> getImmediateAppliedDirectivesByField()
Field
s inside a MergedField
and the immediate applied directives that are on each specific field@Deprecated java.util.List<GraphQLDirective> getImmediateDirective(java.lang.String directiveName)
QueryAppliedDirective
methods insteaddirectiveName
- the named directive@Deprecated java.util.Map<Field,java.util.List<GraphQLDirective>> getImmediateDirectivesByField()
QueryAppliedDirective
methods insteadField
s inside a MergedField
and the immediate directives that are on each specific field