Package graphql.execution.directives
Class QueryDirectivesImpl
- java.lang.Object
-
- graphql.execution.directives.QueryDirectivesImpl
-
- All Implemented Interfaces:
QueryDirectives
public class QueryDirectivesImpl extends java.lang.Object implements QueryDirectives
These objects are ALWAYS in the context of a single MergedFieldAlso note we compute these values lazily
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface graphql.execution.directives.QueryDirectives
QueryDirectives.Builder
-
-
Constructor Summary
Constructors Constructor Description QueryDirectivesImpl(MergedField mergedField, GraphQLSchema schema, java.util.Map<java.lang.String,java.lang.Object> variables, GraphQLContext graphQLContext, java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theField
s inside aMergedField
and the immediate applied directives that are on each specific fieldjava.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 fieldjava.util.List<GraphQLDirective>
getImmediateDirective(java.lang.String directiveName)
This will return a list of the named directives that are immediately on this merged field.java.util.Map<Field,java.util.List<GraphQLDirective>>
getImmediateDirectivesByField()
This will return a map of theField
s inside aMergedField
and the immediate directives that are on each specific fieldjava.util.Map<java.lang.String,java.util.List<GraphQLDirective>>
getImmediateDirectivesByName()
This will return a map of the directives that are immediately on a merged field
-
-
-
Constructor Detail
-
QueryDirectivesImpl
public QueryDirectivesImpl(MergedField mergedField, GraphQLSchema schema, java.util.Map<java.lang.String,java.lang.Object> variables, GraphQLContext graphQLContext, java.util.Locale locale)
-
-
Method Detail
-
getImmediateDirectivesByField
public java.util.Map<Field,java.util.List<GraphQLDirective>> getImmediateDirectivesByField()
Description copied from interface:QueryDirectives
This will return a map of theField
s inside aMergedField
and the immediate directives that are on each specific field- Specified by:
getImmediateDirectivesByField
in interfaceQueryDirectives
- Returns:
- a map of all directives on each field inside this
-
getImmediateAppliedDirectivesByField
public java.util.Map<Field,java.util.List<QueryAppliedDirective>> getImmediateAppliedDirectivesByField()
Description copied from interface:QueryDirectives
This will return a map of theField
s inside aMergedField
and the immediate applied directives that are on each specific field- Specified by:
getImmediateAppliedDirectivesByField
in interfaceQueryDirectives
- Returns:
- a map of all directives on each field inside this
-
getImmediateDirectivesByName
public java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> getImmediateDirectivesByName()
Description copied from interface:QueryDirectives
This will return a map of the directives that are immediately on a merged field- Specified by:
getImmediateDirectivesByName
in interfaceQueryDirectives
- Returns:
- a map of all the directives immediately on this merged field
-
getImmediateAppliedDirectivesByName
public java.util.Map<java.lang.String,java.util.List<QueryAppliedDirective>> getImmediateAppliedDirectivesByName()
Description copied from interface:QueryDirectives
This will return a map of the applied directives that are immediately on a merged field- Specified by:
getImmediateAppliedDirectivesByName
in interfaceQueryDirectives
- Returns:
- a map of all the applied directives immediately on this merged field
-
getImmediateDirective
public java.util.List<GraphQLDirective> getImmediateDirective(java.lang.String directiveName)
Description copied from interface:QueryDirectives
This will return a list of the named directives that are immediately on this merged field. Read above for why this is a list of directives and not just one- Specified by:
getImmediateDirective
in interfaceQueryDirectives
- Parameters:
directiveName
- the named directive- Returns:
- a list of the named directives that are immediately on this merged field
-
getImmediateAppliedDirective
public java.util.List<QueryAppliedDirective> getImmediateAppliedDirective(java.lang.String directiveName)
Description copied from interface:QueryDirectives
This will return a list of the named applied directives that are immediately on this merged field. Read above for why this is a list of applied directives and not just one- Specified by:
getImmediateAppliedDirective
in interfaceQueryDirectives
- Parameters:
directiveName
- the named directive- Returns:
- a list of the named applied directives that are immediately on this merged field
-
-