Package graphql
Class DirectivesUtil
java.lang.Object
graphql.DirectivesUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA holder class that breaks a list of directives into maps to be more easily accessible in using classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<GraphQLDirective> add(List<GraphQLDirective> targetList, GraphQLDirective newDirective) Deprecated.static List<GraphQLDirective> addAll(List<GraphQLDirective> targetList, List<GraphQLDirective> newDirectives) Deprecated.static Map<String, com.google.common.collect.ImmutableList<GraphQLDirective>> allDirectivesByName(List<GraphQLDirective> directives) Deprecated.static Optional<GraphQLArgument> directiveWithArg(List<GraphQLDirective> directives, String directiveName, String argumentName) Deprecated.static GraphQLDirectivegetFirstDirective(String name, Map<String, List<GraphQLDirective>> allDirectivesByName) Deprecated.static booleanisAllNonRepeatable(List<GraphQLDirective> directives) Deprecated.static Map<String, GraphQLDirective> nonRepeatableDirectivesByName(List<GraphQLDirective> directives) Deprecated.static 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 List<GraphQLAppliedDirective> toAppliedDirectives(Collection<GraphQLAppliedDirective> appliedDirectives, Collection<GraphQLDirective> directives) This can take a collection of legacy directives and turn them applied directives, and combine them with any applied directives.
-
Constructor Details
-
DirectivesUtil
public DirectivesUtil()
-
-
Method Details
-
nonRepeatableDirectivesByName
@Deprecated(since="2022-02-24") public static Map<String,GraphQLDirective> nonRepeatableDirectivesByName(List<GraphQLDirective> directives) Deprecated. -
allDirectivesByName
@Deprecated(since="2022-02-24") public static Map<String,com.google.common.collect.ImmutableList<GraphQLDirective>> allDirectivesByName(List<GraphQLDirective> directives) Deprecated. -
directiveWithArg
@Deprecated(since="2022-02-24") public static Optional<GraphQLArgument> directiveWithArg(List<GraphQLDirective> directives, String directiveName, String argumentName) Deprecated. -
isAllNonRepeatable
@Deprecated(since="2022-02-24") public static boolean isAllNonRepeatable(List<GraphQLDirective> directives) Deprecated. -
add
@Deprecated(since="2022-02-24") public static List<GraphQLDirective> add(List<GraphQLDirective> targetList, GraphQLDirective newDirective) Deprecated. -
addAll
@Deprecated(since="2022-02-24") public static List<GraphQLDirective> addAll(List<GraphQLDirective> targetList, List<GraphQLDirective> newDirectives) Deprecated. -
getFirstDirective
@Deprecated(since="2022-02-24") public static GraphQLDirective getFirstDirective(String name, Map<String, List<GraphQLDirective>> allDirectivesByName) Deprecated. -
toAppliedDirectives
public static 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 List<GraphQLAppliedDirective> toAppliedDirectives(Collection<GraphQLAppliedDirective> appliedDirectives, 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
-