Package graphql
Class DirectivesUtil
- java.lang.Object
-
- graphql.DirectivesUtil
-
public class DirectivesUtil extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectivesUtil.DirectivesHolderA holder class that breaks a list of directives into maps to be more easily accessible in using classes
-
Constructor Summary
Constructors Constructor Description DirectivesUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.List<GraphQLDirective>add(java.util.List<GraphQLDirective> targetList, GraphQLDirective newDirective)Deprecated.static java.util.List<GraphQLDirective>addAll(java.util.List<GraphQLDirective> targetList, java.util.List<GraphQLDirective> newDirectives)Deprecated.static java.util.Map<java.lang.String,com.google.common.collect.ImmutableList<GraphQLDirective>>allDirectivesByName(java.util.List<GraphQLDirective> directives)Deprecated.static java.util.Optional<GraphQLArgument>directiveWithArg(java.util.List<GraphQLDirective> directives, java.lang.String directiveName, java.lang.String argumentName)Deprecated.static GraphQLDirectivegetFirstDirective(java.lang.String name, java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> allDirectivesByName)Deprecated.static booleanisAllNonRepeatable(java.util.List<GraphQLDirective> directives)Deprecated.static java.util.Map<java.lang.String,GraphQLDirective>nonRepeatableDirectivesByName(java.util.List<GraphQLDirective> directives)Deprecated.static java.util.List<GraphQLAppliedDirective>toAppliedDirectives(GraphQLDirectiveContainer directiveContainer)This can take a collection of legacy directives and turn them applied directives, and combine them with any applied directives.static java.util.List<GraphQLAppliedDirective>toAppliedDirectives(java.util.Collection<GraphQLAppliedDirective> appliedDirectives, java.util.Collection<GraphQLDirective> directives)This can take a collection of legacy directives and turn them applied directives, and combine them with any applied directives.
-
-
-
Method Detail
-
nonRepeatableDirectivesByName
@Deprecated public static java.util.Map<java.lang.String,GraphQLDirective> nonRepeatableDirectivesByName(java.util.List<GraphQLDirective> directives)
Deprecated.
-
allDirectivesByName
@Deprecated public static java.util.Map<java.lang.String,com.google.common.collect.ImmutableList<GraphQLDirective>> allDirectivesByName(java.util.List<GraphQLDirective> directives)
Deprecated.
-
directiveWithArg
@Deprecated public static java.util.Optional<GraphQLArgument> directiveWithArg(java.util.List<GraphQLDirective> directives, java.lang.String directiveName, java.lang.String argumentName)
Deprecated.
-
isAllNonRepeatable
@Deprecated public static boolean isAllNonRepeatable(java.util.List<GraphQLDirective> directives)
Deprecated.
-
add
@Deprecated public static java.util.List<GraphQLDirective> add(java.util.List<GraphQLDirective> targetList, GraphQLDirective newDirective)
Deprecated.
-
addAll
@Deprecated public static java.util.List<GraphQLDirective> addAll(java.util.List<GraphQLDirective> targetList, java.util.List<GraphQLDirective> newDirectives)
Deprecated.
-
getFirstDirective
@Deprecated public static GraphQLDirective getFirstDirective(java.lang.String name, java.util.Map<java.lang.String,java.util.List<GraphQLDirective>> allDirectivesByName)
Deprecated.
-
toAppliedDirectives
public static java.util.List<GraphQLAppliedDirective> toAppliedDirectives(GraphQLDirectiveContainer directiveContainer)
This can take a collection of legacy directives and turn them applied directives, and combine them with any applied directives. The applied directives collection takes precedence.- Parameters:
directiveContainer- the schema element holding applied directives- Returns:
- a combined list unique by name
-
toAppliedDirectives
public static java.util.List<GraphQLAppliedDirective> toAppliedDirectives(java.util.Collection<GraphQLAppliedDirective> appliedDirectives, java.util.Collection<GraphQLDirective> directives)
This can take a collection of legacy directives and turn them applied directives, and combine them with any applied directives. The applied directives collection takes precedence.- Parameters:
appliedDirectives- the applied directives to usedirectives- the legacy directives to use- Returns:
- a combined list unique by name
-
-