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 QueryDirectives
QueryDirectives.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LockKit.ComputedOnceprivate final DirectivesResolverprivate 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 GraphQLContextprivate final Localeprivate final MergedFieldprivate final GraphQLSchema -
Constructor Summary
ConstructorsConstructorDescriptionQueryDirectivesImpl(MergedField mergedField, GraphQLSchema schema, Map<String, Object> variables, GraphQLContext graphQLContext, Locale locale) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidgetImmediateAppliedDirective(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 theFields inside aMergedFieldand 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 theFields inside aMergedFieldand the immediate directives that are on each specific fieldThis will return a map of the directives that are immediately on a merged fieldprivate QueryAppliedDirectiveArgumenttoAppliedArgument(GraphQLArgument argument) private QueryAppliedDirectivetoAppliedDirective(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:QueryDirectivesThis will return a map of theFields inside aMergedFieldand the immediate directives that are on each specific field- Specified by:
getImmediateDirectivesByFieldin interfaceQueryDirectives- Returns:
- a map of all directives on each field inside this
-
getImmediateAppliedDirectivesByField
Description copied from interface:QueryDirectivesThis will return a map of theFields inside aMergedFieldand the immediate applied directives that are on each specific field- Specified by:
getImmediateAppliedDirectivesByFieldin interfaceQueryDirectives- Returns:
- a map of all directives on each field inside this
-
getImmediateDirectivesByName
Description copied from interface:QueryDirectivesThis will return a map of the directives that are immediately on a merged field- Specified by:
getImmediateDirectivesByNamein interfaceQueryDirectives- Returns:
- a map of all the directives immediately on this merged field
-
getImmediateAppliedDirectivesByName
Description copied from interface:QueryDirectivesThis will return a map of the applied directives that are immediately on a merged field- Specified by:
getImmediateAppliedDirectivesByNamein interfaceQueryDirectives- Returns:
- a map of all the applied directives immediately on this merged field
-
getImmediateDirective
Description copied from interface:QueryDirectivesThis 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:
getImmediateDirectivein 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:QueryDirectivesThis 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:
getImmediateAppliedDirectivein interfaceQueryDirectives- Parameters:
directiveName- the named directive- Returns:
- a list of the named applied directives that are immediately on this merged field
-