Package graphql.execution.directives
Class QueryDirectivesImpl
java.lang.Object
graphql.execution.directives.QueryDirectivesImpl
- All Implemented Interfaces:
QueryDirectives
These objects are ALWAYS in the context of a single MergedField
Also note we compute these values lazily
-
Nested Class Summary
Nested classes/interfaces inherited from interface graphql.execution.directives.QueryDirectives
QueryDirectives.Builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LockKit.ComputedOnce
private final DirectivesResolver
private com.google.common.collect.ImmutableMap
<Field, List<QueryAppliedDirective>> private com.google.common.collect.ImmutableMap
<String, List<QueryAppliedDirective>> private com.google.common.collect.ImmutableMap
<Field, List<GraphQLDirective>> private com.google.common.collect.ImmutableMap
<String, List<GraphQLDirective>> private final GraphQLContext
private final Locale
private final MergedField
private final GraphQLSchema
-
Constructor Summary
ConstructorsConstructorDescriptionQueryDirectivesImpl
(MergedField mergedField, GraphQLSchema schema, Map<String, Object> variables, GraphQLContext graphQLContext, Locale locale) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
getImmediateAppliedDirective
(String directiveName) This will return a list of the named applied directives that are immediately on this merged field.This will return a map of theField
s inside aMergedField
and the immediate applied directives that are on each specific fieldThis will return a map of the applied directives that are immediately on a merged fieldgetImmediateDirective
(String directiveName) This will return a list of the named directives that are immediately on this merged field.This will return a map of theField
s inside aMergedField
and the immediate directives that are on each specific fieldThis will return a map of the directives that are immediately on a merged fieldprivate QueryAppliedDirectiveArgument
toAppliedArgument
(GraphQLArgument argument) private QueryAppliedDirective
toAppliedDirective
(GraphQLDirective directive)
-
Field Details
-
directivesResolver
-
mergedField
-
schema
-
variables
-
graphQLContext
-
locale
-
computedOnce
-
fieldDirectivesByField
private volatile com.google.common.collect.ImmutableMap<Field,List<GraphQLDirective>> fieldDirectivesByField -
fieldDirectivesByName
private volatile com.google.common.collect.ImmutableMap<String,List<GraphQLDirective>> fieldDirectivesByName -
fieldAppliedDirectivesByField
private volatile com.google.common.collect.ImmutableMap<Field,List<QueryAppliedDirective>> fieldAppliedDirectivesByField -
fieldAppliedDirectivesByName
private volatile com.google.common.collect.ImmutableMap<String,List<QueryAppliedDirective>> fieldAppliedDirectivesByName
-
-
Constructor Details
-
QueryDirectivesImpl
public QueryDirectivesImpl(MergedField mergedField, GraphQLSchema schema, Map<String, Object> variables, GraphQLContext graphQLContext, Locale locale)
-
-
Method Details
-
computeValuesLazily
private void computeValuesLazily() -
toAppliedDirective
-
toAppliedArgument
-
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
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
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
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
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
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
-