@@ -25,6 +25,7 @@ public class DirectivesUtil {
2525
2626
2727 @ Deprecated // use GraphQLAppliedDirectives eventually
28+ @ DeprecatedAt ("2022-02-24" )
2829 public static Map <String , GraphQLDirective > nonRepeatableDirectivesByName (List <GraphQLDirective > directives ) {
2930 // filter the repeatable directives
3031 List <GraphQLDirective > singletonDirectives = directives .stream ()
@@ -34,12 +35,14 @@ public static Map<String, GraphQLDirective> nonRepeatableDirectivesByName(List<G
3435 }
3536
3637 @ Deprecated // use GraphQLAppliedDirectives eventually
38+ @ DeprecatedAt ("2022-02-24" )
3739 public static Map <String , ImmutableList <GraphQLDirective >> allDirectivesByName (List <GraphQLDirective > directives ) {
3840
3941 return ImmutableMap .copyOf (FpKit .groupingBy (directives , GraphQLDirective ::getName ));
4042 }
4143
4244 @ Deprecated // use GraphQLAppliedDirectives eventually
45+ @ DeprecatedAt ("2022-02-24" )
4346 public static Optional <GraphQLArgument > directiveWithArg (List <GraphQLDirective > directives , String directiveName , String argumentName ) {
4447 GraphQLDirective directive = nonRepeatableDirectivesByName (directives ).get (directiveName );
4548 GraphQLArgument argument = null ;
@@ -51,6 +54,7 @@ public static Optional<GraphQLArgument> directiveWithArg(List<GraphQLDirective>
5154
5255
5356 @ Deprecated // use GraphQLAppliedDirectives eventually
57+ @ DeprecatedAt ("2022-02-24" )
5458 public static boolean isAllNonRepeatable (List <GraphQLDirective > directives ) {
5559 if (directives == null || directives .isEmpty ()) {
5660 return false ;
@@ -64,6 +68,7 @@ public static boolean isAllNonRepeatable(List<GraphQLDirective> directives) {
6468 }
6569
6670 @ Deprecated // use GraphQLAppliedDirectives eventually
71+ @ DeprecatedAt ("2022-02-24" )
6772 public static List <GraphQLDirective > add (List <GraphQLDirective > targetList , GraphQLDirective newDirective ) {
6873 assertNotNull (targetList , () -> "directive list can't be null" );
6974 assertNotNull (newDirective , () -> "directive can't be null" );
@@ -72,6 +77,7 @@ public static List<GraphQLDirective> add(List<GraphQLDirective> targetList, Grap
7277 }
7378
7479 @ Deprecated // use GraphQLAppliedDirectives eventually
80+ @ DeprecatedAt ("2022-02-24" )
7581 public static List <GraphQLDirective > addAll (List <GraphQLDirective > targetList , List <GraphQLDirective > newDirectives ) {
7682 assertNotNull (targetList , () -> "directive list can't be null" );
7783 assertNotNull (newDirectives , () -> "directive list can't be null" );
@@ -80,6 +86,7 @@ public static List<GraphQLDirective> addAll(List<GraphQLDirective> targetList, L
8086 }
8187
8288 @ Deprecated // use GraphQLAppliedDirectives eventually
89+ @ DeprecatedAt ("2022-02-24" )
8390 public static GraphQLDirective getFirstDirective (String name , Map <String , List <GraphQLDirective >> allDirectivesByName ) {
8491 List <GraphQLDirective > directives = allDirectivesByName .getOrDefault (name , emptyList ());
8592 if (directives .isEmpty ()) {
0 commit comments